Bug 906511 - Correctly initialize .bubbles and .cancelable; r=smaug

This commit is contained in:
Aryeh Gregor 2014-04-07 19:24:01 +03:00
parent 6d5dc27f59
commit 635d18ab9f
3 changed files with 7 additions and 28 deletions

View File

@ -7750,7 +7750,13 @@ nsIDocument::CreateEvent(const nsAString& aEventType, ErrorResult& rv) const
rv = EventDispatcher::CreateEvent(const_cast<nsIDocument*>(this), rv = EventDispatcher::CreateEvent(const_cast<nsIDocument*>(this),
presContext, nullptr, aEventType, presContext, nullptr, aEventType,
getter_AddRefs(ev)); getter_AddRefs(ev));
return ev ? dont_AddRef(ev.forget().take()->InternalDOMEvent()) : nullptr; if (!ev) {
return nullptr;
}
WidgetEvent* e = ev->GetInternalNSEvent();
e->mFlags.mBubbles = false;
e->mFlags.mCancelable = false;
return dont_AddRef(ev.forget().take()->InternalDOMEvent());
} }
void void

View File

@ -5,7 +5,6 @@ support-files =
[test_Document-createElement-namespace.html.json] [test_Document-createElement-namespace.html.json]
[test_Document-createElementNS.html.json] [test_Document-createElementNS.html.json]
[test_Document-createEvent.html.json]
[test_Document-getElementsByTagName.html.json] [test_Document-getElementsByTagName.html.json]
[test_Node-isEqualNode.xhtml.json] [test_Node-isEqualNode.xhtml.json]
[test_Node-properties.html.json] [test_Node-properties.html.json]

View File

@ -1,26 +0,0 @@
{
"createEvent('CustomEvent') should be initialized correctly.": true,
"createEvent('customevent') should be initialized correctly.": true,
"createEvent('CUSTOMEVENT') should be initialized correctly.": true,
"createEvent('Event') should be initialized correctly.": true,
"createEvent('event') should be initialized correctly.": true,
"createEvent('EVENT') should be initialized correctly.": true,
"createEvent('Events') should be initialized correctly.": true,
"createEvent('events') should be initialized correctly.": true,
"createEvent('EVENTS') should be initialized correctly.": true,
"createEvent('HTMLEvents') should be initialized correctly.": true,
"createEvent('htmlevents') should be initialized correctly.": true,
"createEvent('HTMLEVENTS') should be initialized correctly.": true,
"createEvent('MouseEvent') should be initialized correctly.": true,
"createEvent('mouseevent') should be initialized correctly.": true,
"createEvent('MOUSEEVENT') should be initialized correctly.": true,
"createEvent('MouseEvents') should be initialized correctly.": true,
"createEvent('mouseevents') should be initialized correctly.": true,
"createEvent('MOUSEEVENTS') should be initialized correctly.": true,
"createEvent('UIEvent') should be initialized correctly.": true,
"createEvent('uievent') should be initialized correctly.": true,
"createEvent('UIEVENT') should be initialized correctly.": true,
"createEvent('UIEvents') should be initialized correctly.": true,
"createEvent('uievents') should be initialized correctly.": true,
"createEvent('UIEVENTS') should be initialized correctly.": true
}