Changeset 271730 in webkit


Ignore:
Timestamp:
Jan 21, 2021 6:48:17 PM (18 months ago)
Author:
Simon Fraser
Message:

Scroll-chaining not triggering before complete end of overscroll
https://bugs.webkit.org/show_bug.cgi?id=219960
<rdar://problem/72595521>

Reviewed by Tim Horton.

Source/WebCore:

Scroll latching for momentum scrolls was too sticky; it would keep latching to the same
scroller within a 100ms of the last event that was handled, which was exacerbated by the
fact that ScrollController can go into "ignoreMomentumScrolls" mode which results in
no visible scrolling but continued consumption of momentum wheel events.

Fix by releasing the latch as soon as we see the end of a momentum scroll,
so that we always re-evaluate latching at the start of the next gesture.

Tested by fast/scrolling/latching/nested-cross-axis-latch-expiration.html

  • page/scrolling/ScrollingTreeLatchingController.cpp:

(WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent):

LayoutTests:

Adjusted test for new behavior. No longer need WK1 result.

  • fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt:
  • fast/scrolling/latching/nested-cross-axis-latch-expiration.html:
  • platform/mac-wk1/fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt: Removed.
Location:
trunk
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r271720 r271730  
     12021-01-21  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Scroll-chaining not triggering before complete end of overscroll
     4        https://bugs.webkit.org/show_bug.cgi?id=219960
     5        <rdar://problem/72595521>
     6
     7        Reviewed by Tim Horton.
     8
     9        Adjusted test for new behavior. No longer need WK1 result.
     10
     11        * fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt:
     12        * fast/scrolling/latching/nested-cross-axis-latch-expiration.html:
     13        * platform/mac-wk1/fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt: Removed.
     14
    1152021-01-21  Julian Gonzalez  <julian_a_gonzalez@apple.com>
    216
  • trunk/LayoutTests/fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt

    r271701 r271730  
    11PASS innerOverflowScrollEventCount > 0 is true
    2 PASS outerOverflowScrollEventCount is 0
     2PASS outerOverflowScrollEventCount > 0 is true
    33PASS windowScrollEventCount is 0
    44PASS successfullyParsed is true
  • trunk/LayoutTests/fast/scrolling/latching/nested-cross-axis-latch-expiration.html

    r271701 r271730  
    108108        {
    109109            shouldBeTrue('innerOverflowScrollEventCount > 0');
    110             shouldBe('outerOverflowScrollEventCount', '0');
     110            shouldBeTrue('outerOverflowScrollEventCount > 0');
    111111            shouldBe('windowScrollEventCount', '0');
    112112            finishJSTest();
  • trunk/Source/WebCore/ChangeLog

    r271725 r271730  
     12021-01-21  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Scroll-chaining not triggering before complete end of overscroll
     4        https://bugs.webkit.org/show_bug.cgi?id=219960
     5        <rdar://problem/72595521>
     6
     7        Reviewed by Tim Horton.
     8
     9        Scroll latching for momentum scrolls was too sticky; it would keep latching to the same
     10        scroller within a 100ms of the last event that was handled, which was exacerbated by the
     11        fact that ScrollController can go into "ignoreMomentumScrolls" mode which results in
     12        no visible scrolling but continued consumption of momentum wheel events.
     13
     14        Fix by releasing the latch as soon as we see the end of a momentum scroll,
     15        so that we always re-evaluate latching at the start of the next gesture.
     16
     17        Tested by fast/scrolling/latching/nested-cross-axis-latch-expiration.html
     18
     19        * page/scrolling/ScrollingTreeLatchingController.cpp:
     20        (WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent):
     21
    1222021-01-21  Peng Liu  <peng.liu6@apple.com>
    223
  • trunk/Source/WebCore/page/scrolling/ScrollingTreeLatchingController.cpp

    r270425 r271730  
    9696
    9797    if (wheelEvent.useLatchedEventElement() && m_latchedNodeAndSteps && m_latchedNodeAndSteps->scrollingNodeID == scrollingNodeID) {
    98         m_lastLatchedNodeInterationTime = MonotonicTime::now();
     98        if (wheelEvent.isEndOfMomentumScroll())
     99            m_lastLatchedNodeInterationTime = { };
     100        else
     101            m_lastLatchedNodeInterationTime = MonotonicTime::now();
    99102        return;
    100103    }
Note: See TracChangeset for help on using the changeset viewer.