Try to use the native scroll animation of Mac (scrolling momentum) for smooth scroll.
<rdar://problem/71591918>
Created attachment 432463 [details] Patch
Created attachment 432581 [details] Patch
Comment on attachment 432581 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=432581&action=review > Source/WebCore/platform/ScrollAnimator.cpp:-125 > - m_scrollAnimation->setCurrentPosition(adjustedPosition); I wonder would this change affect the platform still using m_scrollAnimation? > Source/WebCore/platform/ScrollView.cpp:-540 > - setScrollBehaviorStatus(ScrollBehaviorStatus::NotInAnimation); Looks like we can also remove this in RenderLayerScrollableArea::scrollToOffset()?
Created attachment 432772 [details] Patch
(In reply to cathiechen from comment #4) Thanks for taking a look at this! > > View in context: > https://bugs.webkit.org/attachment.cgi?id=432581&action=review > > > Source/WebCore/platform/ScrollAnimator.cpp:-125 > > - m_scrollAnimation->setCurrentPosition(adjustedPosition); > > I wonder would this change affect the platform still using m_scrollAnimation? I don't think this will, because setCurrentPosition is always called before starting a new animation with m_scrollAnimation. > > Source/WebCore/platform/ScrollView.cpp:-540 > > - setScrollBehaviorStatus(ScrollBehaviorStatus::NotInAnimation); > > Looks like we can also remove this in > RenderLayerScrollableArea::scrollToOffset()? Nice catch! I thought I had gotten all of these, but I missed one. I've uploaded a new version of the change.
Created attachment 432928 [details] Patch
Created attachment 432931 [details] Patch
Now that ScrollAnimator and ScrollAnimatorMac use the same smooth animation, this change is no longer valid. See: https://bugs.webkit.org/show_bug.cgi?id=230445
We still want to run smooth scrolling animations in the UI process on iOS, but we can do that via a separate bug.
(In reply to Simon Fraser (smfr) from comment #10) > We still want to run smooth scrolling animations in the UI process on iOS, > but we can do that via a separate bug. That's right. If I'm not mistaken it's tracked by: https://bugs.webkit.org/show_bug.cgi?id=204936.