forked from WebKit/WebKit-http
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up state maintenance around animated scrolls
https://bugs.webkit.org/show_bug.cgi?id=231347 Reviewed by Martin Robinson. ScrollBehaviorStatus tracked whether an animated scroll is in progress. Rename it for clarity, and remove the "non-native" term since this will never track native vs. non-native animations. Since ScrollBehaviorStatus is specifically about programmatic smooth scroll animations triggered from script, it should be stored on ScrollableArea and is not relevant to the scrolling tree. Remove it from the ScrollingTreeScrollingNodeDelegates. The state becomes ScrollAnimationStatus::Animating immediately when JS triggers animations, but the animation completion signal may come back in future from the scrolling thread. Currently it comes via ScrollingEffectsController::scrollAnimationDidEnd(). We never need to call setScrollAnimationStatus(ScrollAnimationStatus::NotAnimating) other than from scrollAnimationDidEnd(), because canceling an ongoing animation will always call that. * page/DOMWindow.cpp: (WebCore::DOMWindow::scrollTo const): * page/FrameView.cpp: (WebCore::FrameView::scrollToPositionWithAnimation): * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h: * page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h: * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::scrollToPositionWithAnimation): (WebCore::ScrollAnimator::retargetRunningAnimation): (WebCore::ScrollAnimator::willStartAnimatedScroll): (WebCore::ScrollAnimator::didStopAnimatedScroll): (WebCore::ScrollAnimator::setScrollBehaviorStatus): Deleted. (WebCore::ScrollAnimator::scrollBehaviorStatus const): Deleted. * platform/ScrollAnimator.h: * platform/ScrollTypes.h: * platform/ScrollView.cpp: (WebCore::ScrollView::setScrollPosition): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollToPositionWithAnimation): (WebCore::ScrollableArea::resnapAfterLayout): * platform/ScrollableArea.h: (WebCore::ScrollableArea::scrollAnimationStatus): (WebCore::ScrollableArea::setScrollAnimationStatus): (WebCore::ScrollableArea::currentScrollBehaviorStatus): Deleted. (WebCore::ScrollableArea::setScrollBehaviorStatus): Deleted. * platform/ScrollingEffectsController.cpp: (WebCore::ScrollingEffectsController::scrollAnimationDidEnd): * platform/ScrollingEffectsController.h: (WebCore::ScrollingEffectsControllerClient::willStartAnimatedScroll): (WebCore::ScrollingEffectsControllerClient::didStopAnimatedScroll): * rendering/RenderLayerScrollableArea.cpp: (WebCore::RenderLayerScrollableArea::scrollToOffset): (WebCore::RenderLayerScrollableArea::scrollTo): (WebCore::RenderLayerScrollableArea::updateScrollPosition): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@283716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
simon.fraser@apple.com
committed
Oct 7, 2021
1 parent
1bf4632
commit 2f607a3
Showing
14 changed files
with
95 additions
and
48 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
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