Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[css-scroll-snap] Pass the full target point when selecting a snap of…
…fset https://bugs.webkit.org/show_bug.cgi?id=228023 Reviewed by Frédéric Wang. Source/WebCore: Pass the full proposed destination scroll offset when calling closestSnapOffset. For now, only the component in the scroll direction is used, but eventually the other component will be used to avoid snapping to snap areas that are entirely off the screen. No new tests. This change is simply a refactor in preparation for a behavior change and shouldn't change behavior itself. * page/scrolling/ScrollSnapOffsetsInfo.cpp: (WebCore::closestSnapOffsetWithInfoAndAxis): (WebCore::LayoutScrollSnapOffsetsInfo::closestSnapOffset const): (WebCore::FloatScrollSnapOffsetsInfo::closestSnapOffset const): * page/scrolling/ScrollSnapOffsetsInfo.h: * page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp: (WebCore::ScrollingTreeScrollingNodeDelegateNicosia::handleWheelEvent): * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::scroll): (WebCore::ScrollAnimator::adjustScrollOffsetForSnappingIfNeeded): * platform/ScrollAnimator.h: * platform/ScrollController.cpp: (WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset): (WebCore::ScrollController::adjustScrollDestination): (WebCore::ScrollController::updateActiveScrollSnapIndexForClientOffset): (WebCore::ScrollController::resnapAfterLayout): * platform/ScrollController.h: * platform/ScrollSnapAnimatorState.cpp: (WebCore::ScrollSnapAnimatorState::setupAnimationForState): (WebCore::ScrollSnapAnimatorState::targetOffsetForStartOffset const): * platform/ScrollSnapAnimatorState.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::doPostThumbMoveSnapping): Source/WebKit: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm: (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling const): * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm: (-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Canonical link: https://commits.webkit.org/239866@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
15 changed files
with
113 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.