WebKit Bugzilla
Attachment 348498 Details for
Bug 182230
: [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch (applies on top of 182053)
0002-Bug-182230-CSSOM-View-Handle-the-scrollingElement-in.patch (text/plain), 48.14 KB, created by
Frédéric Wang (:fredw)
on 2018-08-30 08:10:47 PDT
(
hide
)
Description:
Patch (applies on top of 182053)
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-08-30 08:10:47 PDT
Size:
48.14 KB
patch
obsolete
>From 68ca285ba3ced0ba0c5ade3cfb5f8b56e96edbac Mon Sep 17 00:00:00 2001 >From: Frederic Wang <fwang@igalia.com> >Date: Wed, 9 May 2018 14:44:33 +0200 >Subject: [PATCH xserver 2/2] Bug 182230 - [CSSOM View] Handle the > scrollingElement in Element::scroll(Left/Top/Width/Height/To) > >--- > LayoutTests/ChangeLog | 36 +++++ > LayoutTests/TestExpectations | 3 - > .../scrollingElement-quirks-mode.html | 2 - > .../scrollingElement-standards-mode.html | 2 - > .../dom/Element/body-scrollLeft-expected.txt | 2 +- > .../fast/dom/Element/body-scrollLeft.html | 4 +- > .../dom/Element/body-scrollTop-expected.txt | 2 +- > .../fast/dom/Element/body-scrollTop.html | 2 +- > .../documentElement-scrollLeft-expected.txt | 2 +- > .../Element/documentElement-scrollLeft.html | 2 +- > .../documentElement-scrollTop-expected.txt | 2 +- > .../Element/documentElement-scrollTop.html | 2 +- > .../fast/dom/Element/scrollLeft-expected.txt | 4 +- > LayoutTests/fast/dom/Element/scrollLeft.html | 4 +- > .../fast/dom/Element/scrollTop-expected.txt | 4 +- > LayoutTests/fast/dom/Element/scrollTop.html | 4 +- > .../scrolling-funtions-on-body-expected.txt | 26 ++-- > .../Element/scrolling-funtions-on-body.html | 26 ++-- > LayoutTests/imported/w3c/ChangeLog | 14 ++ > ...TMLBody-ScrollArea_quirksmode-expected.txt | 5 +- > ...scrolling-quirks-vs-nonquirks-expected.txt | 16 +-- > .../cssom-view/scrollingElement-expected.txt | 5 + > LayoutTests/platform/ios/TestExpectations | 2 + > .../coordinates/page-offsets-expected.txt | 8 +- > .../ios/fast/coordinates/resources/helpers.js | 4 +- > .../fast-scroll-div-latched-mainframe.html | 6 +- > Source/WebCore/ChangeLog | 37 +++++ > Source/WebCore/dom/Document.cpp | 8 +- > Source/WebCore/dom/Document.h | 2 + > Source/WebCore/dom/Element.cpp | 101 +++++++++++++- > Source/WebCore/html/HTMLBodyElement.cpp | 129 ------------------ > Source/WebCore/html/HTMLBodyElement.h | 13 -- > Tools/ChangeLog | 17 +++ > Tools/DumpRenderTree/mac/DumpRenderTree.mm | 3 +- > Tools/DumpRenderTree/win/DumpRenderTree.cpp | 2 +- > Tools/WebKitTestRunner/TestController.cpp | 2 +- > 36 files changed, 282 insertions(+), 221 deletions(-) > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/cssom-view/scrollingElement-expected.txt > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index f690d6fb5d1..04370ffb9bb 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,39 @@ >+2018-01-30 Frederic Wang <fwang@igalia.com> >+ >+ [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To) >+ https://bugs.webkit.org/show_bug.cgi?id=182230 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-02-07 Frederic Wang <fwang@igalia.com> > > Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 3193ba318f7..43a23ec4bc5 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -1889,9 +1889,6 @@ fast/table/colspanMinWidth-vertical.html [ Skip ] > # 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/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 ] >diff --git a/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html b/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html >index 56492a05b8d..8cfc3e99bbe 100644 >--- a/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html >+++ b/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html >@@ -5,8 +5,6 @@ > </head> > <body> > <script> >-if (window.internals) >- internals.settings.setCSSOMViewScrollingAPIEnabled(true); > > description("Tests the behavior of document.scrollingElement in quirks mode."); > >diff --git a/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html b/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html >index 89012f7bec2..bf8bff31210 100644 >--- a/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html >+++ b/LayoutTests/fast/dom/Document/scrollingElement-standards-mode.html >@@ -6,8 +6,6 @@ > </head> > <body> > <script> >-if (window.internals) >- internals.settings.setCSSOMViewScrollingAPIEnabled(true); > > description("Tests the behavior of document.scrollingElement in standards mode."); > >diff --git a/LayoutTests/fast/dom/Element/body-scrollLeft-expected.txt b/LayoutTests/fast/dom/Element/body-scrollLeft-expected.txt >index cfae951e0e7..98e6898c6ea 100644 >--- a/LayoutTests/fast/dom/Element/body-scrollLeft-expected.txt >+++ b/LayoutTests/fast/dom/Element/body-scrollLeft-expected.txt >@@ -6,7 +6,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > PASS successfullyParsed is true > > TEST COMPLETE >-PASS document.body.scrollLeft is 500 >+PASS document.body.scrollLeft is 0 > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/fast/dom/Element/body-scrollLeft.html b/LayoutTests/fast/dom/Element/body-scrollLeft.html >index a7174bbe469..ad0018e66dc 100644 >--- a/LayoutTests/fast/dom/Element/body-scrollLeft.html >+++ b/LayoutTests/fast/dom/Element/body-scrollLeft.html >@@ -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> >diff --git a/LayoutTests/fast/dom/Element/body-scrollTop-expected.txt b/LayoutTests/fast/dom/Element/body-scrollTop-expected.txt >index 3b23a4b0e56..9849308d327 100644 >--- a/LayoutTests/fast/dom/Element/body-scrollTop-expected.txt >+++ b/LayoutTests/fast/dom/Element/body-scrollTop-expected.txt >@@ -6,7 +6,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > PASS successfullyParsed is true > > TEST COMPLETE >-PASS document.body.scrollTop is 500 >+PASS document.body.scrollTop is 0 > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/fast/dom/Element/body-scrollTop.html b/LayoutTests/fast/dom/Element/body-scrollTop.html >index aa35737066b..d1a194d118c 100644 >--- a/LayoutTests/fast/dom/Element/body-scrollTop.html >+++ b/LayoutTests/fast/dom/Element/body-scrollTop.html >@@ -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> >diff --git a/LayoutTests/fast/dom/Element/documentElement-scrollLeft-expected.txt b/LayoutTests/fast/dom/Element/documentElement-scrollLeft-expected.txt >index 1dacc16a6fd..8fcd8f716f5 100644 >--- a/LayoutTests/fast/dom/Element/documentElement-scrollLeft-expected.txt >+++ b/LayoutTests/fast/dom/Element/documentElement-scrollLeft-expected.txt >@@ -6,7 +6,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > PASS successfullyParsed is true > > TEST COMPLETE >-PASS document.documentElement.scrollLeft is 0 >+PASS document.documentElement.scrollLeft is 500 > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/fast/dom/Element/documentElement-scrollLeft.html b/LayoutTests/fast/dom/Element/documentElement-scrollLeft.html >index 12396926ea4..40f8dc129f4 100644 >--- a/LayoutTests/fast/dom/Element/documentElement-scrollLeft.html >+++ b/LayoutTests/fast/dom/Element/documentElement-scrollLeft.html >@@ -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> >diff --git a/LayoutTests/fast/dom/Element/documentElement-scrollTop-expected.txt b/LayoutTests/fast/dom/Element/documentElement-scrollTop-expected.txt >index 664e7ae65e0..671d84bdbb7 100644 >--- a/LayoutTests/fast/dom/Element/documentElement-scrollTop-expected.txt >+++ b/LayoutTests/fast/dom/Element/documentElement-scrollTop-expected.txt >@@ -3,7 +3,7 @@ Tests that for standard mode document.documentElement.scrollTop returns the scro > 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 >diff --git a/LayoutTests/fast/dom/Element/documentElement-scrollTop.html b/LayoutTests/fast/dom/Element/documentElement-scrollTop.html >index fcfeadec9bf..03adca5ccac 100644 >--- a/LayoutTests/fast/dom/Element/documentElement-scrollTop.html >+++ b/LayoutTests/fast/dom/Element/documentElement-scrollTop.html >@@ -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> >diff --git a/LayoutTests/fast/dom/Element/scrollLeft-expected.txt b/LayoutTests/fast/dom/Element/scrollLeft-expected.txt >index 99bc52c8329..0a23454140b 100644 >--- a/LayoutTests/fast/dom/Element/scrollLeft-expected.txt >+++ b/LayoutTests/fast/dom/Element/scrollLeft-expected.txt >@@ -4,8 +4,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > > 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 >diff --git a/LayoutTests/fast/dom/Element/scrollLeft.html b/LayoutTests/fast/dom/Element/scrollLeft.html >index f8d39bd9eaa..4d9d68e2dc2 100644 >--- a/LayoutTests/fast/dom/Element/scrollLeft.html >+++ b/LayoutTests/fast/dom/Element/scrollLeft.html >@@ -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); > } >diff --git a/LayoutTests/fast/dom/Element/scrollTop-expected.txt b/LayoutTests/fast/dom/Element/scrollTop-expected.txt >index 0f7716c5ba4..405aed5b71d 100644 >--- a/LayoutTests/fast/dom/Element/scrollTop-expected.txt >+++ b/LayoutTests/fast/dom/Element/scrollTop-expected.txt >@@ -4,8 +4,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > > 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 >diff --git a/LayoutTests/fast/dom/Element/scrollTop.html b/LayoutTests/fast/dom/Element/scrollTop.html >index 0a5631a78f9..f0e5c373115 100644 >--- a/LayoutTests/fast/dom/Element/scrollTop.html >+++ b/LayoutTests/fast/dom/Element/scrollTop.html >@@ -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); > } >diff --git a/LayoutTests/fast/dom/Element/scrolling-funtions-on-body-expected.txt b/LayoutTests/fast/dom/Element/scrolling-funtions-on-body-expected.txt >index 077fb9af42e..4a1dcbb934d 100644 >--- a/LayoutTests/fast/dom/Element/scrolling-funtions-on-body-expected.txt >+++ b/LayoutTests/fast/dom/Element/scrolling-funtions-on-body-expected.txt >@@ -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 >diff --git a/LayoutTests/fast/dom/Element/scrolling-funtions-on-body.html b/LayoutTests/fast/dom/Element/scrolling-funtions-on-body.html >index 3191d0e36cf..3f23eb28e64 100644 >--- a/LayoutTests/fast/dom/Element/scrolling-funtions-on-body.html >+++ b/LayoutTests/fast/dom/Element/scrolling-funtions-on-body.html >@@ -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); > >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 6e1e1cb5f2b..aacfa415737 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,17 @@ >+2018-01-30 Frederic Wang <fwang@igalia.com> >+ >+ [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To) >+ https://bugs.webkit.org/show_bug.cgi?id=182230 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This commit updates expectations for some WPT tests so that they have only PASS results. >+ Note that cssom-view/scrollingElement-quirks-dynamic-*.html still fail for now (bug 182292). >+ >+ * web-platform-tests/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt: >+ * web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt: >+ * web-platform-tests/cssom-view/scrollingElement-expected.txt: Added. >+ > 2018-08-29 Olivia Barnett <obarnett@apple.com> > > Implement the Web Share API >diff --git a/LayoutTests/imported/w3c/web-platform-tests/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt >index 45e53bb0b4c..402333d60a2 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt >@@ -3,10 +3,9 @@ PASS Ensure that body element is loaded. > 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) >diff --git a/LayoutTests/imported/w3c/web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt >index 284af1f94d4..8f5148df536 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt >@@ -16,16 +16,16 @@ 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 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 >diff --git a/LayoutTests/imported/w3c/web-platform-tests/cssom-view/scrollingElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/cssom-view/scrollingElement-expected.txt >new file mode 100644 >index 00000000000..627259a39e3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/cssom-view/scrollingElement-expected.txt >@@ -0,0 +1,5 @@ >+ >+ >+PASS scrollingElement in quirks mode >+PASS scrollingElement in no-quirks mode >+ >diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations >index a216337f733..b41ce94a64f 100644 >--- a/LayoutTests/platform/ios/TestExpectations >+++ b/LayoutTests/platform/ios/TestExpectations >@@ -2649,6 +2649,8 @@ webkit.org/b/163291 media/video-play-require-user-gesture.html > > webkit.org/b/163755 imported/w3c/web-platform-tests/css/css-shapes [ Skip ] > >+webkit.org/b/5991 imported/w3c/web-platform-tests/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 ] >diff --git a/LayoutTests/platform/ios/ios/fast/coordinates/page-offsets-expected.txt b/LayoutTests/platform/ios/ios/fast/coordinates/page-offsets-expected.txt >index 898303483ab..7daee5ef8c5 100644 >--- a/LayoutTests/platform/ios/ios/fast/coordinates/page-offsets-expected.txt >+++ b/LayoutTests/platform/ios/ios/fast/coordinates/page-offsets-expected.txt >@@ -3,18 +3,18 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > 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 >diff --git a/LayoutTests/platform/ios/ios/fast/coordinates/resources/helpers.js b/LayoutTests/platform/ios/ios/fast/coordinates/resources/helpers.js >index cdd75b9508e..d1b96957b58 100644 >--- a/LayoutTests/platform/ios/ios/fast/coordinates/resources/helpers.js >+++ b/LayoutTests/platform/ios/ios/fast/coordinates/resources/helpers.js >@@ -51,10 +51,10 @@ function setExpectedScrollOffsets(x, y) { > 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. >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html >index 5783f7ae16a..7b3e936b42b 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html >@@ -43,14 +43,14 @@ var continueCount = 5; > > function onPageScroll() > { >- if (document.body.scrollTop >= 70) >+ if (document.scrollingElement.scrollTop >= 70) > checkForScroll(); > } > > 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 checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > divTarget = document.getElementById('target'); > >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f33b8e59700..5ebb98b618a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,40 @@ >+2018-01-30 Frederic Wang <fwang@igalia.com> >+ >+ [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To) >+ https://bugs.webkit.org/show_bug.cgi?id=182230 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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::scrollingElementNoLayout): >+ * dom/Document.h: Ditto. >+ * 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::adjustForZoom): Moved some logic from HtmlBodyElement to handle the case of >+ the scrolling element. >+ (WebCore::Element::scrollLeft): Ditto. >+ (WebCore::Element::scrollTop): Ditto. >+ (WebCore::Element::setScrollLeft): Ditto >+ (WebCore::Element::setScrollTop): Ditto. >+ (WebCore::Element::scrollWidth): Ditto. >+ (WebCore::Element::scrollHeight): Ditto. >+ * html/HTMLBodyElement.cpp: Remove code that is now in Element. >+ * html/HTMLBodyElement.h: Ditto. >+ > 2018-02-07 Frederic Wang <fwang@igalia.com> > > Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index a22dfcbc795..0fc3a33f1a7 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -1462,13 +1462,19 @@ bool Document::isPotentiallyScrollable(HTMLBodyElement& body) > } > > Element* Document::scrollingElement() >+{ >+ if (settings().CSSOMViewScrollingAPIEnabled() && inQuirksMode()) >+ updateLayoutIgnorePendingStylesheets(); >+ return scrollingElementNoLayout(); >+} >+ >+Element* Document::scrollingElementNoLayout() > { > if (settings().CSSOMViewScrollingAPIEnabled()) { > // See https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement. > // 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. >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 2ed409ab417..0d9c4c85d5d 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -449,6 +449,8 @@ public: > RefPtr<Range> caretRangeFromPoint(const LayoutPoint& clientPoint); > > WEBCORE_EXPORT Element* scrollingElement(); >+ // When calling from C++ code, use this method. scrollingElement() is just for the web IDL implementation. >+ Element* scrollingElementNoLayout(); > > enum ReadyState { > Loading, >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index b78da9cd332..e29ddd359db 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -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" >@@ -712,13 +713,27 @@ void Element::scrollBy(double x, double y) > > 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().scrollingElementNoLayout() == 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(); >@@ -799,6 +814,17 @@ static double adjustForLocalZoom(LayoutUnit value, const RenderElement& renderer > return value.toDouble() / zoomFactor; > } > >+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); >+} >+ > enum LegacyCSSOMElementMetricsRoundingStrategy { Round, Floor }; > > static bool subpixelMetricsEnabled(const Document& document) >@@ -944,6 +970,16 @@ int Element::scrollLeft() > { > document().updateLayoutIgnorePendingStylesheets(); > >+ if (document().scrollingElementNoLayout() == this) { >+ RefPtr<Frame> frame = document().frame(); >+ if (!frame) >+ return 0; >+ RefPtr<FrameView> view = frame->view(); >+ if (!view) >+ return 0; >+ return adjustForZoom(view->contentsScrollPosition().x(), *frame); >+ } >+ > if (auto* renderer = renderBox()) > return adjustForAbsoluteZoom(renderer->scrollLeft(), *renderer); > return 0; >@@ -953,6 +989,16 @@ int Element::scrollTop() > { > document().updateLayoutIgnorePendingStylesheets(); > >+ if (document().scrollingElementNoLayout() == this) { >+ RefPtr<Frame> frame = document().frame(); >+ if (!frame) >+ return 0; >+ RefPtr<FrameView> view = frame->view(); >+ if (!view) >+ return 0; >+ return adjustForZoom(view->contentsScrollPosition().y(), *frame); >+ } >+ > if (RenderBox* renderer = renderBox()) > return adjustForAbsoluteZoom(renderer->scrollTop(), *renderer); > return 0; >@@ -962,6 +1008,16 @@ void Element::setScrollLeft(int newLeft) > { > document().updateLayoutIgnorePendingStylesheets(); > >+ if (document().scrollingElementNoLayout() == this) { >+ RefPtr<Frame> frame = document().frame(); >+ if (!frame) >+ return; >+ RefPtr<FrameView> view = frame->view(); >+ if (!view) >+ return; >+ view->setScrollPosition(IntPoint(static_cast<int>(newLeft * frame->pageZoomFactor() * frame->frameScaleFactor()), view->scrollY())); >+ } >+ > if (auto* renderer = renderBox()) { > renderer->setScrollLeft(static_cast<int>(newLeft * renderer->style().effectiveZoom())); > if (auto* scrollableArea = renderer->layer()) >@@ -973,6 +1029,17 @@ void Element::setScrollTop(int newTop) > { > document().updateLayoutIgnorePendingStylesheets(); > >+ >+ if (document().scrollingElementNoLayout() == this) { >+ RefPtr<Frame> frame = document().frame(); >+ if (!frame) >+ return; >+ RefPtr<FrameView> view = frame->view(); >+ if (!view) >+ return; >+ view->setScrollPosition(IntPoint(view->scrollX(), static_cast<int>(newTop * frame->pageZoomFactor() * frame->frameScaleFactor()))); >+ } >+ > if (auto* renderer = renderBox()) { > renderer->setScrollTop(static_cast<int>(newTop * renderer->style().effectiveZoom())); > if (auto* scrollableArea = renderer->layer()) >@@ -983,6 +1050,19 @@ void Element::setScrollTop(int newTop) > int Element::scrollWidth() > { > document().updateLayoutIfDimensionsOutOfDate(*this, WidthDimensionsCheck); >+ >+ if (document().scrollingElementNoLayout() == this) { >+ // FIXME (webkit.org/b/182289): updateLayoutIfDimensionsOutOfDate seems to ignore zoom level change. >+ 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); >+ } >+ > if (auto* renderer = renderBox()) > return adjustForAbsoluteZoom(renderer->scrollWidth(), *renderer); > return 0; >@@ -991,6 +1071,19 @@ int Element::scrollWidth() > int Element::scrollHeight() > { > document().updateLayoutIfDimensionsOutOfDate(*this, HeightDimensionsCheck); >+ >+ if (document().scrollingElementNoLayout() == this) { >+ // FIXME (webkit.org/b/182289): updateLayoutIfDimensionsOutOfDate seems to ignore zoom level change. >+ 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); >+ } >+ > if (auto* renderer = renderBox()) > return adjustForAbsoluteZoom(renderer->scrollHeight(), *renderer); > return 0; >diff --git a/Source/WebCore/html/HTMLBodyElement.cpp b/Source/WebCore/html/HTMLBodyElement.cpp >index 8442ac92428..bbaf073083c 100644 >--- a/Source/WebCore/html/HTMLBodyElement.cpp >+++ b/Source/WebCore/html/HTMLBodyElement.cpp >@@ -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 @@ HTMLBodyElement::HTMLBodyElement(const QualifiedName& tagName, Document& documen > 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 @@ bool HTMLBodyElement::supportsFocus() const > 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); >diff --git a/Source/WebCore/html/HTMLBodyElement.h b/Source/WebCore/html/HTMLBodyElement.h >index 9197ecc0a30..45b0fbc53cb 100644 >--- a/Source/WebCore/html/HTMLBodyElement.h >+++ b/Source/WebCore/html/HTMLBodyElement.h >@@ -39,8 +39,6 @@ public: > 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 @@ private: > > 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(); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 5e98c44fff9..f23370fd94b 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,20 @@ >+2018-01-30 Frederic Wang <fwang@igalia.com> >+ >+ [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To) >+ https://bugs.webkit.org/show_bug.cgi?id=182230 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-02-07 Frederic Wang <fwang@igalia.com> > > Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >index 4341388c742..efb43c16929 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >@@ -869,7 +869,7 @@ static void enableExperimentalFeatures(WebPreferences* preferences) > [preferences setServerTimingEnabled:YES]; > [preferences setIntersectionObserverEnabled:YES]; > preferences.sourceBufferChangeTypeEnabled = YES; >- // FIXME: CSSOMViewScrollingAPIEnabled >+ [preferences setCSSOMViewScrollingAPIEnabled:YES]; > } > > // Called before each test. >@@ -922,7 +922,6 @@ static void resetWebPreferencesToConsistentValues() > [preferences setLoadsSiteIconsIgnoringImageLoadingPreference:NO]; > [preferences setFrameFlattening:WebKitFrameFlatteningDisabled]; > [preferences setAsyncFrameScrollingEnabled:NO]; >- [preferences setCSSOMViewScrollingAPIEnabled:NO]; > [preferences setSpatialNavigationEnabled:NO]; > [preferences setMetaRefreshEnabled:YES]; > >diff --git a/Tools/DumpRenderTree/win/DumpRenderTree.cpp b/Tools/DumpRenderTree/win/DumpRenderTree.cpp >index 6c530515a0b..52f788b471d 100644 >--- a/Tools/DumpRenderTree/win/DumpRenderTree.cpp >+++ b/Tools/DumpRenderTree/win/DumpRenderTree.cpp >@@ -785,7 +785,7 @@ static void enableExperimentalFeatures(IWebPreferences* preferences) > // FIXME: InputEvents > // FIXME: SubtleCrypto > prefsPrivate->setVisualViewportAPIEnabled(TRUE); >- // FIXME: CSSOMViewScrollingAPI >+ prefsPrivate->setCSSOMViewScrollingAPIEnabled(TRUE); > prefsPrivate->setWebAnimationsEnabled(TRUE); > prefsPrivate->setServerTimingEnabled(TRUE); > // FIXME: WebGL2 >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index 7cdaaf0a869..0ce8a424c9b 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -791,7 +791,7 @@ void TestController::resetPreferencesToConsistentValues(const TestOptions& optio > > WKPreferencesSetAccessibilityObjectModelEnabled(preferences, true); > WKPreferencesSetAriaReflectionEnabled(preferences, true); >- WKPreferencesSetCSSOMViewScrollingAPIEnabled(preferences, false); >+ WKPreferencesSetCSSOMViewScrollingAPIEnabled(preferences, true); > WKPreferencesSetMediaCapabilitiesEnabled(preferences, true); > > WKPreferencesSetCrossOriginWindowPolicyEnabled(preferences, true); >-- >2.18.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 182230
:
332512
|
332513
|
332516
|
332519
|
332520
|
332529
|
332645
|
332650
|
332653
|
332857
|
332864
|
332874
|
340079
|
344695
|
348498
|
348619
|
348621
|
348623
|
348625
|
348627
|
348634
|
348769
|
348772
|
349118
|
349170
|
349174
|
349311