<!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>[206109] 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/206109">206109</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-09-19 13:35:47 -0700 (Mon, 19 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Window's pageXOffset / pageYOffset attributes should be replaceable
https://bugs.webkit.org/show_bug.cgi?id=162046
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Rebaseline W3C test now that more checks are passing.
* web-platform-tests/html/browsers/the-window-object/window-properties-expected.txt:
Source/WebCore:
Window's pageXOffset / pageYOffset attributes should be replaceable as per:
- https://drafts.csswg.org/cssom-view/#extensions-to-the-window-interface
Firefox agrees with the specification.
No new tests, rebaselined existing test.
* page/DOMWindow.h:
* page/DOMWindow.idl:
LayoutTests:
Update existing tests to reflect behavior change.
* fast/dom/Window/get-set-properties-expected.txt:
* fast/dom/Window/get-set-properties.html:
* js/dom/var-declarations-shadowing-expected.txt:
* js/dom/var-declarations-shadowing.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="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowpropertiesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties-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="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowh">trunk/Source/WebCore/page/DOMWindow.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowidl">trunk/Source/WebCore/page/DOMWindow.idl</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMDOMWindowcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/LayoutTests/ChangeLog        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-09-19 Chris Dumez <cdumez@apple.com>
+
+ Window's pageXOffset / pageYOffset attributes should be replaceable
+ https://bugs.webkit.org/show_bug.cgi?id=162046
+
+ Reviewed by Darin Adler.
+
+ Update existing tests to reflect behavior change.
+
+ * fast/dom/Window/get-set-properties-expected.txt:
+ * fast/dom/Window/get-set-properties.html:
+ * js/dom/var-declarations-shadowing-expected.txt:
+ * js/dom/var-declarations-shadowing.html:
+
</ins><span class="cx"> 2016-09-19 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Scope sidebar shows "Closure" instead of "Local" when paused in anonymous function
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowgetsetpropertiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Window/get-set-properties-expected.txt (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/get-set-properties-expected.txt        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/LayoutTests/fast/dom/Window/get-set-properties-expected.txt        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -243,6 +243,10 @@
</span><span class="cx"> PASS: canSet('scrollX') should be 'true' and is.
</span><span class="cx"> PASS: canGet('scrollY') should be 'true' and is.
</span><span class="cx"> PASS: canSet('scrollY') should be 'true' and is.
</span><ins>+PASS: canGet('pageXOffset') should be 'true' and is.
+PASS: canSet('pageXOffset') should be 'true' and is.
+PASS: canGet('pageYOffset') should be 'true' and is.
+PASS: canSet('pageYOffset') should be 'true' and is.
</ins><span class="cx"> PASS: canGet('scrollbars') should be 'true' and is.
</span><span class="cx"> PASS: canSet('scrollbars') should be 'true' and is.
</span><span class="cx"> PASS: canGet('self') should be 'true' and is.
</span><span class="lines">@@ -262,10 +266,6 @@
</span><span class="cx"> PASS: canSet('history') should be 'false' and is.
</span><span class="cx"> PASS: canGet('navigator') should be 'true' and is.
</span><span class="cx"> PASS: canSet('navigator') should be 'false' and is.
</span><del>-PASS: canGet('pageXOffset') should be 'true' and is.
-PASS: canSet('pageXOffset') should be 'false' and is.
-PASS: canGet('pageYOffset') should be 'true' and is.
-PASS: canSet('pageYOffset') should be 'false' and is.
</del><span class="cx"> PASS: canGet('window') should be 'true' and is.
</span><span class="cx"> PASS: canSet('window') should be 'false' and is.
</span><span class="cx"> PASS: canGet('top') 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 (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/get-set-properties.html        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/LayoutTests/fast/dom/Window/get-set-properties.html        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -189,6 +189,8 @@
</span><span class="cx"> "screenY",
</span><span class="cx"> "scrollX",
</span><span class="cx"> "scrollY",
</span><ins>+ "pageXOffset",
+ "pageYOffset",
</ins><span class="cx"> "scrollbars",
</span><span class="cx"> "self",
</span><span class="cx"> "statusbar",
</span><span class="lines">@@ -200,8 +202,6 @@
</span><span class="cx"> "document",
</span><span class="cx"> "history",
</span><span class="cx"> "navigator",
</span><del>- "pageXOffset",
- "pageYOffset",
</del><span class="cx"> "window",
</span><span class="cx"> "top"
</span><span class="cx"> ];
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-09-19 Chris Dumez <cdumez@apple.com>
+
+ Window's pageXOffset / pageYOffset attributes should be replaceable
+ https://bugs.webkit.org/show_bug.cgi?id=162046
+
+ Reviewed by Darin Adler.
+
+ Rebaseline W3C test now that more checks are passing.
+
+ * web-platform-tests/html/browsers/the-window-object/window-properties-expected.txt:
+
</ins><span class="cx"> 2016-09-14 Jer Noble <jer.noble@apple.com>
</span><span class="cx">
</span><span class="cx"> [media-source] fix imported/w3c/web-platform-tests/media-source/mediasource-duration.html
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlbrowsersthewindowobjectwindowpropertiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties-expected.txt (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties-expected.txt        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties-expected.txt        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -156,8 +156,8 @@
</span><span class="cx"> PASS Window replaceable attribute: screen
</span><span class="cx"> PASS Window replaceable attribute: scrollX
</span><span class="cx"> PASS Window replaceable attribute: scrollY
</span><del>-FAIL Window replaceable attribute: pageXOffset assert_equals: expected "function" but got "undefined"
-FAIL Window replaceable attribute: pageYOffset assert_equals: expected "function" but got "undefined"
</del><ins>+PASS Window replaceable attribute: pageXOffset
+PASS Window replaceable attribute: pageYOffset
</ins><span class="cx"> PASS Window replaceable attribute: innerWidth
</span><span class="cx"> PASS Window replaceable attribute: innerHeight
</span><span class="cx"> PASS Window replaceable attribute: screenX
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomvardeclarationsshadowingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/var-declarations-shadowing-expected.txt (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/var-declarations-shadowing-expected.txt        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/LayoutTests/js/dom/var-declarations-shadowing-expected.txt        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -85,10 +85,10 @@
</span><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><del>-PASS: pageXOffset == marker should be false and is.
-PASS: eval('pageXOffset == marker') should be false and is.
-PASS: pageYOffset == marker should be false and is.
-PASS: eval('pageYOffset == marker') should be false and is.
</del><ins>+PASS: pageXOffset == marker should be true and is.
+PASS: eval('pageXOffset == marker') should be true and is.
+PASS: pageYOffset == marker should be true and is.
+PASS: eval('pageYOffset == marker') should be true and is.
</ins><span class="cx"> PASS: closed == marker should be false and is.
</span><span class="cx"> PASS: eval('closed == marker') should be false and is.
</span><span class="cx"> PASS: window == 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 (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/var-declarations-shadowing.html        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/LayoutTests/js/dom/var-declarations-shadowing.html        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -270,14 +270,14 @@
</span><span class="cx"> try {
</span><span class="cx"> eval("var pageXOffset = marker");
</span><span class="cx"> } catch(e) { }
</span><del>-shouldBe(pageXOffset == marker, "pageXOffset == marker", false);
-shouldBe(eval('pageXOffset == marker'), "eval('pageXOffset == marker')", false);
</del><ins>+shouldBe(pageXOffset == marker, "pageXOffset == marker", true);
+shouldBe(eval('pageXOffset == marker'), "eval('pageXOffset == marker')", true);
</ins><span class="cx">
</span><span class="cx"> try {
</span><span class="cx"> eval("var pageYOffset = marker");
</span><span class="cx"> } catch(e) { }
</span><del>-shouldBe(pageYOffset == marker, "pageYOffset == marker", false);
-shouldBe(eval('pageYOffset == marker'), "eval('pageYOffset == marker')", false);
</del><ins>+shouldBe(pageYOffset == marker, "pageYOffset == marker", true);
+shouldBe(eval('pageYOffset == marker'), "eval('pageYOffset == marker')", true);
</ins><span class="cx">
</span><span class="cx"> try {
</span><span class="cx"> eval("var closed = marker");
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/Source/WebCore/ChangeLog        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-09-19 Chris Dumez <cdumez@apple.com>
+
+ Window's pageXOffset / pageYOffset attributes should be replaceable
+ https://bugs.webkit.org/show_bug.cgi?id=162046
+
+ Reviewed by Darin Adler.
+
+ Window's pageXOffset / pageYOffset attributes should be replaceable as per:
+ - https://drafts.csswg.org/cssom-view/#extensions-to-the-window-interface
+
+ Firefox agrees with the specification.
+
+ No new tests, rebaselined existing test.
+
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+
</ins><span class="cx"> 2016-09-19 Commit Queue <commit-queue@webkit.org>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r206107.
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.h (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.h        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/Source/WebCore/page/DOMWindow.h        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -193,8 +193,6 @@
</span><span class="cx"> int screenTop() const { return screenY(); }
</span><span class="cx"> int scrollX() const;
</span><span class="cx"> int scrollY() const;
</span><del>- int pageXOffset() const { return scrollX(); }
- int pageYOffset() const { return scrollY(); }
</del><span class="cx">
</span><span class="cx"> bool closed() const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.idl (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.idl        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/Source/WebCore/page/DOMWindow.idl        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -94,11 +94,12 @@
</span><span class="cx"> [Replaceable] readonly attribute long screenY;
</span><span class="cx"> [Replaceable] readonly attribute long screenLeft;
</span><span class="cx"> [Replaceable] readonly attribute long screenTop;
</span><del>- [Replaceable] readonly attribute long scrollX;
- [Replaceable] readonly attribute long scrollY;
- readonly attribute long pageXOffset;
- readonly attribute long pageYOffset;
</del><span class="cx">
</span><ins>+ [Replaceable] readonly attribute double scrollX;
+ [Replaceable] readonly attribute double scrollY;
+ [Replaceable, ImplementedAs=scrollX] readonly attribute double pageXOffset;
+ [Replaceable, ImplementedAs=scrollY] readonly attribute double pageYOffset;
+
</ins><span class="cx"> void scrollBy(unrestricted double x, unrestricted double y);
</span><span class="cx"> void scrollTo(unrestricted double x, unrestricted double y);
</span><span class="cx"> [ImplementedAs=scrollTo] void scroll(unrestricted double x, unrestricted double y);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp (206108 => 206109)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp        2016-09-19 20:22:16 UTC (rev 206108)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp        2016-09-19 20:35:47 UTC (rev 206109)
</span><span class="lines">@@ -860,7 +860,7 @@
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><span class="cx"> g_return_val_if_fail(WEBKIT_DOM_IS_DOM_WINDOW(self), 0);
</span><span class="cx"> WebCore::DOMWindow* item = WebKit::core(self);
</span><del>- glong result = item->pageXOffset();
</del><ins>+ glong result = item->scrollX();
</ins><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -869,7 +869,7 @@
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><span class="cx"> g_return_val_if_fail(WEBKIT_DOM_IS_DOM_WINDOW(self), 0);
</span><span class="cx"> WebCore::DOMWindow* item = WebKit::core(self);
</span><del>- glong result = item->pageYOffset();
</del><ins>+ glong result = item->scrollY();
</ins><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>