Add support for languagechange event
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Oct 2016 04:33:56 +0000 (04:33 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Oct 2016 04:33:56 +0000 (04:33 +0000)
commit637d20074139f814b6af35691e00904e8c64ac2e
treeeef07084704c2f1d55e12f9a069bc2726202d8d9
parente4472a0f3b71e75cae5e10e83efb91dc7ffed73e
Add support for languagechange event
https://bugs.webkit.org/show_bug.cgi?id=163222

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:

Source/WebCore:

Add support for languagechange event:
- https://html.spec.whatwg.org/#dom-navigator-languages

Firefox and Chrome already support this.

Test: fast/dom/window-languagechange-event.html

* dom/EventNames.h:
* html/HTMLAttributeNames.in:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
* page/DOMWindow.cpp:
(WebCore::languagesChangedCallback):
(WebCore::DOMWindow::DOMWindow):
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::languagesChanged):
(WebCore::DOMWindow::canShowModalDialog): Deleted.
(WebCore::DOMWindow::removeEventListener): Deleted.
* page/DOMWindow.h:
* page/WindowEventHandlers.idl:

LayoutTests:

Add layout test coverage.

* fast/dom/window-languagechange-event-expected.txt: Added.
* fast/dom/window-languagechange-event.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/window-languagechange-event-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/window-languagechange-event.html [new file with mode: 0644]
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/EventNames.h
Source/WebCore/html/HTMLAttributeNames.in
Source/WebCore/html/HTMLBodyElement.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DOMWindow.h
Source/WebCore/page/WindowEventHandlers.idl