diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-23 09:13:00 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-23 09:13:00 +0200 |
commit | 9957290b5a27555aeebd9c8ce0e6891fee747fee (patch) | |
tree | 5e88b91a175d59c46a01db3992cfe9085f3f77ec | |
parent | c30ebdac27c93b57e368c69e9c13055a17229992 (diff) | |
download | UXP-9957290b5a27555aeebd9c8ce0e6891fee747fee.tar UXP-9957290b5a27555aeebd9c8ce0e6891fee747fee.tar.gz UXP-9957290b5a27555aeebd9c8ce0e6891fee747fee.tar.lz UXP-9957290b5a27555aeebd9c8ce0e6891fee747fee.tar.xz UXP-9957290b5a27555aeebd9c8ce0e6891fee747fee.zip |
moebius#123: DOM - Events - support createEvent("FocusEvent")
https://github.com/MoonchildProductions/moebius/pull/123
3 files changed, 5 insertions, 28 deletions
diff --git a/dom/events/EventDispatcher.cpp b/dom/events/EventDispatcher.cpp index a1d0675ae..65f01844b 100644 --- a/dom/events/EventDispatcher.cpp +++ b/dom/events/EventDispatcher.cpp @@ -1056,6 +1056,11 @@ EventDispatcher::CreateEvent(EventTarget* aOwner, LOG_EVENT_CREATION(STORAGEEVENT); return NS_NewDOMStorageEvent(aOwner); } + if (aEventType.LowerCaseEqualsLiteral("focusevent")) { + RefPtr<Event> event = NS_NewDOMFocusEvent(aOwner, aPresContext, nullptr); + event->MarkUninitialized(); + return event.forget(); + } #undef LOG_EVENT_CREATION diff --git a/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini b/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini index d62b521c5..0d489b03d 100644 --- a/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini +++ b/testing/web-platform/meta/dom/events/EventTarget-dispatchEvent.html.ini @@ -12,10 +12,6 @@ expected: FAIL bug: https://github.com/whatwg/dom/issues/362, 1314303 - [If the event's initialized flag is not set, an InvalidStateError must be thrown (FocusEvent).] - expected: FAIL - bug: https://github.com/whatwg/dom/issues/362, 1314303 - [If the event's initialized flag is not set, an InvalidStateError must be thrown (IDBVersionChangeEvent).] expected: FAIL bug: https://github.com/whatwg/dom/issues/362, 1314303 diff --git a/testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini b/testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini index 1d92f01ae..a1c822113 100644 --- a/testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini +++ b/testing/web-platform/meta/dom/nodes/Document-createEvent.html.ini @@ -76,30 +76,6 @@ expected: FAIL bug: https://github.com/whatwg/dom/issues/362, 1314303 - [FocusEvent should be an alias for FocusEvent.] - expected: FAIL - bug: https://github.com/whatwg/dom/issues/362, 1314303 - - [createEvent('FocusEvent') should be initialized correctly.] - expected: FAIL - bug: https://github.com/whatwg/dom/issues/362, 1314303 - - [focusevent should be an alias for FocusEvent.] - expected: FAIL - bug: https://github.com/whatwg/dom/issues/362, 1314303 - - [createEvent('focusevent') should be initialized correctly.] - expected: FAIL - bug: https://github.com/whatwg/dom/issues/362, 1314303 - - [FOCUSEVENT should be an alias for FocusEvent.] - expected: FAIL - bug: https://github.com/whatwg/dom/issues/362, 1314303 - - [createEvent('FOCUSEVENT') should be initialized correctly.] - expected: FAIL - bug: https://github.com/whatwg/dom/issues/362, 1314303 - [IDBVersionChangeEvent should be an alias for IDBVersionChangeEvent.] expected: FAIL bug: https://github.com/whatwg/dom/issues/362, 1314303 |