⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287431 in webkit


Ignore:
Timestamp:
Dec 24, 2021, 1:02:24 PM (5 years ago)
Author:
Simon Fraser
Message:

Apply the scroll delta in the "began" wheel event
https://bugs.webkit.org/show_bug.cgi?id=234645

Reviewed by Wenson Hsieh.

Source/WebCore:

ScrollingEffectsController::handleWheelEvent() previously early returned without applying
the delta in the "Began" event, which means that scrolling started a frame later than it
should have. For snappier scrolling in Safari, we should apply this delta.

  • platform/ScrollSnapAnimatorState.cpp:

(WebCore::ScrollSnapAnimatorState::setupAnimationForState):

  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::handleWheelEvent):

Source/WebKit:

  • Shared/WebWheelEventCoalescer.cpp:

(WebKit::WebWheelEventCoalescer::nextEventToDispatch): Fix logging typo.

LayoutTests:

Fix various test issues, and rebase tests affected by the change.

  • fast/scrolling/iframe-scrollable-after-back.html:
  • fast/scrolling/overflow-scrollable-after-back.html: Applying the delta from the "began" event caused

multiple scroll events to fire, triggering multiple navigations (previously, event coalescing would result in a single
scroll for multiple "changed" events).
Fix by using UIHelper.mouseWheelScrollAt() and logging the scroll only once.

  • fast/scrolling/latching/iframe-latch-small-deltas-expected.txt: Accumulated offset includes "began" delta.
  • fast/scrolling/latching/iframe-latch-small-deltas.html: Ditto
  • fast/scrolling/latching/latching-and-wheel-events-expected.txt: Ditto
  • fast/scrolling/latching/overflow-in-iframe-latching-expected.txt: Ditto
  • fast/scrolling/mac/momentum-animator-in-overflow.html: Remove comment.
  • fast/scrolling/mac/momentum-animator-maybegin-stops.html: Ditto
  • fast/scrolling/mac/momentum-animator.html: Ditto
  • fast/scrolling/mac/momentum-event-sequence-expected.txt: Accumulated offset includes "began" delta.
  • fast/scrolling/mac/momentum-event-sequence.html: Accumulated offset includes "began" delta.
  • fast/scrolling/mac/rubberband-overflow-in-wheel-region.html: Wheel event coalescing resulted in

unpredictable behavior, so ensure there is one.

  • platform/mac-wk1/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt: Removed.
  • platform/mac-wk1/fast/scrolling/latching/latching-and-wheel-events-expected.txt: Accumulated offset includes "began" delta.
  • platform/mac-wk1/fast/scrolling/latching/overflow-in-iframe-latching-expected.txt: Ditto
  • scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow-expected.txt: Ditto
  • scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow.html: Ditto
  • tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: Ditto
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: Ditto
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: Ditto
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: Test was designed with overlay scrollbars,

allowing for some between-snapoint slow that allowed an x delta to get applied. Fix to make room for scrollbars so that
snapping is always predictable.

Location:
trunk
Files:
2 deleted
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r287430 r287431  
     12021-12-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Apply the scroll delta in the "began" wheel event
     4        https://bugs.webkit.org/show_bug.cgi?id=234645
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        Fix various test issues, and rebase tests affected by the change.
     9
     10        * fast/scrolling/iframe-scrollable-after-back.html:
     11        * fast/scrolling/overflow-scrollable-after-back.html: Applying the delta from the "began" event caused
     12            multiple scroll events to fire, triggering multiple navigations (previously, event coalescing would result in a single
     13            scroll for multiple "changed" events).
     14            Fix by using UIHelper.mouseWheelScrollAt() and logging the scroll only once.
     15        * fast/scrolling/latching/iframe-latch-small-deltas-expected.txt: Accumulated offset includes "began" delta.
     16        * fast/scrolling/latching/iframe-latch-small-deltas.html: Ditto
     17        * fast/scrolling/latching/latching-and-wheel-events-expected.txt: Ditto
     18        * fast/scrolling/latching/overflow-in-iframe-latching-expected.txt: Ditto
     19        * fast/scrolling/mac/momentum-animator-in-overflow.html: Remove comment.
     20        * fast/scrolling/mac/momentum-animator-maybegin-stops.html: Ditto
     21        * fast/scrolling/mac/momentum-animator.html: Ditto
     22        * fast/scrolling/mac/momentum-event-sequence-expected.txt: Accumulated offset includes "began" delta.
     23        * fast/scrolling/mac/momentum-event-sequence.html: Accumulated offset includes "began" delta.
     24        * fast/scrolling/mac/rubberband-overflow-in-wheel-region.html: Wheel event coalescing resulted in
     25            unpredictable behavior, so ensure there is one.
     26        * platform/mac-wk1/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt: Removed.
     27        * platform/mac-wk1/fast/scrolling/latching/latching-and-wheel-events-expected.txt: Accumulated offset includes "began" delta.
     28        * platform/mac-wk1/fast/scrolling/latching/overflow-in-iframe-latching-expected.txt: Ditto
     29        * scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow-expected.txt: Ditto
     30        * scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow.html: Ditto
     31        * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: Ditto
     32        * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: Ditto
     33        * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: Ditto
     34        * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: Test was designed with overlay scrollbars,
     35        allowing for some between-snapoint slow that allowed an x delta to get applied. Fix to make room for scrollbars so that
     36        snapping is always predictable.
     37
    1382021-12-24  Tim Nguyen  <ntim@apple.com>
    239
  • trunk/LayoutTests/fast/scrolling/iframe-scrollable-after-back.html

    r268400 r287431  
    1717        }
    1818    </style>
     19    <script src="../../resources/ui-helper.js"></script>
    1920    <script>
    2021        if (window.testRunner) {
     
    2930
    3031        var scrollTopBeforeScroll;
    31         var postScrollCallback;
     32        var scrollTopAfterScroll;
    3233
    3334        function iframeScrolled()
    3435        {
    35             var newScrollTop = document.getElementById('iframe').contentDocument.scrollingElement.scrollTop;
    36             if (newScrollTop > scrollTopBeforeScroll)
    37                 logResult('PASS: mouseWheel caused scrolling');
    38             else
    39                 logResult('FAIL; mouseWheel did not scroll; scrollTop is ' + newScrollTop + ', was ' + scrollTopBeforeScroll);
    40 
    41             if (postScrollCallback)
    42                 postScrollCallback();
     36            scrollTopAfterScroll = document.getElementById('iframe').contentDocument.scrollingElement.scrollTop;
    4337        }
    4438       
    45         function testScrollability(completionHandler)
     39        async function testScrollability()
    4640        {
    4741            var iframeTarget = document.getElementById('iframe');
    4842            var iframeBounds = iframeTarget.getBoundingClientRect();
    49            
     43
    5044            scrollTopBeforeScroll = iframeTarget.contentDocument.scrollingElement.scrollTop;
    5145            logResult('Sending mouseWheel events');
    5246
    53             eventSender.mouseMoveTo(iframeBounds.left + 10, iframeBounds.top + 10);
    54             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
    55             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
    56             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
    57             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     47            await UIHelper.mouseWheelScrollAt(iframeBounds.left + 10, iframeBounds.top + 10, 0, -1, 0, -1);
    5848
    59             postScrollCallback = completionHandler;
     49            if (scrollTopAfterScroll > scrollTopBeforeScroll)
     50                logResult('PASS: mouseWheel caused scrolling');
     51            else
     52                logResult('FAIL; mouseWheel did not scroll; scrollTop is ' + scrollTopAfterScroll + ', was ' + scrollTopBeforeScroll);
    6053        }
    6154       
    62         function startTest()
     55        async function startTest()
    6356        {
    6457            if (!window.eventSender) {
     
    6760            }
    6861
    69             testScrollability(function() {
    70                 window.setTimeout(function() {
    71                     logResult('\nNavigating forward then back\n');
    72                     window.location.href = "data:text/html,<body onload='history.back()'></body>";
    73                 }, 0);
    74             });
    75            
     62            await testScrollability();
     63            setTimeout(() => {
     64                logResult('\nNavigating forward then back\n');
     65                window.location.href = "data:text/html,<body onload='history.back()'></body>";
     66            }, 0);
    7667        }
    7768       
    7869        var showCount = 0;
    79         function pageShowed()
     70        async function pageShowed()
    8071        {
    8172            if (++showCount == 2) {
    82                 testScrollability(function() {
    83                     testRunner.notifyDone();
    84                 });
     73                await testScrollability();
     74                testRunner.notifyDone();
    8575            }
    8676        }
  • trunk/LayoutTests/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt

    r266292 r287431  
    88PASS window.pageYOffset is 200
    99After scroll
    10 PASS iframeTarget.contentWindow.pageYOffset is 400
     10PASS iframeTarget.contentWindow.pageYOffset is 410
    1111PASS window.pageYOffset is 200
    1212After wait
     13PASS iframeTarget.contentWindow.pageYOffset is 410
     14PASS window.pageYOffset is 200
    1315PASS iframeTarget.contentWindow.pageYOffset is 400
    14 PASS window.pageYOffset is 200
    15 PASS iframeTarget.contentWindow.pageYOffset is 380
    1616PASS window.pageYOffset is 200
    1717PASS successfullyParsed is true
  • trunk/LayoutTests/fast/scrolling/latching/iframe-latch-small-deltas.html

    r269360 r287431  
    3939
    4040            debug('After scroll');
    41             shouldBe('iframeTarget.contentWindow.pageYOffset', '400');
     41            shouldBe('iframeTarget.contentWindow.pageYOffset', '410');
    4242            shouldBe('window.pageYOffset', '200');
    4343
     
    4545
    4646            debug('After wait');
    47             shouldBe('iframeTarget.contentWindow.pageYOffset', '400');
     47            shouldBe('iframeTarget.contentWindow.pageYOffset', '410');
    4848            shouldBe('window.pageYOffset', '200');
    4949
     
    5555
    5656            await UIHelper.waitForScrollCompletion();
    57             shouldBe('iframeTarget.contentWindow.pageYOffset', '380');
     57            shouldBe('iframeTarget.contentWindow.pageYOffset', '400');
    5858            shouldBe('window.pageYOffset', '200');
    5959
  • trunk/LayoutTests/fast/scrolling/latching/latching-and-wheel-events-expected.txt

    r259417 r287431  
    1414After scroll
    1515FAIL iframeTarget.contentWindow.pageYOffset should be 0. Was 100.
    16 FAIL overflowInIframeElement.scrollTop should be 0. Was 200.
     16FAIL overflowInIframeElement.scrollTop should be 0. Was 210.
    1717PASS window.pageYOffset is 20
    1818PASS mainFrameWheelEventCount is 0
  • trunk/LayoutTests/fast/scrolling/latching/overflow-in-iframe-latching-expected.txt

    r259417 r287431  
    1010After scroll
    1111FAIL iframeTarget.contentWindow.pageYOffset should be 0. Was 100.
    12 FAIL overflowInIframeElement.scrollTop should be 0. Was 200.
     12FAIL overflowInIframeElement.scrollTop should be 0. Was 210.
    1313PASS window.pageYOffset is 20
    1414PASS successfullyParsed is true
  • trunk/LayoutTests/fast/scrolling/mac/momentum-animator-in-overflow.html

    r286274 r287431  
    3434                        viewX : 100,
    3535                        viewY : 100,
    36                         deltaY : -10, // Note that this delta is currently ignored.
     36                        deltaY : -10,
    3737                        phase : "began"
    3838                    },
  • trunk/LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops.html

    r286274 r287431  
    2525                    viewX : 100,
    2626                    viewY : 100,
    27                     deltaY : -10, // Note that this delta is currently ignored.
     27                    deltaY : -10,
    2828                    phase : "began"
    2929                },
  • trunk/LayoutTests/fast/scrolling/mac/momentum-animator.html

    r286274 r287431  
    2121                        viewX : 100,
    2222                        viewY : 100,
    23                         deltaY : -10, // Note that this delta is currently ignored.
     23                        deltaY : -10,
    2424                        phase : "began"
    2525                    },
  • trunk/LayoutTests/fast/scrolling/mac/momentum-event-sequence-expected.txt

    r285390 r287431  
    1 PASS window.scrollY is 46
     1PASS window.scrollY is 56
    22PASS successfullyParsed is true
    33
  • trunk/LayoutTests/fast/scrolling/mac/momentum-event-sequence.html

    r285430 r287431  
    2121                        viewX : 100,
    2222                        viewY : 100,
    23                         deltaY : -10, // Note that this delta is currently ignored.
     23                        deltaY : -10,
    2424                        phase : "began"
    2525                    },
     
    6161
    6262            await UIHelper.mouseWheelSequence(wheelEventSquence);
    63             shouldBe('window.scrollY', '46');
     63            shouldBe('window.scrollY', '56');
    6464        }
    6565
  • trunk/LayoutTests/fast/scrolling/mac/rubberband-overflow-in-wheel-region.html

    r269360 r287431  
    4747        {
    4848            eventSender.mouseMoveTo(100, 100);
     49
    4950            // Scroll down to latch, then up to rubberband.
    50             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "began", "none");
    51             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, "changed", "none");
    52             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, "changed", "none");
    53             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 12, "changed", "none");
    54             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 12, "changed", "none");
    55             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
     51            const wheelEventSquence = {
     52                "events" : [
     53                    {
     54                        type : "wheel",
     55                        viewX : 100,
     56                        viewY : 100,
     57                        deltaX : -10,
     58                        phase : "began"
     59                    },
     60                    {
     61                        type : "wheel",
     62                        deltaX : -100,
     63                        phase : "changed"
     64                    },
     65                    {
     66                        type : "wheel",
     67                        viewX : 101, // defeat coalescing
     68                        deltaX : -100,
     69                        phase : "changed"
     70                    },
     71                    {
     72                        type : "wheel",
     73                        viewX : 100, // defeat coalescing
     74                        deltaY : 120,
     75                        phase : "changed"
     76                    },
     77                    {
     78                        type : "wheel",
     79                        viewX : 101, // defeat coalescing
     80                        deltaY : 120,
     81                        phase : "changed"
     82                    },
     83                    {
     84                        type : "wheel",
     85                        phase : "ended"
     86                    }
     87                ]
     88            };
     89
     90            await UIHelper.sendEventStream(wheelEventSquence);
    5691            await UIHelper.renderingUpdate();
    5792        }
     
    6297            debug('Test rubberband of overflow:scroll inside the non-fast scrollable region');
    6398            await resetScrollPositions();
     99
    64100            await doMouseWheelScroll();
    65101
  • trunk/LayoutTests/fast/scrolling/overflow-scrollable-after-back.html

    r268400 r287431  
    1717        }
    1818    </style>
     19    <script src="../../resources/ui-helper.js"></script>
    1920    <script>
    2021        if (window.testRunner) {
     
    2930
    3031        var scrollTopBeforeScroll;
    31         var postScrollCallback;
     32        var scrollTopAfterScroll;
    3233
    3334        function divScrolled()
    3435        {
    35             var newScrollTop = document.getElementById('overflowing').scrollTop;
    36 
    37             if (newScrollTop > scrollTopBeforeScroll)
    38                 logResult('PASS: mouseWheel caused scrolling');
    39             else
    40                 logResult('FAIL; mouseWheel did not scroll; scrollTop is ' + newScrollTop + ', was ' + scrollTopBeforeScroll);
    41 
    42             if (postScrollCallback)
    43                 postScrollCallback();
     36            scrollTopAfterScroll = document.getElementById('overflowing').scrollTop;
    4437        }
    4538       
    46         function testScrollability(completionHandler)
     39        async function testScrollability()
    4740        {
    4841            var divTarget = document.getElementById('overflowing');
    4942            var divBounds = divTarget.getBoundingClientRect();
    50            
     43
    5144            scrollTopBeforeScroll = divTarget.scrollTop;
    5245            logResult('Sending mouseWheel events');
    5346
    54             eventSender.mouseMoveTo(divBounds.left + 10, divBounds.top + 10);
    55             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
    56             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
    57             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
    58             eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
     47            await UIHelper.mouseWheelScrollAt(divBounds.left + 10, divBounds.top + 10, 0, -1, 0, -1);
    5948
    60             postScrollCallback = completionHandler;
     49            if (scrollTopAfterScroll > scrollTopBeforeScroll)
     50                logResult('PASS: mouseWheel caused scrolling');
     51            else
     52                logResult('FAIL; mouseWheel did not scroll; scrollTop is ' + scrollTopAfterScroll + ', was ' + scrollTopBeforeScroll);
    6153        }
    6254       
    63         function startTest()
     55        async function startTest()
    6456        {
    6557            if (!window.eventSender) {
     
    6860            }
    6961
    70             testScrollability(function() {
    71                 window.setTimeout(function() {
    72                     logResult('\nNavigating forward then back\n');
    73                     window.location.href = "data:text/html,<body onload='history.back()'></body>";
    74                 }, 0);
    75             });
    76            
     62            await testScrollability();
     63            setTimeout(() => {
     64                logResult('\nNavigating forward then back\n');
     65                window.location.href = "data:text/html,<body onload='history.back()'></body>";
     66            }, 0);
    7767        }
    7868       
    7969        var showCount = 0;
    80         function pageShowed()
     70        async function pageShowed()
    8171        {
    8272            if (++showCount == 2) {
    83                 testScrollability(function() {
    84                     testRunner.notifyDone();
    85                 });
     73                await testScrollability();
     74                testRunner.notifyDone();
    8675            }
    8776        }
  • trunk/LayoutTests/platform/mac-catalina-wk1/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt

    r280196 r287431  
    88PASS window.pageYOffset is 200
    99After scroll
    10 FAIL iframeTarget.contentWindow.pageYOffset should be 400. Was 205.
     10FAIL iframeTarget.contentWindow.pageYOffset should be 410. Was 205.
    1111PASS window.pageYOffset is 200
    1212After wait
    13 FAIL iframeTarget.contentWindow.pageYOffset should be 400. Was 205.
     13FAIL iframeTarget.contentWindow.pageYOffset should be 410. Was 205.
    1414PASS window.pageYOffset is 200
    15 FAIL iframeTarget.contentWindow.pageYOffset should be 380. Was 200.
     15FAIL iframeTarget.contentWindow.pageYOffset should be 400. Was 200.
    1616PASS window.pageYOffset is 200
    1717PASS successfullyParsed is true
  • trunk/LayoutTests/platform/mac-wk1/fast/scrolling/latching/latching-and-wheel-events-expected.txt

    r287397 r287431  
    1414After scroll
    1515FAIL iframeTarget.contentWindow.pageYOffset should be 0. Was 100.
    16 FAIL overflowInIframeElement.scrollTop should be 0. Was 200.
     16FAIL overflowInIframeElement.scrollTop should be 0. Was 210.
    1717PASS window.pageYOffset is 20
    1818PASS mainFrameWheelEventCount is 0
  • trunk/LayoutTests/platform/mac-wk1/fast/scrolling/latching/overflow-in-iframe-latching-expected.txt

    r287397 r287431  
    1010After scroll
    1111FAIL iframeTarget.contentWindow.pageYOffset should be 0. Was 100.
    12 FAIL overflowInIframeElement.scrollTop should be 0. Was 200.
     12FAIL overflowInIframeElement.scrollTop should be 0. Was 210.
    1313PASS window.pageYOffset is 20
    1414PASS successfullyParsed is true
  • trunk/LayoutTests/scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow-expected.txt

    r259872 r287431  
    55PASS innerScroller.scrollTop is 0
    66After scrolll
    7 PASS outerScroller.scrollTop is 200
     7PASS outerScroller.scrollTop is 210
    88PASS innerScroller.scrollTop is 0
    99PASS successfullyParsed is true
  • trunk/LayoutTests/scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow.html

    r269360 r287431  
    4444        {
    4545            debug('After scrolll');
    46             shouldBe('outerScroller.scrollTop', '200');
     46            shouldBe('outerScroller.scrollTop', '210');
    4747            shouldBe('innerScroller.scrollTop', '0');
    4848
  • trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt

    r258701 r287431  
    1616  (anchor 0.00 0.00)
    1717  (bounds 2008.00 2236.00)
    18   (visible rect 0.00, 70.00 785.00 x 585.00)
    19   (coverage rect 0.00, 70.00 785.00 x 585.00)
     18  (visible rect 0.00, 80.00 785.00 x 585.00)
     19  (coverage rect 0.00, 80.00 785.00 x 585.00)
    2020  (intersects coverage rect 1)
    2121  (contentsScale 1.00)
     
    2424      (bounds 2008.00 2236.00)
    2525      (contentsOpaque 1)
    26       (visible rect 0.00, 70.00 785.00 x 585.00)
     26      (visible rect 0.00, 80.00 785.00 x 585.00)
    2727      (coverage rect 0.00, 0.00 1570.00 x 1755.00)
    2828      (intersects coverage rect 1)
  • trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt

    r211662 r287431  
    1313  (anchor 0.00 0.00)
    1414  (bounds 785.00 2266.00)
    15   (visible rect 0.00, 70.00 785.00 x 600.00)
    16   (coverage rect 0.00, 70.00 785.00 x 600.00)
     15  (visible rect 0.00, 80.00 785.00 x 600.00)
     16  (coverage rect 0.00, 80.00 785.00 x 600.00)
    1717  (intersects coverage rect 1)
    1818  (contentsScale 1.00)
     
    2121      (bounds 785.00 2266.00)
    2222      (contentsOpaque 1)
    23       (visible rect 0.00, 70.00 785.00 x 600.00)
     23      (visible rect 0.00, 80.00 785.00 x 600.00)
    2424      (coverage rect 0.00, 0.00 785.00 x 1800.00)
    2525      (intersects coverage rect 1)
  • trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt

    r211662 r287431  
    1515  (anchor 0.00 0.00)
    1616  (bounds 2008.00 2266.00)
    17   (visible rect 0.00, 70.00 785.00 x 585.00)
    18   (coverage rect 0.00, 70.00 785.00 x 585.00)
     17  (visible rect 0.00, 80.00 785.00 x 585.00)
     18  (coverage rect 0.00, 80.00 785.00 x 585.00)
    1919  (intersects coverage rect 1)
    2020  (contentsScale 1.00)
     
    2323      (bounds 2008.00 2266.00)
    2424      (contentsOpaque 1)
    25       (visible rect 0.00, 70.00 785.00 x 585.00)
     25      (visible rect 0.00, 80.00 785.00 x 585.00)
    2626      (coverage rect 0.00, 0.00 1570.00 x 1755.00)
    2727      (intersects coverage rect 1)
  • trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt

    r254793 r287431  
    1515  (anchor 0.00 0.00)
    1616  (bounds 2008.00 2221.00)
    17   (visible rect 0.00, 70.00 785.00 x 585.00)
    18   (coverage rect 0.00, 70.00 785.00 x 585.00)
     17  (visible rect 0.00, 80.00 785.00 x 585.00)
     18  (coverage rect 0.00, 80.00 785.00 x 585.00)
    1919  (intersects coverage rect 1)
    2020  (contentsScale 1.00)
     
    2323      (bounds 2008.00 2221.00)
    2424      (contentsOpaque 1)
    25       (visible rect 0.00, 70.00 785.00 x 585.00)
     25      (visible rect 0.00, 80.00 785.00 x 585.00)
    2626      (coverage rect 0.00, 0.00 1570.00 x 1755.00)
    2727      (intersects coverage rect 1)
  • trunk/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html

    r258679 r287431  
    44        <style>
    55            #grid-container {
    6                 width: 400px;
    7                 height: 400px;
     6                width: 415px;
     7                height: 415px;
    88                overflow: scroll;
    99                white-space: nowrap;
  • trunk/Source/WebCore/ChangeLog

    r287430 r287431  
     12021-12-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Apply the scroll delta in the "began" wheel event
     4        https://bugs.webkit.org/show_bug.cgi?id=234645
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        ScrollingEffectsController::handleWheelEvent() previously early returned without applying
     9        the delta in the "Began" event, which means that scrolling started a frame later than it
     10        should have. For snappier scrolling in Safari, we should apply this delta.
     11
     12        * platform/ScrollSnapAnimatorState.cpp:
     13        (WebCore::ScrollSnapAnimatorState::setupAnimationForState):
     14        * platform/mac/ScrollingEffectsController.mm:
     15        (WebCore::ScrollingEffectsController::handleWheelEvent):
     16
    1172021-12-24  Tim Nguyen  <ntim@apple.com>
    218
  • trunk/Source/WebCore/platform/ScrollSnapAnimatorState.cpp

    r286115 r287431  
    2727#include "ScrollSnapAnimatorState.h"
    2828
     29#include "Logging.h"
    2930#include "ScrollExtents.h"
    3031#include "ScrollingEffectsController.h"
     
    5657        std::tie(targetOffsetX, m_activeSnapIndexX) = targetOffsetForStartOffset(ScrollEventAxis::Horizontal, scrollExtents, initialOffset.x(), targetOffset, pageScale, initialDelta.width());
    5758        std::tie(targetOffsetY, m_activeSnapIndexY) = targetOffsetForStartOffset(ScrollEventAxis::Vertical, scrollExtents, initialOffset.y(), targetOffset, pageScale, initialDelta.height());
    58 
     59        LOG_WITH_STREAM(ScrollAnimations, stream << "ScrollSnapAnimatorState::setupAnimationForState() - target offset " << targetOffset << " modified to " << FloatPoint(targetOffsetX, targetOffsetY));
    5960        return FloatPoint { targetOffsetX, targetOffsetY };
    6061    });
  • trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm

    r287397 r287431  
    142142        stopRubberBandAnimation();
    143143        updateRubberBandingState();
    144         return true;
    145144    }
    146145
  • trunk/Source/WebKit/ChangeLog

    r287420 r287431  
     12021-12-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Apply the scroll delta in the "began" wheel event
     4        https://bugs.webkit.org/show_bug.cgi?id=234645
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        * Shared/WebWheelEventCoalescer.cpp:
     9        (WebKit::WebWheelEventCoalescer::nextEventToDispatch): Fix logging typo.
     10
    1112021-12-23  Wenson Hsieh  <wenson_hsieh@apple.com>
    212
  • trunk/Source/WebKit/Shared/WebWheelEventCoalescer.cpp

    r286270 r287431  
    130130#if !LOG_DISABLED
    131131    if (coalescedSequence->size() > 1)
    132         LOG_WITH_STREAM(WheelEvents, stream << "WebWheelEventCoalescer::wheelEventWithCoalescing coalsesced " << *coalescedSequence << " into " << coalescedWebEvent);
     132        LOG_WITH_STREAM(WheelEvents, stream << "WebWheelEventCoalescer::wheelEventWithCoalescing coalesced " << *coalescedSequence << " into " << coalescedWebEvent);
    133133#endif
    134134
Note: See TracChangeset for help on using the changeset viewer.