Diff
Modified: trunk/LayoutTests/ChangeLog (235805 => 235806)
--- trunk/LayoutTests/ChangeLog 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/ChangeLog 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1,3 +1,39 @@
+2018-09-07 Frederic Wang <[email protected]>
+
+ [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
+ https://bugs.webkit.org/show_bug.cgi?id=182230
+
+ Reviewed by Simon Fraser.
+
+ This commit updates some tests to work when CSSOMViewScrollingAPI is enabled.
+
+ * TestExpectations: Enable web-platform-tests/cssom-view/scrollingElement.html.
+ * fast/dom/Document/scrollingElement-quirks-mode.html: Do not enable explictly enable
+ CSSOMViewScrollingAPI.
+ * fast/dom/Document/scrollingElement-standards-mode.html: Ditto.
+ * fast/dom/Element/body-scrollLeft-expected.txt: Updated to follow the CSSOMView spec.
+ * fast/dom/Element/body-scrollLeft.html: Ditto.
+ * fast/dom/Element/body-scrollTop-expected.txt: Ditto.
+ * fast/dom/Element/body-scrollTop.html: Ditto.
+ * fast/dom/Element/documentElement-scrollLeft-expected.txt: Ditto.
+ * fast/dom/Element/documentElement-scrollLeft.html: Ditto.
+ * fast/dom/Element/documentElement-scrollTop-expected.txt: Ditto.
+ * fast/dom/Element/documentElement-scrollTop.html: Ditto.
+ * fast/dom/Element/scrollLeft-expected.txt: Ditto.
+ * fast/dom/Element/scrollLeft.html: Ditto.
+ * fast/dom/Element/scrollTop-expected.txt: Ditto.
+ * fast/dom/Element/scrollTop.html: Ditto.
+ * fast/dom/Element/scrolling-funtions-on-body-expected.txt: Ditto.
+ * fast/dom/Element/scrolling-funtions-on-body.html: Ditto.
+ * platform/ios/TestExpectations: Add expectation for one WPT test that was already failing
+ on iOS.
+ * platform/ios/ios/fast/coordinates/page-offsets-expected.txt: Use documentElement instead
+ of body for this test when running in standard mode.
+ * platform/ios/ios/fast/coordinates/resources/helpers.js: Ditto.
+ (verifyScrollOffsets):
+ * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html: Use
+ document.scrollingElement instead of document.body to access viewport scroll offset.
+
2018-09-07 Zalan Bujtas <[email protected]>
[iOS] Unreviewed test gardening.
Modified: trunk/LayoutTests/TestExpectations (235805 => 235806)
--- trunk/LayoutTests/TestExpectations 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/TestExpectations 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1892,9 +1892,6 @@
# Test only works on iOS WK2. webkit.org/b/165535
fast/forms/range/range-remove-on-drag.html [ Skip ]
-# CSSOM View module
-webkit.org/b/5991 imported/w3c/web-platform-tests/css/cssom-view/scrollingElement.html [ Skip ]
-
# FileAPI
webkit.org/b/172099 imported/w3c/web-platform-tests/FileAPI/url/url_xmlhttprequest_img.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/FileAPI/url/sandboxed-iframe.html [ Failure ]
Modified: trunk/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html 2018-09-07 21:12:41 UTC (rev 235806)
@@ -5,8 +5,6 @@
</head>
<body>
<script>
-if (window.internals)
- internals.settings.setCSSOMViewScrollingAPIEnabled(true);
description("Tests the behavior of document.scrollingElement in quirks mode.");
Modified: trunk/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html 2018-09-07 21:12:41 UTC (rev 235806)
@@ -6,8 +6,6 @@
</head>
<body>
<script>
-if (window.internals)
- internals.settings.setCSSOMViewScrollingAPIEnabled(true);
description("Tests the behavior of document.scrollingElement in standards mode.");
Modified: trunk/LayoutTests/fast/dom/Element/body-scrollLeft-expected.txt (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/body-scrollLeft-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/body-scrollLeft-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -6,7 +6,7 @@
PASS successfullyParsed is true
TEST COMPLETE
-PASS document.body.scrollLeft is 500
+PASS document.body.scrollLeft is 0
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/Element/body-scrollLeft.html (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/body-scrollLeft.html 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/body-scrollLeft.html 2018-09-07 21:12:41 UTC (rev 235806)
@@ -12,8 +12,8 @@
function runTest() {
description('Tests that for non-standard mode document.body.scrollLeft returns the scroll left value as 0');
- document.body.scrollLeft = 500;
- shouldBe("document.body.scrollLeft","500");
+ document.body.scrollLeft = 0;
+ shouldBe("document.body.scrollLeft","0");
isSuccessfullyParsed();
}
</script>
Modified: trunk/LayoutTests/fast/dom/Element/body-scrollTop-expected.txt (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/body-scrollTop-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/body-scrollTop-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -6,7 +6,7 @@
PASS successfullyParsed is true
TEST COMPLETE
-PASS document.body.scrollTop is 500
+PASS document.body.scrollTop is 0
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/Element/body-scrollTop.html (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/body-scrollTop.html 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/body-scrollTop.html 2018-09-07 21:12:41 UTC (rev 235806)
@@ -13,7 +13,7 @@
description('Tests that for non-standard mode document.body.scrollTop returns the scroll top value as 0');
document.body.scrollTop = 500;
- shouldBe("document.body.scrollTop","500");
+ shouldBe("document.body.scrollTop","0");
isSuccessfullyParsed();
}
</script>
Modified: trunk/LayoutTests/fast/dom/Element/documentElement-scrollLeft-expected.txt (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/documentElement-scrollLeft-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/documentElement-scrollLeft-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -6,7 +6,7 @@
PASS successfullyParsed is true
TEST COMPLETE
-PASS document.documentElement.scrollLeft is 0
+PASS document.documentElement.scrollLeft is 500
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/Element/documentElement-scrollLeft.html (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/documentElement-scrollLeft.html 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/documentElement-scrollLeft.html 2018-09-07 21:12:41 UTC (rev 235806)
@@ -13,7 +13,7 @@
description('Tests that for standard mode document.documentElement.scrollLeft returns the scroll left value');
document.documentElement.scrollLeft = 500;
- shouldBe("document.documentElement.scrollLeft","0");
+ shouldBe("document.documentElement.scrollLeft","500");
isSuccessfullyParsed();
}
</script>
Modified: trunk/LayoutTests/fast/dom/Element/documentElement-scrollTop-expected.txt (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/documentElement-scrollTop-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/documentElement-scrollTop-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS document.documentElement.scrollTop is 0
+PASS document.documentElement.scrollTop is 500
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/Element/documentElement-scrollTop.html (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/documentElement-scrollTop.html 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/documentElement-scrollTop.html 2018-09-07 21:12:41 UTC (rev 235806)
@@ -13,7 +13,7 @@
description('Tests that for standard mode document.documentElement.scrollTop returns the scroll top value');
document.documentElement.scrollTop = 500;
- shouldBe("document.documentElement.scrollTop","0");
+ shouldBe("document.documentElement.scrollTop","500");
isSuccessfullyParsed();
}
</script>
Modified: trunk/LayoutTests/fast/dom/Element/scrollLeft-expected.txt (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/scrollLeft-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/scrollLeft-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -4,8 +4,8 @@
PASS window.pageXOffset is 500
-PASS document.body.scrollLeft is 500
-PASS document.documentElement.scrollLeft is 0
+PASS document.body.scrollLeft is 0
+PASS document.documentElement.scrollLeft is 500
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/Element/scrollLeft.html (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/scrollLeft.html 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/scrollLeft.html 2018-09-07 21:12:41 UTC (rev 235806)
@@ -15,8 +15,8 @@
setTimeout(function() {
window.scrollTo(500,0);
shouldBe("window.pageXOffset","500");
- shouldBe("document.body.scrollLeft","500");
- shouldBe("document.documentElement.scrollLeft","0");
+ shouldBe("document.body.scrollLeft","0");
+ shouldBe("document.documentElement.scrollLeft","500");
finishJSTest();
}, 0);
}
Modified: trunk/LayoutTests/fast/dom/Element/scrollTop-expected.txt (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/scrollTop-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/scrollTop-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -4,8 +4,8 @@
PASS window.pageYOffset is 500
-PASS document.body.scrollTop is 500
-PASS document.documentElement.scrollTop is 0
+PASS document.body.scrollTop is 0
+PASS document.documentElement.scrollTop is 500
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/Element/scrollTop.html (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/scrollTop.html 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/scrollTop.html 2018-09-07 21:12:41 UTC (rev 235806)
@@ -15,8 +15,8 @@
setTimeout(function() {
window.scrollTo(0,500);
shouldBe("window.pageYOffset","500");
- shouldBe("document.body.scrollTop","500");
- shouldBe("document.documentElement.scrollTop","0");
+ shouldBe("document.body.scrollTop","0");
+ shouldBe("document.documentElement.scrollTop","500");
finishJSTest();
}, 0);
}
Modified: trunk/LayoutTests/fast/dom/Element/scrolling-funtions-on-body-expected.txt (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/scrolling-funtions-on-body-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/scrolling-funtions-on-body-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1,20 +1,20 @@
-Tests scrollTo/By(x,y) and scrollTo/By(scrollOptions) on the body. WebKit always uses quirks mode for body scrolling behavior, so this scrolls the window.
+Tests scrollTo/By(x,y) and scrollTo/By(scrollOptions) on the body in standard mode.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS scroller.scrollLeft is 20
-PASS scroller.scrollTop is 500
-PASS window.scrollX is 20
-PASS window.scrollY is 500
-PASS scroller.scrollLeft is 70
-PASS scroller.scrollTop is 560
-PASS window.scrollX is 70
-PASS window.scrollY is 560
-PASS scroller.scrollLeft is 100
-PASS scroller.scrollTop is 400
-PASS window.scrollX is 100
-PASS window.scrollY is 400
+PASS scroller.scrollLeft is 0
+PASS scroller.scrollTop is 0
+PASS window.scrollX is 0
+PASS window.scrollY is 0
+PASS scroller.scrollLeft is 0
+PASS scroller.scrollTop is 0
+PASS window.scrollX is 0
+PASS window.scrollY is 0
+PASS scroller.scrollLeft is 0
+PASS scroller.scrollTop is 0
+PASS window.scrollX is 0
+PASS window.scrollY is 0
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/Element/scrolling-funtions-on-body.html (235805 => 235806)
--- trunk/LayoutTests/fast/dom/Element/scrolling-funtions-on-body.html 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/fast/dom/Element/scrolling-funtions-on-body.html 2018-09-07 21:12:41 UTC (rev 235806)
@@ -11,27 +11,27 @@
<script>
var scroller;
function runTest() {
- description('Tests scrollTo/By(x,y) and scrollTo/By(scrollOptions) on the body. WebKit always uses quirks mode for body scrolling behavior, so this scrolls the window.');
+ description('Tests scrollTo/By(x,y) and scrollTo/By(scrollOptions) on the body in standard mode.');
scroller = document.body;
setTimeout(function() {
scroller.scrollTo(20, 500);
- shouldBe("scroller.scrollLeft", "20");
- shouldBe("scroller.scrollTop", "500");
- shouldBe("window.scrollX", "20");
- shouldBe("window.scrollY", "500");
+ shouldBe("scroller.scrollLeft", "0");
+ shouldBe("scroller.scrollTop", "0");
+ shouldBe("window.scrollX", "0");
+ shouldBe("window.scrollY", "0");
scroller.scrollBy(50, 60);
- shouldBe("scroller.scrollLeft", "70");
- shouldBe("scroller.scrollTop", "560");
- shouldBe("window.scrollX", "70");
- shouldBe("window.scrollY", "560");
+ shouldBe("scroller.scrollLeft", "0");
+ shouldBe("scroller.scrollTop", "0");
+ shouldBe("window.scrollX", "0");
+ shouldBe("window.scrollY", "0");
scroller.scrollTo({ 'left' : 100, 'top' : 400 });
- shouldBe("scroller.scrollLeft", "100");
- shouldBe("scroller.scrollTop", "400");
- shouldBe("window.scrollX", "100");
- shouldBe("window.scrollY", "400");
+ shouldBe("scroller.scrollLeft", "0");
+ shouldBe("scroller.scrollTop", "0");
+ shouldBe("window.scrollX", "0");
+ shouldBe("window.scrollY", "0");
scroller.scrollTo(0, 0);
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (235805 => 235806)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1,3 +1,17 @@
+2018-09-07 Frederic Wang <[email protected]>
+
+ [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
+ https://bugs.webkit.org/show_bug.cgi?id=182230
+
+ Reviewed by Simon Fraser.
+
+ This commit updates expectations for some WPT tests so that they have only PASS results.
+ Note that css/cssom-view/scrollingElement-quirks-dynamic-*.html still fail for now (bug 182292).
+
+ * web-platform-tests/css/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt:
+ * web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt:
+ * web-platform-tests/css/cssom-view/scrollingElement-expected.txt: Added.
+
2018-09-05 Youenn Fablet <[email protected]>
Expose RTCRtpSender.setParameters
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt (235805 => 235806)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -3,10 +3,9 @@
PASS Ensure that style.overflowY can be set properly.
PASS document.compatMode should be BackCompat in quirks.
PASS document.scrollingElement should be body element in quirks.
-FAIL scrollingElement in quirks should be null when body is potentially scrollable. assert_equals: In quirks, we would expect null here (because of potentially scrollable body) expected null but got Element node <body id="thebody" style="overflow-y: scroll;">
- <div ...
+PASS scrollingElement in quirks should be null when body is potentially scrollable.
PASS scrollingElement in quirks should be body if any of document and body has a visible overflow.
-FAIL When body potentially scrollable, document.body.scrollHeight changes when changing the height of the body content in quirks. assert_not_equals: got disallowed value 600
+PASS When body potentially scrollable, document.body.scrollHeight changes when changing the height of the body content in quirks.
PASS When body not potentially scrollable, document.body.scrollHeight always equals window.innerHeight in quirks. (cond. visible, scroll)
PASS When body not potentially scrollable, document.body.scrollHeight always equals window.innerHeight in quirks. (cond. scroll, visible)
PASS When body not potentially scrollable, document.body.scrollHeight always equals window.innerHeight in quirks. (cond. visible, visible)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt (235805 => 235806)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -16,16 +16,16 @@
PASS scrollLeft/scrollRight of the content in quirks mode
PASS scrollWidth/scrollHeight of the content in quirks mode
PASS clientWidth/clientHeight of the content in quirks mode
-FAIL scrollingElement in non-quirks mode assert_equals: scrollingElement should be documentElement expected Element node <html><head></head><body style="overflow: hidden; margin:... but got Element node <body style="overflow: hidden; margin: 0px; border-width:...
-FAIL scroll() on the root element in non-quirks mode assert_equals: scrollLeft should be 50 expected 50 but got 0
-FAIL scrollBy() on the root element in non-quirks mode assert_equals: scrollLeft should be 60 expected 60 but got 0
-FAIL scrollLeft/scrollTop on the root element in non-quirks mode assert_equals: scrollLeft should be 70 expected 70 but got 0
+PASS scrollingElement in non-quirks mode
+PASS scroll() on the root element in non-quirks mode
+PASS scrollBy() on the root element in non-quirks mode
+PASS scrollLeft/scrollTop on the root element in non-quirks mode
PASS scrollWidth/scrollHeight on the root element in non-quirks mode
PASS clientWidth/clientHeight on the root element in non-quirks mode
-FAIL scroll() on the HTML body element in non-quirks mode assert_equals: scrollLeft should be 0 expected 0 but got 90
-FAIL scrollBy() on the HTML body element in non-quirks mode assert_equals: scrollLeft should be 0 expected 0 but got 100
-FAIL scrollLeft/scrollTop on the HTML body element in non-quirks mode assert_equals: scrollLeft should be 0 expected 0 but got 120
-FAIL scrollWidth/scrollHeight on the HTML body element in non-quirks mode assert_equals: scrollWidth should be 700 expected 700 but got 720
+PASS scroll() on the HTML body element in non-quirks mode
+PASS scrollBy() on the HTML body element in non-quirks mode
+PASS scrollLeft/scrollTop on the HTML body element in non-quirks mode
+PASS scrollWidth/scrollHeight on the HTML body element in non-quirks mode
PASS clientWidth/clientHeight on the HTML body element in non-quirks mode
PASS scrollLeft/scrollRight of the content in non-quirks mode
PASS scrollWidth/scrollHeight of the content in non-quirks mode
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollingElement-expected.txt (0 => 235806)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollingElement-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollingElement-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -0,0 +1,5 @@
+
+
+PASS scrollingElement in quirks mode
+PASS scrollingElement in no-quirks mode
+
Modified: trunk/LayoutTests/platform/ios/TestExpectations (235805 => 235806)
--- trunk/LayoutTests/platform/ios/TestExpectations 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2018-09-07 21:12:41 UTC (rev 235806)
@@ -2648,6 +2648,8 @@
webkit.org/b/163755 imported/w3c/web-platform-tests/css/css-shapes [ Skip ]
+webkit.org/b/5991 imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks.html [ Failure ]
+
# Variation fonts are not implemented earlier than iOS 11.
fast/text/variations [ Pass Failure ImageOnlyFailure ]
animations/font-variations [ Pass Failure ImageOnlyFailure Timeout ]
Modified: trunk/LayoutTests/platform/ios/ios/fast/coordinates/page-offsets-expected.txt (235805 => 235806)
--- trunk/LayoutTests/platform/ios/ios/fast/coordinates/page-offsets-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/platform/ios/ios/fast/coordinates/page-offsets-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -3,18 +3,18 @@
unscaled
PASS window.scrollX is 0
PASS window.pageXOffset is 0
-PASS document.body.scrollLeft is 0
+PASS document.documentElement.scrollLeft is 0
PASS window.scrollY is 0
PASS window.pageYOffset is 0
-PASS document.body.scrollTop is 0
+PASS document.documentElement.scrollTop is 0
scaled and panned
PASS window.scrollX is 10
PASS window.pageXOffset is 10
-PASS document.body.scrollLeft is 10
+PASS document.documentElement.scrollLeft is 10
PASS window.scrollY is 10
PASS window.pageYOffset is 10
-PASS document.body.scrollTop is 10
+PASS document.documentElement.scrollTop is 10
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/platform/ios/ios/fast/coordinates/resources/helpers.js (235805 => 235806)
--- trunk/LayoutTests/platform/ios/ios/fast/coordinates/resources/helpers.js 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/platform/ios/ios/fast/coordinates/resources/helpers.js 2018-09-07 21:12:41 UTC (rev 235806)
@@ -51,10 +51,10 @@
function verifyScrollOffsets() {
shouldBe('window.scrollX', expectedScrollX.toString());
shouldBe('window.pageXOffset', expectedScrollX.toString());
- shouldBe('document.body.scrollLeft', expectedScrollX.toString());
+ shouldBe('document.documentElement.scrollLeft', expectedScrollX.toString());
shouldBe('window.scrollY', expectedScrollY.toString());
shouldBe('window.pageYOffset', expectedScrollY.toString());
- shouldBe('document.body.scrollTop', expectedScrollY.toString());
+ shouldBe('document.documentElement.scrollTop', expectedScrollY.toString());
}
// To verify visible window sizes.
Deleted: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt (235805 => 235806)
--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1,33 +0,0 @@
-
-
-PASS Execution of tests in quirks mode
-PASS Execution of tests in non-quirks mode
-PASS scrollingElement in quirks mode
-PASS scroll() on the root element in quirks mode
-PASS scrollBy() on the root element in quirks mode
-PASS scrollLeft/scrollTop on the root element in quirks mode
-PASS scrollWidth/scrollHeight on the root element in quirks mode
-PASS clientWidth/clientHeight on the root element in quirks mode
-FAIL scroll() on the HTML body element in quirks mode assert_equals: scrollLeft should be 90 expected 90 but got 0
-FAIL scrollBy() on the HTML body element in quirks mode assert_equals: scrollLeft should be 100 expected 100 but got 0
-FAIL scrollLeft/scrollTop on the HTML body element in quirks mode assert_equals: scrollLeft should be 120 expected 120 but got 0
-PASS scrollWidth/scrollHeight on the HTML body element in quirks mode
-PASS clientWidth/clientHeight on the HTML body element in quirks mode
-PASS scrollLeft/scrollRight of the content in quirks mode
-PASS scrollWidth/scrollHeight of the content in quirks mode
-PASS clientWidth/clientHeight of the content in quirks mode
-FAIL scrollingElement in non-quirks mode assert_equals: scrollingElement should be documentElement expected Element node <html><head></head><body style="overflow: hidden; margin:... but got Element node <body style="overflow: hidden; margin: 0px; border-width:...
-FAIL scroll() on the root element in non-quirks mode assert_equals: scrollLeft should be 50 expected 50 but got 0
-FAIL scrollBy() on the root element in non-quirks mode assert_equals: scrollLeft should be 60 expected 60 but got 0
-FAIL scrollLeft/scrollTop on the root element in non-quirks mode assert_equals: scrollLeft should be 70 expected 70 but got 0
-PASS scrollWidth/scrollHeight on the root element in non-quirks mode
-PASS clientWidth/clientHeight on the root element in non-quirks mode
-PASS scroll() on the HTML body element in non-quirks mode
-PASS scrollBy() on the HTML body element in non-quirks mode
-PASS scrollLeft/scrollTop on the HTML body element in non-quirks mode
-FAIL scrollWidth/scrollHeight on the HTML body element in non-quirks mode assert_equals: scrollWidth should be 700 expected 700 but got 720
-PASS clientWidth/clientHeight on the HTML body element in non-quirks mode
-PASS scrollLeft/scrollRight of the content in non-quirks mode
-PASS scrollWidth/scrollHeight of the content in non-quirks mode
-PASS clientWidth/clientHeight of the content in non-quirks mode
-
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html (235805 => 235806)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html 2018-09-07 21:12:41 UTC (rev 235806)
@@ -43,7 +43,7 @@
function onPageScroll()
{
- if (document.body.scrollTop >= 70)
+ if (document.scrollingElement.scrollTop >= 70)
checkForScroll();
}
@@ -50,7 +50,7 @@
function checkForScroll()
{
// The div should not have scrolled at all.
- var pageScrollPositionAfter = document.body.scrollTop;
+ var pageScrollPositionAfter = document.scrollingElement.scrollTop;
var divScrollPositionAfter = divTarget.scrollTop;
if (divScrollPositionBefore != divScrollPositionAfter)
@@ -68,7 +68,7 @@
function scrollTest()
{
- pageScrollPositionBefore = document.body.scrollTop;
+ pageScrollPositionBefore = document.scrollingElement.scrollTop;
divTarget = document.getElementById('target');
Modified: trunk/Source/WebCore/ChangeLog (235805 => 235806)
--- trunk/Source/WebCore/ChangeLog 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebCore/ChangeLog 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1,3 +1,46 @@
+2018-09-07 Frederic Wang <[email protected]>
+
+ [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
+ https://bugs.webkit.org/show_bug.cgi?id=182230
+
+ Reviewed by Simon Fraser.
+
+ This commit moves the special logic for "scrolling element" body from the
+ HtmlBodyElement::scroll(Left/Top/Width/Height/To) functions to the Element class. The code
+ is executed when the element is the scrolling element which includes the case of body
+ in Quirks mode and of documentElement in standard mode. This makes the behavior closer to
+ the CSSOM View spec (bug 5991) while not deviating too much from the current implementation.
+ Finally, CSSOMViewScrollingAPI is now enabled for running tests and some adjustments are made
+ to existing tests. Further improvements will be performed in dependencies of bug 5991.
+
+ No new tests, already covered by existing tests.
+
+ * dom/Document.cpp: Split scrollingElement into two functions so that one can be called
+ internally without updating the layout.
+ (WebCore::Document::scrollingElement):
+ (WebCore::Document::scrollingElementForAPI):
+ * dom/Document.h: Ditto.
+ * dom/Document.idl: Use the version updating the layout for API calls.
+ * dom/Element.cpp: Add include to call DOMWindow::ScrollTo
+ (WebCore::Element::scrollTo): Moved some logic from HtmlBodyElement to handle the case of
+ the scrolling element. Also skip special handling of documentElement() when
+ CSSOMViewScrollingAPI is disabled.
+ (WebCore::adjustContentsScrollPositionOrSizeForZoom): Moved some logic from HtmlBodyElement
+ to handle the case of the scrolling element. Also add a FIXME for improving these kinds of
+ helper functions. Renamed to make more explicit the semantic of the value argument.
+ (WebCore::Element::scrollLeft): Moved some logic from HtmlBodyElement to handle the case of
+ the scrolling element. Use the new documentFrameWithNonNullView() helper function.
+ (WebCore::Element::scrollTop): Ditto.
+ (WebCore::Element::setScrollLeft): Ditto
+ (WebCore::Element::setScrollTop): Ditto.
+ (WebCore::Element::scrollWidth): Ditto.
+ (WebCore::Element::scrollHeight): Ditto.
+ * dom/Element.h:
+ (WebCore::Document::documentFrameWithNonNullView): New helper function to retrieve the
+ frame and ensure a view is available.
+ * html/HTMLBodyElement.cpp: Remove code that is now in Element.
+ * html/HTMLBodyElement.h: Ditto.
+
2018-09-07 Don Olmstead <[email protected]>
[AX] Fix compile error in AXObjectCache constructor when !HAVE(ACCESSIBILITY)
Modified: trunk/Source/WebCore/dom/Document.cpp (235805 => 235806)
--- trunk/Source/WebCore/dom/Document.cpp 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebCore/dom/Document.cpp 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1461,6 +1461,13 @@
&& !body.computedStyle()->isOverflowVisible();
}
+Element* Document::scrollingElementForAPI()
+{
+ if (inQuirksMode() && settings().CSSOMViewScrollingAPIEnabled())
+ updateLayoutIgnorePendingStylesheets();
+ return scrollingElement();
+}
+
Element* Document::scrollingElement()
{
if (settings().CSSOMViewScrollingAPIEnabled()) {
@@ -1468,7 +1475,6 @@
// The scrollingElement attribute, on getting, must run these steps:
// 1. If the Document is in quirks mode, follow these substeps:
if (inQuirksMode()) {
- updateLayoutIgnorePendingStylesheets();
auto* firstBody = body();
// 1. If the HTML body element exists, and it is not potentially scrollable, return the
// HTML body element and abort these steps.
Modified: trunk/Source/WebCore/dom/Document.h (235805 => 235806)
--- trunk/Source/WebCore/dom/Document.h 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebCore/dom/Document.h 2018-09-07 21:12:41 UTC (rev 235806)
@@ -448,7 +448,8 @@
WEBCORE_EXPORT RefPtr<Range> caretRangeFromPoint(int x, int y);
RefPtr<Range> caretRangeFromPoint(const LayoutPoint& clientPoint);
- WEBCORE_EXPORT Element* scrollingElement();
+ WEBCORE_EXPORT Element* scrollingElementForAPI();
+ Element* scrollingElement();
enum ReadyState {
Loading,
Modified: trunk/Source/WebCore/dom/Document.idl (235805 => 235806)
--- trunk/Source/WebCore/dom/Document.idl 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebCore/dom/Document.idl 2018-09-07 21:12:41 UTC (rev 235806)
@@ -132,7 +132,7 @@
readonly attribute StyleSheetList styleSheets; // FIXME: Should be [SameObject].
// Extensions from the CSSOM-View specification (https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface).
- readonly attribute Element? scrollingElement;
+ [ImplementedAs=scrollingElementForAPI] readonly attribute Element? scrollingElement;
// Extensions from Selection API (https://www.w3.org/TR/selection-api/#extensions-to-document-interface).
// FIXME: Should likely be moved to DocumentOrShadowRoot.
Modified: trunk/Source/WebCore/dom/Element.cpp (235805 => 235806)
--- trunk/Source/WebCore/dom/Element.cpp 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebCore/dom/Element.cpp 2018-09-07 21:12:41 UTC (rev 235806)
@@ -41,6 +41,7 @@
#include "DOMRect.h"
#include "DOMRectList.h"
#include "DOMTokenList.h"
+#include "DOMWindow.h"
#include "DocumentSharedObjectPool.h"
#include "DocumentTimeline.h"
#include "Editing.h"
@@ -756,13 +757,27 @@
void Element::scrollTo(const ScrollToOptions& options, ScrollClamping clamping)
{
- // If the element is the root element and document is in quirks mode, terminate these steps.
- // Note that WebKit always uses quirks mode document scrolling behavior. See Document::scrollingElement().
- if (this == document().documentElement())
- return;
+ if (!document().settings().CSSOMViewScrollingAPIEnabled()) {
+ // If the element is the root element and document is in quirks mode, terminate these steps.
+ // Note that WebKit always uses quirks mode document scrolling behavior. See Document::scrollingElement().
+ if (this == document().documentElement())
+ return;
+ }
document().updateLayoutIgnorePendingStylesheets();
+ if (document().scrollingElement() == this) {
+ // If the element is the scrolling element and is not potentially scrollable,
+ // invoke scroll() on window with options as the only argument, and terminate these steps.
+ // FIXME: Scrolling an independently scrollable body is broken: webkit.org/b/161612.
+ auto window = makeRefPtr(document().domWindow());
+ if (!window)
+ return;
+
+ window->scrollTo(options);
+ return;
+ }
+
// If the element does not have any associated CSS layout box, the element has no associated scrolling box,
// or the element has no overflow, terminate these steps.
RenderBox* renderer = renderBox();
@@ -843,6 +858,18 @@
return value.toDouble() / zoomFactor;
}
+static int adjustContentsScrollPositionOrSizeForZoom(int value, const Frame& frame)
+{
+ double zoomFactor = frame.pageZoomFactor() * frame.frameScaleFactor();
+ if (zoomFactor == 1)
+ return value;
+ // FIXME (webkit.org/b/189397): Why can't we just ceil/floor?
+ // Needed because of truncation (rather than rounding) when scaling up.
+ if (zoomFactor > 1)
+ value++;
+ return static_cast<int>(value / zoomFactor);
+}
+
enum LegacyCSSOMElementMetricsRoundingStrategy { Round, Floor };
static bool subpixelMetricsEnabled(const Document& document)
@@ -984,10 +1011,22 @@
return 0;
}
+ALWAYS_INLINE Frame* Element::documentFrameWithNonNullView() const
+{
+ auto* frame = document().frame();
+ return frame && frame->view() ? frame : nullptr;
+}
+
int Element::scrollLeft()
{
document().updateLayoutIgnorePendingStylesheets();
+ if (document().scrollingElement() == this) {
+ if (auto* frame = documentFrameWithNonNullView())
+ return adjustContentsScrollPositionOrSizeForZoom(frame->view()->contentsScrollPosition().x(), *frame);
+ return 0;
+ }
+
if (auto* renderer = renderBox())
return adjustForAbsoluteZoom(renderer->scrollLeft(), *renderer);
return 0;
@@ -997,6 +1036,12 @@
{
document().updateLayoutIgnorePendingStylesheets();
+ if (document().scrollingElement() == this) {
+ if (auto* frame = documentFrameWithNonNullView())
+ return adjustContentsScrollPositionOrSizeForZoom(frame->view()->contentsScrollPosition().y(), *frame);
+ return 0;
+ }
+
if (RenderBox* renderer = renderBox())
return adjustForAbsoluteZoom(renderer->scrollTop(), *renderer);
return 0;
@@ -1006,6 +1051,12 @@
{
document().updateLayoutIgnorePendingStylesheets();
+ if (document().scrollingElement() == this) {
+ if (auto* frame = documentFrameWithNonNullView())
+ frame->view()->setScrollPosition(IntPoint(static_cast<int>(newLeft * frame->pageZoomFactor() * frame->frameScaleFactor()), frame->view()->scrollY()));
+ return;
+ }
+
if (auto* renderer = renderBox()) {
renderer->setScrollLeft(static_cast<int>(newLeft * renderer->style().effectiveZoom()));
if (auto* scrollableArea = renderer->layer())
@@ -1017,6 +1068,12 @@
{
document().updateLayoutIgnorePendingStylesheets();
+ if (document().scrollingElement() == this) {
+ if (auto* frame = documentFrameWithNonNullView())
+ frame->view()->setScrollPosition(IntPoint(frame->view()->scrollX(), static_cast<int>(newTop * frame->pageZoomFactor() * frame->frameScaleFactor())));
+ return;
+ }
+
if (auto* renderer = renderBox()) {
renderer->setScrollTop(static_cast<int>(newTop * renderer->style().effectiveZoom()));
if (auto* scrollableArea = renderer->layer())
@@ -1027,6 +1084,15 @@
int Element::scrollWidth()
{
document().updateLayoutIfDimensionsOutOfDate(*this, WidthDimensionsCheck);
+
+ if (document().scrollingElement() == this) {
+ // FIXME (webkit.org/b/182289): updateLayoutIfDimensionsOutOfDate seems to ignore zoom level change.
+ document().updateLayoutIgnorePendingStylesheets();
+ if (auto* frame = documentFrameWithNonNullView())
+ return adjustContentsScrollPositionOrSizeForZoom(frame->view()->contentsWidth(), *frame);
+ return 0;
+ }
+
if (auto* renderer = renderBox())
return adjustForAbsoluteZoom(renderer->scrollWidth(), *renderer);
return 0;
@@ -1035,6 +1101,15 @@
int Element::scrollHeight()
{
document().updateLayoutIfDimensionsOutOfDate(*this, HeightDimensionsCheck);
+
+ if (document().scrollingElement() == this) {
+ // FIXME (webkit.org/b/182289): updateLayoutIfDimensionsOutOfDate seems to ignore zoom level change.
+ document().updateLayoutIgnorePendingStylesheets();
+ if (auto* frame = documentFrameWithNonNullView())
+ return adjustContentsScrollPositionOrSizeForZoom(frame->view()->contentsHeight(), *frame);
+ return 0;
+ }
+
if (auto* renderer = renderBox())
return adjustForAbsoluteZoom(renderer->scrollHeight(), *renderer);
return 0;
Modified: trunk/Source/WebCore/dom/Element.h (235805 => 235806)
--- trunk/Source/WebCore/dom/Element.h 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebCore/dom/Element.h 2018-09-07 21:12:41 UTC (rev 235806)
@@ -43,6 +43,7 @@
class DOMRectList;
class DOMTokenList;
class ElementRareData;
+class Frame;
class HTMLDocument;
class IntSize;
class JSCustomElementInterface;
@@ -605,6 +606,8 @@
static ExceptionOr<void> mergeWithNextTextNode(Text&);
private:
+ Frame* documentFrameWithNonNullView() const;
+
bool isTextNode() const;
bool isUserActionElementInActiveChain() const;
Modified: trunk/Source/WebCore/html/HTMLBodyElement.cpp (235805 => 235806)
--- trunk/Source/WebCore/html/HTMLBodyElement.cpp 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebCore/html/HTMLBodyElement.cpp 2018-09-07 21:12:41 UTC (rev 235806)
@@ -30,8 +30,6 @@
#include "DOMWindow.h"
#include "DOMWrapperWorld.h"
#include "EventNames.h"
-#include "Frame.h"
-#include "FrameView.h"
#include "HTMLFrameElement.h"
#include "HTMLIFrameElement.h"
#include "HTMLNames.h"
@@ -52,13 +50,6 @@
ASSERT(hasTagName(bodyTag));
}
-bool HTMLBodyElement::isFirstBodyElementOfDocument() const
-{
- // By spec http://dev.w3.org/csswg/cssom-view/#the-html-body-element
- // "The HTML body element is the first body HTML element child of the root HTML element html."
- return document().body() == this;
-}
-
Ref<HTMLBodyElement> HTMLBodyElement::create(Document& document)
{
return adoptRef(*new HTMLBodyElement(bodyTag, document));
@@ -231,126 +222,6 @@
return hasEditableStyle() || HTMLElement::supportsFocus();
}
-static int adjustForZoom(int value, const Frame& frame)
-{
- double zoomFactor = frame.pageZoomFactor() * frame.frameScaleFactor();
- if (zoomFactor == 1)
- return value;
- // Needed because of truncation (rather than rounding) when scaling up.
- if (zoomFactor > 1)
- value++;
- return static_cast<int>(value / zoomFactor);
-}
-
-int HTMLBodyElement::scrollLeft()
-{
- if (isFirstBodyElementOfDocument()) {
- document().updateLayoutIgnorePendingStylesheets();
- RefPtr<Frame> frame = document().frame();
- if (!frame)
- return 0;
- RefPtr<FrameView> view = frame->view();
- if (!view)
- return 0;
- return adjustForZoom(view->contentsScrollPosition().x(), *frame);
- }
- return HTMLElement::scrollLeft();
-}
-
-void HTMLBodyElement::setScrollLeft(int scrollLeft)
-{
- if (isFirstBodyElementOfDocument()) {
- document().updateLayoutIgnorePendingStylesheets();
- RefPtr<Frame> frame = document().frame();
- if (!frame)
- return;
- RefPtr<FrameView> view = frame->view();
- if (!view)
- return;
- view->setScrollPosition(IntPoint(static_cast<int>(scrollLeft * frame->pageZoomFactor() * frame->frameScaleFactor()), view->scrollY()));
- }
- HTMLElement::setScrollLeft(scrollLeft);
-}
-
-int HTMLBodyElement::scrollTop()
-{
- if (isFirstBodyElementOfDocument()) {
- document().updateLayoutIgnorePendingStylesheets();
- RefPtr<Frame> frame = document().frame();
- if (!frame)
- return 0;
- RefPtr<FrameView> view = frame->view();
- if (!view)
- return 0;
- return adjustForZoom(view->contentsScrollPosition().y(), *frame);
- }
- return HTMLElement::scrollTop();
-}
-
-void HTMLBodyElement::setScrollTop(int scrollTop)
-{
- if (isFirstBodyElementOfDocument()) {
- document().updateLayoutIgnorePendingStylesheets();
- RefPtr<Frame> frame = document().frame();
- if (!frame)
- return;
- RefPtr<FrameView> view = frame->view();
- if (!view)
- return;
- view->setScrollPosition(IntPoint(view->scrollX(), static_cast<int>(scrollTop * frame->pageZoomFactor() * frame->frameScaleFactor())));
- }
- return HTMLElement::setScrollTop(scrollTop);
-}
-
-void HTMLBodyElement::scrollTo(const ScrollToOptions& options, ScrollClamping clamping)
-{
- if (isFirstBodyElementOfDocument()) {
- // If the element is the HTML body element, document is in quirks mode, and the element is not potentially scrollable,
- // invoke scroll() on window with options as the only argument, and terminate these steps.
- // Note that WebKit always uses quirks mode document scrolling behavior. See Document::scrollingElement().
- // FIXME: Scrolling an independently scrollable body is broken: webkit.org/b/161612.
- auto window = makeRefPtr(document().domWindow());
- if (!window)
- return;
-
- window->scrollTo(options);
- return;
- }
- return HTMLElement::scrollTo(options, clamping);
-}
-
-int HTMLBodyElement::scrollHeight()
-{
- if (isFirstBodyElementOfDocument()) {
- // Update the document's layout.
- document().updateLayoutIgnorePendingStylesheets();
- RefPtr<Frame> frame = document().frame();
- if (!frame)
- return 0;
- RefPtr<FrameView> view = frame->view();
- if (!view)
- return 0;
- return adjustForZoom(view->contentsHeight(), *frame);
- }
- return HTMLElement::scrollHeight();
-}
-
-int HTMLBodyElement::scrollWidth()
-{
- if (isFirstBodyElementOfDocument()) {
- // Update the document's layout.
- document().updateLayoutIgnorePendingStylesheets();
- RefPtr<Frame> frame = document().frame();
- if (!frame)
- return 0;
- RefPtr<FrameView> view = frame->view();
- if (!view)
- return 0;
- return adjustForZoom(view->contentsWidth(), *frame);
- }
- return HTMLElement::scrollWidth();
-}
-
void HTMLBodyElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
{
HTMLElement::addSubresourceAttributeURLs(urls);
Modified: trunk/Source/WebCore/html/HTMLBodyElement.h (235805 => 235806)
--- trunk/Source/WebCore/html/HTMLBodyElement.h 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebCore/html/HTMLBodyElement.h 2018-09-07 21:12:41 UTC (rev 235806)
@@ -39,8 +39,6 @@
private:
HTMLBodyElement(const QualifiedName&, Document&);
- bool isFirstBodyElementOfDocument() const;
-
void parseAttribute(const QualifiedName&, const AtomicString&) final;
bool isPresentationAttribute(const QualifiedName&) const final;
void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) final;
@@ -52,17 +50,6 @@
bool supportsFocus() const final;
- int scrollLeft() final;
- void setScrollLeft(int) final;
-
- int scrollTop() final;
- void setScrollTop(int) final;
-
- void scrollTo(const ScrollToOptions&, ScrollClamping) final;
-
- int scrollHeight() final;
- int scrollWidth() final;
-
void addSubresourceAttributeURLs(ListHashSet<URL>&) const final;
static EventHandlerNameMap createWindowEventHandlerNameMap();
Modified: trunk/Source/WebKit/ChangeLog (235805 => 235806)
--- trunk/Source/WebKit/ChangeLog 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebKit/ChangeLog 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1,3 +1,13 @@
+2018-09-07 Frederic Wang <[email protected]>
+
+ [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
+ https://bugs.webkit.org/show_bug.cgi?id=182230
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp:
+ (webkit_dom_document_get_scrolling_element): Use the new name.
+
2018-09-07 Brent Fulgham <[email protected]>
[macOS] Remove unused XPC service from sandbox
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp (235805 => 235806)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1929,7 +1929,7 @@
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), 0);
WebCore::Document* item = WebKit::core(self);
- RefPtr<WebCore::Element> gobjectResult = WTF::getPtr(item->scrollingElement());
+ RefPtr<WebCore::Element> gobjectResult = WTF::getPtr(item->scrollingElementForAPI());
return WebKit::kit(gobjectResult.get());
}
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (235805 => 235806)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1,3 +1,13 @@
+2018-09-07 Frederic Wang <[email protected]>
+
+ [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
+ https://bugs.webkit.org/show_bug.cgi?id=182230
+
+ Reviewed by Simon Fraser.
+
+ * DOM/DOMDocument.mm:
+ (-[DOMDocument scrollingElement]): Use the new name.
+
2018-09-06 Wenson Hsieh <[email protected]>
Refactor WebCore::EditAction to be an 8-bit enum class
Modified: trunk/Source/WebKitLegacy/mac/DOM/DOMDocument.mm (235805 => 235806)
--- trunk/Source/WebKitLegacy/mac/DOM/DOMDocument.mm 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Source/WebKitLegacy/mac/DOM/DOMDocument.mm 2018-09-07 21:12:41 UTC (rev 235806)
@@ -418,7 +418,7 @@
- (DOMElement *)scrollingElement
{
WebCore::JSMainThreadNullState state;
- return kit(WTF::getPtr(IMPL->scrollingElement()));
+ return kit(WTF::getPtr(IMPL->scrollingElementForAPI()));
}
- (DOMHTMLCollection *)children
Modified: trunk/Tools/ChangeLog (235805 => 235806)
--- trunk/Tools/ChangeLog 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Tools/ChangeLog 2018-09-07 21:12:41 UTC (rev 235806)
@@ -1,3 +1,20 @@
+2018-09-07 Frederic Wang <[email protected]>
+
+ [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
+ https://bugs.webkit.org/show_bug.cgi?id=182230
+
+ Reviewed by Simon Fraser.
+
+ This patch enables CSSOMViewScrollingAPI during test execution.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (enableExperimentalFeatures):
+ (resetWebPreferencesToConsistentValues):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (enableExperimentalFeatures):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetPreferencesToConsistentValues):
+
2018-09-07 Simon Fraser <[email protected]>
resultsjsonparser needs to handle leak failures
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (235805 => 235806)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2018-09-07 21:12:41 UTC (rev 235806)
@@ -869,7 +869,7 @@
[preferences setServerTimingEnabled:YES];
[preferences setIntersectionObserverEnabled:YES];
preferences.sourceBufferChangeTypeEnabled = YES;
- // FIXME: CSSOMViewScrollingAPIEnabled
+ [preferences setCSSOMViewScrollingAPIEnabled:YES];
}
// Called before each test.
@@ -922,7 +922,6 @@
[preferences setLoadsSiteIconsIgnoringImageLoadingPreference:NO];
[preferences setFrameFlattening:WebKitFrameFlatteningDisabled];
[preferences setAsyncFrameScrollingEnabled:NO];
- [preferences setCSSOMViewScrollingAPIEnabled:NO];
[preferences setSpatialNavigationEnabled:NO];
[preferences setMetaRefreshEnabled:YES];
Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (235805 => 235806)
--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp 2018-09-07 21:12:41 UTC (rev 235806)
@@ -785,7 +785,7 @@
// FIXME: InputEvents
// FIXME: SubtleCrypto
prefsPrivate->setVisualViewportAPIEnabled(TRUE);
- // FIXME: CSSOMViewScrollingAPI
+ prefsPrivate->setCSSOMViewScrollingAPIEnabled(TRUE);
prefsPrivate->setWebAnimationsEnabled(TRUE);
prefsPrivate->setServerTimingEnabled(TRUE);
// FIXME: WebGL2
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (235805 => 235806)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2018-09-07 20:58:15 UTC (rev 235805)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2018-09-07 21:12:41 UTC (rev 235806)
@@ -791,7 +791,7 @@
WKPreferencesSetAccessibilityObjectModelEnabled(preferences, true);
WKPreferencesSetAriaReflectionEnabled(preferences, true);
- WKPreferencesSetCSSOMViewScrollingAPIEnabled(preferences, false);
+ WKPreferencesSetCSSOMViewScrollingAPIEnabled(preferences, true);
WKPreferencesSetMediaCapabilitiesEnabled(preferences, true);
WKPreferencesSetCrossOriginWindowPolicyEnabled(preferences, true);