fast/events/scroll-in-scaled-page-with-overflow-hidden.html uses document.body.scrollTop to retrieve the vertical scroll offset of the viewport. This currently works because WebKit does not follow the CSSOM View spec (bug 5991). However, when CSSOMViewScrollingAPI is enabled, the HTML body is potentially scrollable (html, body have overflow: hidden see [1]) so document.body.scrollTop does not return the scroll offset [2]. Instead, the corresponding Chromium test [3] relies on internals.visualViewportScrollY(). [1] https://drafts.csswg.org/cssom-view/#potentially-scrollable [2] https://drafts.csswg.org/cssom-view/#dom-element-scrolltop [3] https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html?q=scroll-in-scaled-page-with-overflow-hidden.html&sq=package:chromium&dr
Created attachment 332752 [details] Patch
(In reply to Frédéric Wang (:fredw) from comment #0) > Instead, the > corresponding Chromium test [3] relies on internals.visualViewportScrollY(). So it looks like internals.visualViewportRect().y would work too, but I've simply used window.scrollY which is what document.body.scrollTop is supposed to return when the body is not potentially scrollable: https://drafts.csswg.org/cssom-view/#dom-element-scrolltop
Committed r227962: <https://trac.webkit.org/changeset/227962>
<rdar://problem/37113985>