Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a53d9e00eb65bcb56d2d24b1edde139091027c63
      
https://github.com/WebKit/WebKit/commit/a53d9e00eb65bcb56d2d24b1edde139091027c63
  Author: Simon Fraser <[email protected]>
  Date:   2023-11-05 (Sun, 05 Nov 2023)

  Changed paths:
    M LayoutTests/platform/mac-ventura-wk2/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations
    M 
LayoutTests/tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt
    M 
LayoutTests/tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt
    M 
LayoutTests/tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt
    M 
LayoutTests/tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt
    M Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
    M Source/WebCore/platform/ScrollView.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm

  Log Message:
  -----------
  REGRESSION (269897@main): [ Sonoma wk2 ] 2 tests in 
imported/w3c/web-platform-tests/css/cssom-view/ are a constant failure
https://bugs.webkit.org/show_bug.cgi?id=263925
rdar://117706782

Reviewed by Richard Robinson.

Fix a bug introduced in 269897@main, and an older bug that prevented 
scroll-behavior-main-frame* tests from passing.

In 269897@main the intermediate scrollTo() that we do when we have 
`requestedDataBeforeAnimatedScroll` data needs
to also contribute its destination position to the animated scroll that happens 
second, but both
`ScrollingTreeScrollingNode::handleScrollPositionRequest()` and 
`RemoteScrollingTreeMac::startPendingScrollAnimations()`
failed to do this.

Even wit this fix, two WPT tests were failing when they made the following 
sequence of programmatic scrolls:
    scrollBy(0, X, animated)
    scrollTo(0, 0)
    scrollBy(0, Y, animated)

We'd end up scrolling to X + Y because `ScrollView::setScrollPosition()` early 
returned if there was no position
change for the `scrollTo(0, 0)`. But we need to hit `requestScrollToPosition()` 
so that we have a chance to
cancel the enqueued animated scroll, so remove the 
`!delegatesScrollingToNativeView()` check.

* LayoutTests/platform/mac-ventura-wk2/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::handleScrollPositionRequest):
* Source/WebCore/platform/ScrollView.cpp:
(WebCore::ScrollView::setScrollPosition):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm:
(WebKit::RemoteScrollingTreeMac::startPendingScrollAnimations):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to