Changeset 227962 in webkit


Ignore:
Timestamp:
Feb 1, 2018 6:03:45 AM (6 years ago)
Author:
fred.wang@free.fr
Message:

Rewrite fast/events/scroll-in-scaled-page-with-overflow-hidden.html to conform with CSSOM View
https://bugs.webkit.org/show_bug.cgi?id=182287

Patch by Frederic Wang <fwang@igalia.com> on 2018-02-01
Reviewed by Antonio Gomes.

Per the CSSOM View specification, it is wrong to use document.body.scrollTop to retrieve the
vertical offset of the viewport in this test, because the body is potentially scrollable.
This commit relies on window.scrollY instead so that the test still works after bug 5991.

  • fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt:
  • fast/events/scroll-in-scaled-page-with-overflow-hidden.html:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r227960 r227962  
     12018-02-01  Frederic Wang  <fwang@igalia.com>
     2
     3        Rewrite fast/events/scroll-in-scaled-page-with-overflow-hidden.html to conform with CSSOM View
     4        https://bugs.webkit.org/show_bug.cgi?id=182287
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Per the CSSOM View specification, it is wrong to use document.body.scrollTop to retrieve the
     9        vertical offset of the viewport in this test, because the body is potentially scrollable.
     10        This commit relies on window.scrollY instead so that the test still works after bug 5991.
     11
     12        * fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt:
     13        * fast/events/scroll-in-scaled-page-with-overflow-hidden.html:
     14
    1152018-02-01  Antoine Quint  <graouts@apple.com>
    216
  • trunk/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden-expected.txt

    r188793 r227962  
    11This tests that a usually overflow: hidden viewport should be scrollable when scaled. Otherwise, you can't get to content you would have been able to get to had you not been zoomed it.
    2 PASS window.document.body.scrollTop is 0
    3 PASS window.document.body.scrollTop is 100
     2PASS window.scrollY is 0
     3PASS window.scrollY is 100
    44PASS successfullyParsed is true
    55
  • trunk/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html

    r188793 r227962  
    2828            window.internals.setPageScaleFactor(2, 0, 0);
    2929
    30         shouldBe("window.document.body.scrollTop", "0");
     30        // Note that with CSSOMViewScrollingAPI enabled, the HTML body is potentially scrollable.
     31        // Hence document.scrollingElement is null and we can't use document.body.scrollTop to
     32        // retrieve the vertical scroll offset of the viewport.
     33        // See https://drafts.csswg.org/cssom-view/#potentially-scrollable,
     34        // https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement
     35        // and https://drafts.csswg.org/cssom-view/#dom-element-scrolltop
     36        shouldBe("window.scrollY", "0");
    3137
    3238        document.body.onscroll = function() {
    33             shouldBe("window.document.body.scrollTop", "100");
     39            shouldBe("window.scrollY", "100");
    3440            finishJSTest();
    3541        }
Note: See TracChangeset for help on using the changeset viewer.