<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[207040] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/207040">207040</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-10-10 21:33:56 -0700 (Mon, 10 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>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.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlwebappapisscriptingeventseventhandlerattributesbodywindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomEventNamesh">trunk/Source/WebCore/dom/EventNames.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAttributeNamesin">trunk/Source/WebCore/html/HTMLAttributeNames.in</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLBodyElementcpp">trunk/Source/WebCore/html/HTMLBodyElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowh">trunk/Source/WebCore/page/DOMWindow.h</a></li>
<li><a href="#trunkSourceWebCorepageWindowEventHandlersidl">trunk/Source/WebCore/page/WindowEventHandlers.idl</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomwindowlanguagechangeeventexpectedtxt">trunk/LayoutTests/fast/dom/window-languagechange-event-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomwindowlanguagechangeeventhtml">trunk/LayoutTests/fast/dom/window-languagechange-event.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/LayoutTests/ChangeLog        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-10-10 Chris Dumez <cdumez@apple.com>
+
+ Add support for languagechange event
+ https://bugs.webkit.org/show_bug.cgi?id=163222
+
+ Reviewed by Ryosuke Niwa.
+
+ Add layout test coverage.
+
+ * fast/dom/window-languagechange-event-expected.txt: Added.
+ * fast/dom/window-languagechange-event.html: Added.
+
</ins><span class="cx"> 2016-10-10 Nan Wang <n_wang@apple.com>
</span><span class="cx">
</span><span class="cx"> AX: Expose invalid status for input types with that information
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomwindowlanguagechangeeventexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/window-languagechange-event-expected.txt (0 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/window-languagechange-event-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/dom/window-languagechange-event-expected.txt        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Tests the languagechange event.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS navigator.language is "en-US"
+* received languagechange event
+PASS navigator.language is "fr-FR"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomwindowlanguagechangeeventhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/window-languagechange-event.html (0 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/window-languagechange-event.html         (rev 0)
+++ trunk/LayoutTests/fast/dom/window-languagechange-event.html        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+description("Tests the languagechange event.");
+jsTestIsAsync = true;
+
+internals.setUserPreferredLanguages(["en-US"]);
+
+shouldBeEqualToString("navigator.language", "en-US");
+
+window.onlanguagechange = function() {
+ debug("* received languagechange event");
+
+ shouldBeEqualToString("navigator.language", "fr-FR");
+
+ window.onlanguagechange = null;
+
+ finishJSTest();
+}
+
+internals.setUserPreferredLanguages(["fr-FR"]);
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-10-10 Chris Dumez <cdumez@apple.com>
+
+ Add support for languagechange event
+ https://bugs.webkit.org/show_bug.cgi?id=163222
+
+ Reviewed by Ryosuke Niwa.
+
+ 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:
+
</ins><span class="cx"> 2016-10-10 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Add baseline for two tests imported with r206999.
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -1351,7 +1351,7 @@
</span><span class="cx"> FAIL HTMLBodyElement interface: attribute onbeforeprint assert_true: The prototype object must have a property "onbeforeprint" expected true got false
</span><span class="cx"> PASS HTMLBodyElement interface: attribute onbeforeunload
</span><span class="cx"> PASS HTMLBodyElement interface: attribute onhashchange
</span><del>-FAIL HTMLBodyElement interface: attribute onlanguagechange assert_true: The prototype object must have a property "onlanguagechange" expected true got false
</del><ins>+PASS HTMLBodyElement interface: attribute onlanguagechange
</ins><span class="cx"> PASS HTMLBodyElement interface: attribute onmessage
</span><span class="cx"> PASS HTMLBodyElement interface: attribute onoffline
</span><span class="cx"> PASS HTMLBodyElement interface: attribute ononline
</span><span class="lines">@@ -1372,7 +1372,7 @@
</span><span class="cx"> FAIL HTMLBodyElement interface: document.createElement("body") must inherit property "onbeforeprint" with the proper type (7) assert_inherits: property "onbeforeprint" not found in prototype chain
</span><span class="cx"> PASS HTMLBodyElement interface: document.createElement("body") must inherit property "onbeforeunload" with the proper type (8)
</span><span class="cx"> PASS HTMLBodyElement interface: document.createElement("body") must inherit property "onhashchange" with the proper type (9)
</span><del>-FAIL HTMLBodyElement interface: document.createElement("body") must inherit property "onlanguagechange" with the proper type (10) assert_inherits: property "onlanguagechange" not found in prototype chain
</del><ins>+PASS HTMLBodyElement interface: document.createElement("body") must inherit property "onlanguagechange" with the proper type (10)
</ins><span class="cx"> PASS HTMLBodyElement interface: document.createElement("body") must inherit property "onmessage" with the proper type (11)
</span><span class="cx"> PASS HTMLBodyElement interface: document.createElement("body") must inherit property "onoffline" with the proper type (12)
</span><span class="cx"> PASS HTMLBodyElement interface: document.createElement("body") must inherit property "ononline" with the proper type (13)
</span><span class="lines">@@ -5039,7 +5039,7 @@
</span><span class="cx"> FAIL Window interface: attribute onbeforeprint assert_own_property: The global object must have a property "onbeforeprint" expected property "onbeforeprint" missing
</span><span class="cx"> PASS Window interface: attribute onbeforeunload
</span><span class="cx"> PASS Window interface: attribute onhashchange
</span><del>-FAIL Window interface: attribute onlanguagechange assert_own_property: The global object must have a property "onlanguagechange" expected property "onlanguagechange" missing
</del><ins>+PASS Window interface: attribute onlanguagechange
</ins><span class="cx"> PASS Window interface: attribute onmessage
</span><span class="cx"> PASS Window interface: attribute onoffline
</span><span class="cx"> PASS Window interface: attribute ononline
</span><span class="lines">@@ -5166,7 +5166,7 @@
</span><span class="cx"> FAIL Window interface: window must inherit property "onbeforeprint" with the proper type (99) assert_own_property: expected property "onbeforeprint" missing
</span><span class="cx"> PASS Window interface: window must inherit property "onbeforeunload" with the proper type (100)
</span><span class="cx"> PASS Window interface: window must inherit property "onhashchange" with the proper type (101)
</span><del>-FAIL Window interface: window must inherit property "onlanguagechange" with the proper type (102) assert_own_property: expected property "onlanguagechange" missing
</del><ins>+PASS Window interface: window must inherit property "onlanguagechange" with the proper type (102)
</ins><span class="cx"> PASS Window interface: window must inherit property "onmessage" with the proper type (103)
</span><span class="cx"> PASS Window interface: window must inherit property "onoffline" with the proper type (104)
</span><span class="cx"> PASS Window interface: window must inherit property "ononline" with the proper type (105)
</span><span class="lines">@@ -5717,7 +5717,7 @@
</span><span class="cx"> FAIL HTMLFrameSetElement interface: attribute onbeforeprint assert_true: The prototype object must have a property "onbeforeprint" expected true got false
</span><span class="cx"> PASS HTMLFrameSetElement interface: attribute onbeforeunload
</span><span class="cx"> PASS HTMLFrameSetElement interface: attribute onhashchange
</span><del>-FAIL HTMLFrameSetElement interface: attribute onlanguagechange assert_true: The prototype object must have a property "onlanguagechange" expected true got false
</del><ins>+PASS HTMLFrameSetElement interface: attribute onlanguagechange
</ins><span class="cx"> PASS HTMLFrameSetElement interface: attribute onmessage
</span><span class="cx"> PASS HTMLFrameSetElement interface: attribute onoffline
</span><span class="cx"> PASS HTMLFrameSetElement interface: attribute ononline
</span><span class="lines">@@ -5734,7 +5734,7 @@
</span><span class="cx"> FAIL HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onbeforeprint" with the proper type (3) assert_inherits: property "onbeforeprint" not found in prototype chain
</span><span class="cx"> PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onbeforeunload" with the proper type (4)
</span><span class="cx"> PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onhashchange" with the proper type (5)
</span><del>-FAIL HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onlanguagechange" with the proper type (6) assert_inherits: property "onlanguagechange" not found in prototype chain
</del><ins>+PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onlanguagechange" with the proper type (6)
</ins><span class="cx"> PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onmessage" with the proper type (7)
</span><span class="cx"> PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onoffline" with the proper type (8)
</span><span class="cx"> PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "ononline" with the proper type (9)
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlwebappapisscriptingeventseventhandlerattributesbodywindowexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -13,9 +13,7 @@
</span><span class="cx"> }" but got (undefined) undefined
</span><span class="cx"> PASS beforeunload
</span><span class="cx"> PASS hashchange
</span><del>-FAIL languagechange assert_equals: expected (function) function "function f() {
- return 0;
-}" but got (undefined) undefined
</del><ins>+PASS languagechange
</ins><span class="cx"> PASS message
</span><span class="cx"> PASS offline
</span><span class="cx"> PASS online
</span><span class="lines">@@ -34,7 +32,7 @@
</span><span class="cx"> FAIL beforeprint removal assert_equals: expected (object) null but got (undefined) undefined
</span><span class="cx"> PASS beforeunload removal
</span><span class="cx"> PASS hashchange removal
</span><del>-FAIL languagechange removal assert_equals: expected (object) null but got (undefined) undefined
</del><ins>+PASS languagechange removal
</ins><span class="cx"> PASS message removal
</span><span class="cx"> PASS offline removal
</span><span class="cx"> PASS online removal
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/Source/WebCore/ChangeLog        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -1,5 +1,33 @@
</span><span class="cx"> 2016-10-10 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Add support for languagechange event
+ https://bugs.webkit.org/show_bug.cgi?id=163222
+
+ Reviewed by Ryosuke Niwa.
+
+ 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:
+
+2016-10-10 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Update GamepadEvent to stop using legacy [ConstructorTemplate=Event]
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=163243
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventNames.h (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventNames.h        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/Source/WebCore/dom/EventNames.h        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -132,6 +132,7 @@
</span><span class="cx"> macro(keydown) \
</span><span class="cx"> macro(keypress) \
</span><span class="cx"> macro(keyup) \
</span><ins>+ macro(languagechange) \
</ins><span class="cx"> macro(levelchange) \
</span><span class="cx"> macro(load) \
</span><span class="cx"> macro(loadeddata) \
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAttributeNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAttributeNames.in        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -224,6 +224,7 @@
</span><span class="cx"> ongesturestart
</span><span class="cx"> ongesturechange
</span><span class="cx"> ongestureend
</span><ins>+onlanguagechange
</ins><span class="cx"> onload
</span><span class="cx"> onloadeddata
</span><span class="cx"> onloadedmetadata
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLBodyElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLBodyElement.cpp (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLBodyElement.cpp        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/Source/WebCore/html/HTMLBodyElement.cpp        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -113,6 +113,7 @@
</span><span class="cx"> &onfocusinAttr,
</span><span class="cx"> &onfocusoutAttr,
</span><span class="cx"> &onhashchangeAttr,
</span><ins>+ &onlanguagechangeAttr,
</ins><span class="cx"> &onloadAttr,
</span><span class="cx"> &onmessageAttr,
</span><span class="cx"> &onofflineAttr,
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/Source/WebCore/page/DOMWindow.cpp        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx"> #include "History.h"
</span><span class="cx"> #include "InspectorInstrumentation.h"
</span><span class="cx"> #include "JSMainThreadExecState.h"
</span><ins>+#include "Language.h"
</ins><span class="cx"> #include "Location.h"
</span><span class="cx"> #include "MainFrame.h"
</span><span class="cx"> #include "MediaQueryList.h"
</span><span class="lines">@@ -392,6 +393,11 @@
</span><span class="cx"> return page ? page->chrome().canRunModal() : false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static void languagesChangedCallback(void* context)
+{
+ static_cast<DOMWindow*>(context)->languagesChanged();
+}
+
</ins><span class="cx"> void DOMWindow::setCanShowModalDialogOverride(bool allow)
</span><span class="cx"> {
</span><span class="cx"> m_canShowModalDialogOverride = allow;
</span><span class="lines">@@ -416,6 +422,8 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(frame());
</span><span class="cx"> ASSERT(DOMWindow::document());
</span><ins>+
+ addLanguageChangeObserver(this, &languagesChangedCallback);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DOMWindow::didSecureTransitionTo(Document* document)
</span><span class="lines">@@ -464,6 +472,8 @@
</span><span class="cx"> if (m_gamepadEventListenerCount)
</span><span class="cx"> GamepadManager::singleton().unregisterDOMWindow(this);
</span><span class="cx"> #endif
</span><ins>+
+ removeLanguageChangeObserver(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> DOMWindow* DOMWindow::toDOMWindow()
</span><span class="lines">@@ -1888,6 +1898,12 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void DOMWindow::languagesChanged()
+{
+ if (auto* document = this->document())
+ document->enqueueWindowEvent(Event::create(eventNames().languagechangeEvent, false, false));
+}
+
</ins><span class="cx"> void DOMWindow::dispatchLoadEvent()
</span><span class="cx"> {
</span><span class="cx"> Ref<Event> loadEvent = Event::create(eventNames().loadEvent, false, false);
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.h (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.h        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/Source/WebCore/page/DOMWindow.h        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -245,6 +245,8 @@
</span><span class="cx"> void postMessageTimerFired(PostMessageTimer&);
</span><span class="cx"> void dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigin, Event&, PassRefPtr<Inspector::ScriptCallStack>);
</span><span class="cx">
</span><ins>+ void languagesChanged();
+
</ins><span class="cx"> void scrollBy(const ScrollToOptions&) const;
</span><span class="cx"> void scrollBy(double x, double y) const;
</span><span class="cx"> void scrollTo(const ScrollToOptions&) const;
</span></span></pre></div>
<a id="trunkSourceWebCorepageWindowEventHandlersidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/WindowEventHandlers.idl (207039 => 207040)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/WindowEventHandlers.idl        2016-10-11 03:39:05 UTC (rev 207039)
+++ trunk/Source/WebCore/page/WindowEventHandlers.idl        2016-10-11 04:33:56 UTC (rev 207040)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> // [WindowEventHandler] attribute EventHandler onbeforeprint;.
</span><span class="cx"> [WindowEventHandler] attribute EventHandler onbeforeunload;
</span><span class="cx"> [WindowEventHandler] attribute EventHandler onhashchange;
</span><del>- // [WindowEventHandler] attribute EventHandler onlanguagechange;.
</del><ins>+ [WindowEventHandler] attribute EventHandler onlanguagechange;
</ins><span class="cx"> [WindowEventHandler] attribute EventHandler onmessage;
</span><span class="cx"> [WindowEventHandler] attribute EventHandler onoffline;
</span><span class="cx"> [WindowEventHandler] attribute EventHandler ononline;
</span></span></pre>
</div>
</div>
</body>
</html>