Changeset 274726 in webkit


Ignore:
Timestamp:
Mar 19, 2021 10:48:11 AM (16 months ago)
Author:
commit-queue@webkit.org
Message:

scroll-snap-stop: always not respected during momentum scrolling
https://bugs.webkit.org/show_bug.cgi?id=223406

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-03-19
Reviewed by Simon Fraser.

Source/WebCore:

Test: tiled-drawing/scrolling/scroll-snap/scroll-snap-stop-momentum-scroll.html

  • platform/ScrollSnapAnimatorState.cpp:

(WebCore::ScrollSnapAnimatorState::targetOffsetForStartOffset const): Enable directional scroll
snapping when handling momentum scrolling. This turns on scroll-snap-stop as well as a few other
features.

LayoutTests:

  • tiled-drawing/scrolling/scroll-snap/scroll-snap-stop-momentum-scroll-expected.txt: Added.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-stop-momentum-scroll.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r274721 r274726  
     12021-03-19  Martin Robinson  <mrobinson@igalia.com>
     2
     3        scroll-snap-stop: always not respected during momentum scrolling
     4        https://bugs.webkit.org/show_bug.cgi?id=223406
     5
     6        Reviewed by Simon Fraser.
     7
     8        * tiled-drawing/scrolling/scroll-snap/scroll-snap-stop-momentum-scroll-expected.txt: Added.
     9        * tiled-drawing/scrolling/scroll-snap/scroll-snap-stop-momentum-scroll.html: Added.
     10
    1112021-03-19  Sergio Villar Senin  <svillar@igalia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r274725 r274726  
     12021-03-19  Martin Robinson  <mrobinson@igalia.com>
     2
     3        scroll-snap-stop: always not respected during momentum scrolling
     4        https://bugs.webkit.org/show_bug.cgi?id=223406
     5
     6        Reviewed by Simon Fraser.
     7
     8        Test: tiled-drawing/scrolling/scroll-snap/scroll-snap-stop-momentum-scroll.html
     9
     10        * platform/ScrollSnapAnimatorState.cpp:
     11        (WebCore::ScrollSnapAnimatorState::targetOffsetForStartOffset const): Enable directional scroll
     12        snapping when handling momentum scrolling. This turns on scroll-snap-stop as well as a few other
     13        features.
     14
    1152021-03-19  Simon Fraser  <simon.fraser@apple.com>
    216
  • trunk/Source/WebCore/platform/ScrollSnapAnimatorState.cpp

    r274564 r274726  
    100100    }
    101101
    102     float targetOffset = m_snapOffsetsInfo.closestSnapOffset(axis, LayoutUnit(predictedOffset / pageScale), initialDelta).first;
     102    float targetOffset = m_snapOffsetsInfo.closestSnapOffset(axis, LayoutUnit(predictedOffset / pageScale), initialDelta, LayoutUnit(startOffset / pageScale)).first;
    103103    float minimumTargetOffset = std::max<float>(0, snapOffsets.first().offset);
    104104    float maximumTargetOffset = std::min<float>(maxScrollOffset, snapOffsets.last().offset);
Note: See TracChangeset for help on using the changeset viewer.