Summary: | Use native animations for scroll-behavior:smooth on Mac | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | cathiechen <cathiechen> | ||||||||||||
Component: | Scrolling | Assignee: | Martin Robinson <mrobinson> | ||||||||||||
Status: | RESOLVED INVALID | ||||||||||||||
Severity: | Normal | CC: | changseok, esprehn+autocc, ews-watchlist, fred.wang, glenn, kondapallykalyan, mrobinson, pdr, rik, simon.fraser, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=230310 | ||||||||||||||
Bug Depends on: | |||||||||||||||
Bug Blocks: | 188043 | ||||||||||||||
Attachments: |
|
Description
cathiechen
2020-11-12 10:24:50 PST
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. |