<!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>[196797] 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/196797">196797</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-02-18 21:17:32 -0800 (Thu, 18 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>window.history / window.navigator should not be replaceable
https://bugs.webkit.org/show_bug.cgi?id=154412

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

window.history / window.navigator should not be replaceable as per
the latest HTML specification:
https://html.spec.whatwg.org/multipage/browsers.html#the-window-object

Firefox and Chrome already match the specification. This patch aligns
our behavior.

No new tests, already covered by existing tests.

* page/DOMWindow.idl:

LayoutTests:

Update / rebaseline existing tests now that window.history and
window.navigator are no longer replaceable.

* fast/dom/Window/get-set-properties-expected.txt:
* fast/dom/Window/get-set-properties.html:
* fast/dom/Window/window-property-shadowing-expected.txt:
* fast/dom/Window/window-property-shadowing.html:
* http/tests/history/cross-origin-replace-history-object-child-expected.txt:
* http/tests/history/resources/cross-origin-replaces-history-object-child-iframe.html:
* js/dom/var-declarations-shadowing-expected.txt:
* js/dom/var-declarations-shadowing.html:
* js/getOwnPropertyDescriptor-window-attributes-expected.txt:
* js/getOwnPropertyDescriptor-window-attributes.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowgetsetpropertiesexpectedtxt">trunk/LayoutTests/fast/dom/Window/get-set-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowgetsetpropertieshtml">trunk/LayoutTests/fast/dom/Window/get-set-properties.html</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowwindowpropertyshadowingexpectedtxt">trunk/LayoutTests/fast/dom/Window/window-property-shadowing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowwindowpropertyshadowinghtml">trunk/LayoutTests/fast/dom/Window/window-property-shadowing.html</a></li>
<li><a href="#trunkLayoutTestshttptestshistorycrossoriginreplacehistoryobjectchildexpectedtxt">trunk/LayoutTests/http/tests/history/cross-origin-replace-history-object-child-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestshistoryresourcescrossoriginreplaceshistoryobjectchildiframehtml">trunk/LayoutTests/http/tests/history/resources/cross-origin-replaces-history-object-child-iframe.html</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="#trunkLayoutTestsjsdomvardeclarationsshadowingexpectedtxt">trunk/LayoutTests/js/dom/var-declarations-shadowing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomvardeclarationsshadowinghtml">trunk/LayoutTests/js/dom/var-declarations-shadowing.html</a></li>
<li><a href="#trunkLayoutTestsjsgetOwnPropertyDescriptorwindowattributesexpectedtxt">trunk/LayoutTests/js/getOwnPropertyDescriptor-window-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsgetOwnPropertyDescriptorwindowattributeshtml">trunk/LayoutTests/js/getOwnPropertyDescriptor-window-attributes.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowidl">trunk/Source/WebCore/page/DOMWindow.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/ChangeLog        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-02-18  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        window.history / window.navigator should not be replaceable
+        https://bugs.webkit.org/show_bug.cgi?id=154412
+
+        Reviewed by Ryosuke Niwa.
+
+        Update / rebaseline existing tests now that window.history and
+        window.navigator are no longer replaceable.
+
+        * fast/dom/Window/get-set-properties-expected.txt:
+        * fast/dom/Window/get-set-properties.html:
+        * fast/dom/Window/window-property-shadowing-expected.txt:
+        * fast/dom/Window/window-property-shadowing.html:
+        * http/tests/history/cross-origin-replace-history-object-child-expected.txt:
+        * http/tests/history/resources/cross-origin-replaces-history-object-child-iframe.html:
+        * js/dom/var-declarations-shadowing-expected.txt:
+        * js/dom/var-declarations-shadowing.html:
+        * js/getOwnPropertyDescriptor-window-attributes-expected.txt:
+        * js/getOwnPropertyDescriptor-window-attributes.html:
+
</ins><span class="cx"> 2016-02-18  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Wheel event callback removing the window causes crash in WebCore.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowgetsetpropertiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Window/get-set-properties-expected.txt (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/get-set-properties-expected.txt        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/fast/dom/Window/get-set-properties-expected.txt        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -207,8 +207,6 @@
</span><span class="cx"> PASS: canSet('event') should be 'true' and is.
</span><span class="cx"> PASS: canGet('frames') should be 'true' and is.
</span><span class="cx"> PASS: canSet('frames') should be 'true' and is.
</span><del>-PASS: canGet('history') should be 'true' and is.
-PASS: canSet('history') should be 'true' and is.
</del><span class="cx"> PASS: canGet('innerHeight') should be 'true' and is.
</span><span class="cx"> PASS: canSet('innerHeight') should be 'true' and is.
</span><span class="cx"> PASS: canGet('innerWidth') should be 'true' and is.
</span><span class="lines">@@ -219,8 +217,6 @@
</span><span class="cx"> PASS: canSet('locationbar') should be 'true' and is.
</span><span class="cx"> PASS: canGet('menubar') should be 'true' and is.
</span><span class="cx"> PASS: canSet('menubar') should be 'true' and is.
</span><del>-PASS: canGet('navigator') should be 'true' and is.
-PASS: canSet('navigator') should be 'true' and is.
</del><span class="cx"> PASS: canGet('offscreenBuffering') should be 'true' and is.
</span><span class="cx"> PASS: canSet('offscreenBuffering') should be 'true' and is.
</span><span class="cx"> PASS: canGet('opener') should be 'true' and is.
</span><span class="lines">@@ -260,6 +256,10 @@
</span><span class="cx"> PASS: canSet('closed') should be 'false' and is.
</span><span class="cx"> PASS: canGet('document') should be 'true' and is.
</span><span class="cx"> PASS: canSet('document') should be 'false' and is.
</span><ins>+PASS: canGet('history') should be 'true' and is.
+PASS: canSet('history') should be 'false' and is.
+PASS: canGet('navigator') should be 'true' and is.
+PASS: canSet('navigator') should be 'false' and is.
</ins><span class="cx"> PASS: canGet('pageXOffset') should be 'true' and is.
</span><span class="cx"> PASS: canSet('pageXOffset') should be 'false' and is.
</span><span class="cx"> PASS: canGet('pageYOffset') should be 'true' and is.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowgetsetpropertieshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Window/get-set-properties.html (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/get-set-properties.html        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/fast/dom/Window/get-set-properties.html        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -171,13 +171,11 @@
</span><span class="cx">     &quot;devicePixelRatio&quot;, 
</span><span class="cx">     &quot;event&quot;, 
</span><span class="cx">     &quot;frames&quot;,
</span><del>-    &quot;history&quot;,
</del><span class="cx">     &quot;innerHeight&quot;, 
</span><span class="cx">     &quot;innerWidth&quot;, 
</span><span class="cx">     &quot;length&quot;,
</span><span class="cx">     &quot;locationbar&quot;, 
</span><span class="cx">     &quot;menubar&quot;, 
</span><del>-    &quot;navigator&quot;, 
</del><span class="cx">     &quot;offscreenBuffering&quot;, 
</span><span class="cx">     &quot;opener&quot;,
</span><span class="cx">     &quot;outerHeight&quot;, 
</span><span class="lines">@@ -199,6 +197,8 @@
</span><span class="cx"> var windowReadOnlyProperties = [
</span><span class="cx">     &quot;closed&quot;,
</span><span class="cx">     &quot;document&quot;,
</span><ins>+    &quot;history&quot;,
+    &quot;navigator&quot;,
</ins><span class="cx">     &quot;pageXOffset&quot;,
</span><span class="cx">     &quot;pageYOffset&quot;,
</span><span class="cx">     &quot;window&quot;,
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowpropertyshadowingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Window/window-property-shadowing-expected.txt (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-property-shadowing-expected.txt        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/fast/dom/Window/window-property-shadowing-expected.txt        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS: innerWidth successfully shadowed
</span><span class="cx"> PASS: length successfully shadowed
</span><span class="cx"> PASS: name successfully shadowed
</span><del>-PASS: navigator successfully shadowed
</del><ins>+PASS: navigator was not shadowed
</ins><span class="cx"> PASS: clientInformation successfully shadowed
</span><span class="cx"> PASS: screen successfully shadowed
</span><span class="cx"> PASS: offscreenBuffering successfully shadowed
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> PASS: scrollX successfully shadowed
</span><span class="cx"> PASS: scrollY successfully shadowed
</span><span class="cx"> PASS: self successfully shadowed
</span><del>-PASS: history successfully shadowed
</del><ins>+PASS: history was not shadowed
</ins><span class="cx"> PASS: getSelection successfully shadowed
</span><span class="cx"> PASS: getComputedStyle successfully shadowed
</span><span class="cx"> PASS: getMatchedCSSRules successfully shadowed
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowpropertyshadowinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Window/window-property-shadowing.html (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-property-shadowing.html        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/fast/dom/Window/window-property-shadowing.html        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">         var name = 1;
</span><span class="cx">         log(name == 1 ? &quot;PASS: name successfully shadowed&quot; : &quot;FAIL: name was not shadowed&quot;);
</span><span class="cx">         var navigator = 1;
</span><del>-        log(navigator == 1 ? &quot;PASS: navigator successfully shadowed&quot; : &quot;FAIL: navigator was not shadowed&quot;);
</del><ins>+        log(navigator == 1 ? &quot;FAIL: navigator successfully shadowed&quot; : &quot;PASS: navigator was not shadowed&quot;);
</ins><span class="cx">         var clientInformation = 1;
</span><span class="cx">         log(clientInformation == 1 ? &quot;PASS: clientInformation successfully shadowed&quot; : &quot;FAIL: clientInformation was not shadowed&quot;);
</span><span class="cx">         var screen = 1;
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">         var self = 1;
</span><span class="cx">         log(self == 1 ? &quot;PASS: self successfully shadowed&quot; : &quot;FAIL: self was not shadowed&quot;);
</span><span class="cx">         var history = 1;
</span><del>-        log(history == 1 ? &quot;PASS: history successfully shadowed&quot; : &quot;FAIL: history was not shadowed&quot;);
</del><ins>+        log(history == 1 ? &quot;FAIL: history successfully shadowed&quot; : &quot;PASS: history was not shadowed&quot;);
</ins><span class="cx"> 
</span><span class="cx">         // Window functions
</span><span class="cx">         var getSelection = 1;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestshistorycrossoriginreplacehistoryobjectchildexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/history/cross-origin-replace-history-object-child-expected.txt (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/history/cross-origin-replace-history-object-child-expected.txt        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/http/tests/history/cross-origin-replace-history-object-child-expected.txt        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> CONSOLE MESSAGE: line 30: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</span><span class="cx"> ALERT: Child window's history object before attempt to clear: undefined
</span><span class="cx"> ALERT: About to shadow child window's history object: [object History]
</span><del>-ALERT: Shadowed child window's history object: 
</del><ins>+ALERT: PASS: Could not shadow child window's history object: [object History]
</ins><span class="cx"> CONSOLE MESSAGE: line 18: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</span><span class="cx"> ALERT: Child window's history object after attempt to clear: undefined
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestshistoryresourcescrossoriginreplaceshistoryobjectchildiframehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/history/resources/cross-origin-replaces-history-object-child-iframe.html (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/history/resources/cross-origin-replaces-history-object-child-iframe.html        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/http/tests/history/resources/cross-origin-replaces-history-object-child-iframe.html        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -16,7 +16,10 @@
</span><span class="cx"> {
</span><span class="cx">     alert(&quot;About to shadow child window's history object: &quot; + window.history);
</span><span class="cx">     window.history = &quot;&quot;;
</span><del>-    alert(&quot;Shadowed child window's history object: &quot; + window.history);
</del><ins>+    if (window.history === &quot;&quot;)
+        alert(&quot;FAIL: Shadowed child window's history object: &quot; + window.history);
+    else
+        alert(&quot;PASS: Could not shadow child window's history object: &quot; + window.history);
</ins><span class="cx">     parent.window.postMessage(&quot;done&quot;, &quot;*&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2016-02-18  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        window.history / window.navigator should not be replaceable
+        https://bugs.webkit.org/show_bug.cgi?id=154412
+
+        Reviewed by Ryosuke Niwa.
+
+        Rebaseline now that more checks are passing.
+
+        * web-platform-tests/html/dom/interfaces-expected.txt:
+
+2016-02-18  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         HTMLTableHeaderCellElement.scope should only return known values
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=154423
</span><span class="cx">         &lt;rdar://problem/24731018&gt;
</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 (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -3814,9 +3814,7 @@
</span><span class="cx"> PASS Window interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
</span><span class="cx"> PASS Window interface: attribute self 
</span><span class="cx"> PASS Window interface: attribute name 
</span><del>-FAIL Window interface: attribute history assert_equals: setter must be undefined for readonly attributes expected (undefined) undefined but got (function) function &quot;function history() {
-    [native code]
-}&quot;
</del><ins>+PASS Window interface: attribute history 
</ins><span class="cx"> PASS Window interface: attribute locationbar 
</span><span class="cx"> PASS Window interface: attribute menubar 
</span><span class="cx"> PASS Window interface: attribute personalbar 
</span><span class="lines">@@ -3835,9 +3833,7 @@
</span><span class="cx"> PASS Window interface: attribute parent 
</span><span class="cx"> PASS Window interface: attribute frameElement 
</span><span class="cx"> FAIL Window interface: operation open(DOMString,DOMString,DOMString,boolean) assert_equals: property has wrong .length expected 0 but got 2
</span><del>-FAIL Window interface: attribute navigator assert_equals: setter must be undefined for readonly attributes expected (undefined) undefined but got (function) function &quot;function navigator() {
-    [native code]
-}&quot;
</del><ins>+PASS Window interface: attribute navigator 
</ins><span class="cx"> FAIL Window interface: attribute external assert_own_property: The global object must have a property &quot;external&quot; expected property &quot;external&quot; missing
</span><span class="cx"> PASS Window interface: attribute applicationCache 
</span><span class="cx"> PASS Window interface: operation alert() 
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomvardeclarationsshadowingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/var-declarations-shadowing-expected.txt (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/var-declarations-shadowing-expected.txt        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/js/dom/var-declarations-shadowing-expected.txt        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -68,8 +68,8 @@
</span><span class="cx"> PASS: eval('devicePixelRatio == marker') should be true and is.
</span><span class="cx"> PASS: devicePixelRatio == marker should be true and is.
</span><span class="cx"> PASS: eval('devicePixelRatio == marker') should be true and is.
</span><del>-PASS: navigator == marker should be true and is.
-PASS: eval('navigator == marker') should be true and is.
</del><ins>+PASS: navigator == marker should be false and is.
+PASS: eval('navigator == marker') should be false and is.
</ins><span class="cx"> PASS: clientInformation == marker should be true and is.
</span><span class="cx"> PASS: eval('clientInformation == marker') should be true and is.
</span><span class="cx"> PASS: status == marker should be true and is.
</span><span class="lines">@@ -80,8 +80,8 @@
</span><span class="cx"> PASS: eval('defaultstatus == marker') should be true and is.
</span><span class="cx"> PASS: screen == marker should be true and is.
</span><span class="cx"> PASS: eval('screen == marker') should be true and is.
</span><del>-PASS: history == marker should be true and is.
-PASS: eval('history == marker') should be true and is.
</del><ins>+PASS: history == marker should be false and is.
+PASS: eval('history == marker') should be false and is.
</ins><span class="cx"> -----
</span><span class="cx"> PASS: frameElement == marker should be false and is.
</span><span class="cx"> PASS: eval('frameElement == marker') should be false and is.
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomvardeclarationsshadowinghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/var-declarations-shadowing.html (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/var-declarations-shadowing.html        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/js/dom/var-declarations-shadowing.html        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -220,8 +220,8 @@
</span><span class="cx"> try {
</span><span class="cx">     eval(&quot;var navigator = marker&quot;);
</span><span class="cx"> } catch(e) { }
</span><del>-shouldBe(navigator == marker, &quot;navigator == marker&quot;, true);
-shouldBe(eval('navigator == marker'), &quot;eval('navigator == marker')&quot;, true);
</del><ins>+shouldBe(navigator == marker, &quot;navigator == marker&quot;, false);
+shouldBe(eval('navigator == marker'), &quot;eval('navigator == marker')&quot;, false);
</ins><span class="cx"> 
</span><span class="cx"> try {
</span><span class="cx">     eval(&quot;var clientInformation = marker&quot;);
</span><span class="lines">@@ -256,8 +256,8 @@
</span><span class="cx"> try {
</span><span class="cx">     eval(&quot;var history = marker&quot;);
</span><span class="cx"> } catch(e) { }
</span><del>-shouldBe(history == marker, &quot;history == marker&quot;, true);
-shouldBe(eval('history == marker'), &quot;eval('history == marker')&quot;, true);
</del><ins>+shouldBe(history == marker, &quot;history == marker&quot;, false);
+shouldBe(eval('history == marker'), &quot;eval('history == marker')&quot;, false);
</ins><span class="cx"> 
</span><span class="cx"> log(&quot;-----&quot;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsjsgetOwnPropertyDescriptorwindowattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/getOwnPropertyDescriptor-window-attributes-expected.txt (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/getOwnPropertyDescriptor-window-attributes-expected.txt        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/js/getOwnPropertyDescriptor-window-attributes-expected.txt        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> 
</span><span class="cx"> * Window.navigator
</span><span class="cx"> PASS descriptor.get is an instance of Function
</span><del>-PASS descriptor.set is an instance of Function
</del><ins>+PASS descriptor.set is undefined.
</ins><span class="cx"> PASS descriptor.enumerable is true
</span><span class="cx"> PASS descriptor.configurable is true
</span><span class="cx"> PASS descriptor.get.call(nonWindowObject) threw exception TypeError: The DOMWindow.navigator getter can only be used on instances of DOMWindow.
</span></span></pre></div>
<a id="trunkLayoutTestsjsgetOwnPropertyDescriptorwindowattributeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/getOwnPropertyDescriptor-window-attributes.html (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/getOwnPropertyDescriptor-window-attributes.html        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/LayoutTests/js/getOwnPropertyDescriptor-window-attributes.html        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> debug(&quot;&quot;);
</span><span class="cx"> debug(&quot;* Window.navigator&quot;);
</span><span class="cx"> descriptor = Object.getOwnPropertyDescriptor(window, &quot;navigator&quot;);
</span><del>-checkWindowPropertyDescriptor(descriptor, false);
</del><ins>+checkWindowPropertyDescriptor(descriptor, true);
</ins><span class="cx"> shouldBeTrue(&quot;descriptor.get.call(window) === window.navigator&quot;);
</span><span class="cx"> shouldBeTrue(&quot;descriptor.get.call() === window.navigator&quot;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/Source/WebCore/ChangeLog        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -1,5 +1,23 @@
</span><span class="cx"> 2016-02-18  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        window.history / window.navigator should not be replaceable
+        https://bugs.webkit.org/show_bug.cgi?id=154412
+
+        Reviewed by Ryosuke Niwa.
+
+        window.history / window.navigator should not be replaceable as per
+        the latest HTML specification:
+        https://html.spec.whatwg.org/multipage/browsers.html#the-window-object
+
+        Firefox and Chrome already match the specification. This patch aligns
+        our behavior.
+
+        No new tests, already covered by existing tests.
+
+        * page/DOMWindow.idl:
+
+2016-02-18  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         HTMLTableHeaderCellElement.scope should only return known values
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=154423
</span><span class="cx">         &lt;rdar://problem/24731018&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.idl (196796 => 196797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.idl        2016-02-19 05:12:02 UTC (rev 196796)
+++ trunk/Source/WebCore/page/DOMWindow.idl        2016-02-19 05:17:32 UTC (rev 196797)
</span><span class="lines">@@ -40,14 +40,14 @@
</span><span class="cx"> ] interface DOMWindow : EventTarget {
</span><span class="cx">     // DOM Level 0
</span><span class="cx">     [Replaceable] readonly attribute Screen screen;
</span><del>-    [Replaceable] readonly attribute History history;
</del><ins>+    readonly attribute History history;
</ins><span class="cx">     [Replaceable] readonly attribute BarProp locationbar;
</span><span class="cx">     [Replaceable] readonly attribute BarProp menubar;
</span><span class="cx">     [Replaceable] readonly attribute BarProp personalbar;
</span><span class="cx">     [Replaceable] readonly attribute BarProp scrollbars;
</span><span class="cx">     [Replaceable] readonly attribute BarProp statusbar;
</span><span class="cx">     [Replaceable] readonly attribute BarProp toolbar;
</span><del>-    [Replaceable] readonly attribute Navigator navigator;
</del><ins>+    readonly attribute Navigator navigator;
</ins><span class="cx">     [Replaceable] readonly attribute Navigator clientInformation;
</span><span class="cx">     readonly attribute Crypto crypto;
</span><span class="cx">     [DoNotCheckSecurity, CustomSetter, Unforgeable] attribute Location location;
</span></span></pre>
</div>
</div>

</body>
</html>