haikuwebkit/LayoutTests/css3/scroll-snap/scroll-snap-drag-scrollbar-...

7 lines
152 B
Plaintext
Raw Permalink Normal View History

Scroll snapping doesn't kick in when dragging scrollbars https://bugs.webkit.org/show_bug.cgi?id=146696 Reviewed by Simon Fraser. Source/WebCore: This change adds support for scroll snap when the scrollbar thumb is released from a drag operation. This animation is currently done with the non-native scroll animator for all platforms, since that is also what is used for smooth scrolling. This change adjusts the non-native scroll animator's smoothness factor, because it is too slow for short scroll snaps. I have verified that the new smoothness factor is also a good selection for smooth scrolling operations (still an experimental feature). A further change should use "native" animations when possible for both smooth scrolling and scroll snap after thumb drags. This is tracked by the following bug: https://bugs.webkit.org/show_bug.cgi?id=218857 Tests: css3/scroll-snap/scroll-snap-click-scrollbar-gutter.html css3/scroll-snap/scroll-snap-drag-scrollbar-thumb.html * platform/ScrollAnimationSmooth.cpp: Modify smoothFactorForProgrammaticScroll to a value that is good for both scroll snapping and smooth scrolling. * platform/ScrollAnimator.cpp: The tick method for the non-native scroll animation should continually update the current active snap point. (WebCore::ScrollAnimator::adjustScrollOffsetForSnappingIfNeeded): Split this into two methods. One that handles a single axis and one that handles both. * platform/ScrollAnimator.h: Update method declarations. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::doPostThumbDragSnapping): Added this method which does axial snapping after a scrollbar thum drag. * platform/ScrollableArea.h: * platform/Scrollbar.cpp: (WebCore::Scrollbar::mouseUp): Use the new doPostThumbDragSnapping method. LayoutTests: Add support for scroll snap after dragging scrollbar thumb This change adds support for scroll snap when the scrollbar thumb is released from a drag operation. This animation is currently done with the non-native scroll animator for all platforms, since that is also what is used for smooth scrolling. This change adjusts the non-native scroll animator's smoothness factor, because it is too slow for short scroll snaps. I have verified that the new smoothness factor is also a good selection for smooth scrolling operations (still an experimental feature). A further change should use "native" animations when possible for both smooth scrolling and scroll snap after thumb drags. This is tracked by the following bug: https://bugs.webkit.org/show_bug.cgi?id=218857 * css3/scroll-snap/scroll-snap-click-scrollbar-gutter-expected.txt: Added. * css3/scroll-snap/scroll-snap-click-scrollbar-gutter.html: Added. * css3/scroll-snap/scroll-snap-drag-scrollbar-thumb-expected.txt: Added. * css3/scroll-snap/scroll-snap-drag-scrollbar-thumb.html: Added. * platform/ios-wk2/TestExpectations: Mark new test as failing on iOS which has issues with scrollbars. * platform/ios/TestExpectations: Skip the new test on iOS which does not support scrolling by dragging the scrollbar. Canonical link: https://commits.webkit.org/234711@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-01 21:32:19 +00:00
PASS dragging the horizontal scrollbar thumb snapped
PASS dragging the vertical scrollbar thumb snapped
PASS successfullyParsed is true
TEST COMPLETE