[webkit-changes] [WebKit/WebKit] 50c9dc: [scroll-anchoring] Keyboard scrolling into a rubbe...

Nikos Mouchtaris noreply at github.com
Thu Jan 4 13:04:07 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 50c9dcae73447ac8e649a07dd246b227fc3dfd65
      https://github.com/WebKit/WebKit/commit/50c9dcae73447ac8e649a07dd246b227fc3dfd65
  Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/fast/scrolling/mac/keyboard-rubberband-expected.txt
    A LayoutTests/fast/scrolling/mac/keyboard-rubberband.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/start-edge-in-block-layout-direction-expected.txt
    M Source/WebCore/page/scrolling/ScrollAnchoringController.cpp
    M Source/WebCore/platform/ScrollAnimator.cpp

  Log Message:
  -----------
  [scroll-anchoring] Keyboard scrolling into a rubberband leaves the page stuck at a bad scroll offset
https://bugs.webkit.org/show_bug.cgi?id=267061
rdar://120053910

Reviewed by Simon Fraser.

After https://commits.webkit.org/271957@main we disabled scroll anchoring adjustments while
m_owningScrollableArea.isRubberBandInProgress() is true. However, this is not true during a
keyboard scroll. A better solution to this is to invalidate the scroll anchoring element in
ScrollAnimator::setCurrentPosition itself. Normally scroll position changes here would be sent
down into the scrollable area via setScrollPositionFromAnimation, however while rubberbanding
notify is NotifyScrollableArea::No, so we don't propagate the scroll position change to the
scrollable area. Now that we properly notfiy the scroll anchoring controller of the scroll
position change while rubberbanding, we can remove the old solution.

* Source/WebCore/page/scrolling/ScrollAnchoringController.cpp:
(WebCore::ScrollAnchoringController::adjustScrollPositionForAnchoring):
* Source/WebCore/platform/ScrollAnimator.cpp:
(WebCore::notifyScrollAnchoringControllerOfScroll):
(WebCore::ScrollAnimator::setCurrentPosition):

Canonical link: https://commits.webkit.org/272657@main




More information about the webkit-changes mailing list