WebKit Bugzilla
Attachment 348769 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
bug-182230-20180903155013.patch (text/plain), 50.75 KB, created by
Frédéric Wang (:fredw)
on 2018-09-03 06:50:15 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-09-03 06:50:15 PDT
Size:
50.75 KB
patch
obsolete
>Subversion Revision: 235599 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b61b82bc970cf66a319c03af735e4fb9a9102a72..a46d9add3c083766540e9487b3cce1da5ca3e547 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-09-03 Philippe Normand <pnormand@igalia.com> > > [GStreamer] elements registration clean-ups >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 680ef541e38e865b4b48e425caa9caa755ea9f60..b5e628fca1f1fc070f5a707391b30d5db3ecd01a 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -1462,13 +1462,19 @@ bool Document::isBodyPotentiallyScrollable(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 e42355ac4c6654dc82750907b5f43f14723ef4ee..749bf4b80af1faa35265afe903b5ebfa38f5340f 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 b78da9cd332a7418abc5a99326fdf1b42a066cab..e29ddd359dbcce0bf254f80b32a16c83b87ee96b 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 8442ac92428fa2ae35a1417655149040a2b2bd89..bbaf073083c780489254e0a39d53964c45ccc86c 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 9197ecc0a308d36d8192dc9136397d05df654a4a..45b0fbc53cb0c1d7e32e139adac698693d104048 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 5a433aeef506b6f46556013bfbb4361bf219ac1a..b5f8c543c1391f9cdf0f3a412d5e9381db5fadc1 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-09-01 Michael Catanzaro <mcatanzaro@igalia.com> > > [WPE] 2.21.91 fails to build with ENABLE_MINIBROWSER >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >index 4341388c74241302cdd6d25a5335a779d2b41d2e..efb43c169292b9f130855e4bd6b967080b385df4 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 6c530515a0be5cc2d524d5c5d9bd5dbb7b6bf394..52f788b471d2062cc6a3d2a5b4e45d25868e1c16 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 7cdaaf0a869abac2ba66d57fbfeea2d732791a4f..0ce8a424c9b57de70c5b0eae8d4773636b7e6350 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); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index f8f34a956c5c5c30df8c33f5abb3c7293c96b4e5..aa9574f17957e158af8f215e116d06a572e71395 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-09-03 Frederic Wang <fwang@free.fr> > > Remove duplicate directory web-platform-tests/cssom-view >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 04a21117738818812e69984a50f6fe49807529d0..73884174997422f8f0a94dbdf0b46fde56c0e9d8 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 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-03 Frederic Wang <fwang@igalia.com> > > Remove duplicate directory web-platform-tests/cssom-view >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 94e6c887fae9203efa17395f187b9c358e11ceaf..314fae7d69af84316c5535c183034fc7a5eb2d7e 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -1888,9 +1888,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/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 ] >diff --git a/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html b/LayoutTests/fast/dom/Document/scrollingElement-quirks-mode.html >index 56492a05b8d88a3651a472c65f62572cc892414f..8cfc3e99bbe2297bf6fd6a65d154eb238ec50681 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 89012f7bec28e13a2f3f464419cc802ea3eb3378..bf8bff3121097e341c0225df1a602da95f9a6e54 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 cfae951e0e7be80c5ab06bbeb482662596e6c542..98e6898c6ea8ff383a7b19a147510ac6462dc060 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 a7174bbe4693da0fcc2f0505e1e9d271074ca7fc..ad0018e66dc840f7aa2b721dc7a94b4238d86452 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 3b23a4b0e5691046bfdefe8185c4d822e3100102..9849308d3278924df1da47f1c0b775c3c61161c7 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 aa35737066b0ae97662a6fff9797f3ea0a14ff0c..d1a194d118c8aae44f0e4e7d3cef0749b084f438 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 1dacc16a6fd813ad61fdd8afddd5722889299f61..8fcd8f716f57cea3939daf2a4de570ca310dc6e3 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 12396926ea4ad228c99eba143404e552ebd8a793..40f8dc129f4c258e569453c4b23da138f58e8571 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 664e7ae65e0dbdcf23b73b376f0d3a6cb2c5cccf..671d84bdbb7394e5454cdc39a4d058f4923b5d56 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 fcfeadec9bfc1f70f9797add100ec7883de120bc..03adca5ccacf38940b26bdc00234143cd29b24f6 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 99bc52c8329edc40679182ad6f8e1d29ec5767ae..0a23454140be440bf263a6a61fd5ee8671abef0d 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 f8d39bd9eaae268a392e38ff009b3b637476a8cd..4d9d68e2dc2769ebed5b526a173983c2e9cae1b8 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 0f7716c5ba420689e62b0000287310ef13a5c272..405aed5b71d755ebd685a89dd99442413a12882f 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 0a5631a78f92e409fe6a9afd4b33771b028b0b94..f0e5c373115578c49fa1f93d32514680115e1221 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 077fb9af42e8ba92c5bf25adbdbd7cb02100945e..4a1dcbb934db8fcc547206eb3cf827de475ac258 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 3191d0e36cf45aa2c855e4c98c6dd0a680097a4d..3f23eb28e6447cabc603e20fdd43db488a26d169 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/web-platform-tests/css/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt >index 45e53bb0b4c2b5519ba3773c083013ba6ab47410..402333d60a2b0bc6594503c327b009bc5824b722 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/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/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt >index 284af1f94d411ecf825bae148ef3fb56f4ec0714..8f5148df5362162b7b85e8cfca336deeb3d0af49 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/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/css/cssom-view/scrollingElement-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollingElement-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..627259a39e39b64b3d10a9fc75cfab8d5b702d78 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/css/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-wk2/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt b/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt >deleted file mode 100644 >index 605dd36ae31b7aa08882ccdbe2d7ab852de4d26a..0000000000000000000000000000000000000000 >--- a/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt >+++ /dev/null >@@ -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 >- >diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations >index 37ae0f78ebfaca32dcf78f0bb118f40da70b8471..c38200d3818aeeee7fc31090711b4cbefa1f43a6 100644 >--- a/LayoutTests/platform/ios/TestExpectations >+++ b/LayoutTests/platform/ios/TestExpectations >@@ -2648,6 +2648,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/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 ] >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 898303483ab7c52faf0f7660e9c3a3eefdeee4b3..7daee5ef8c5b9da64a73cfb65f56fc48721a673d 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 cdd75b9508ea137eca7b561966fc62584924b2a0..d1b96957b58f1535e910d446f36ddb0991653155 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 5783f7ae16a72ced259b5b8711bef4323b02f693..7b3e936b42b6f39ba7d8982fd562a86b9af67cc3 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'); >
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