Bug 231395

Summary: Minor refactoring to use ScrollUpdate in more places
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: ScrollingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, ews-watchlist, fred.wang, jamesr, luiz, mmaxfield, simon.fraser, tonikitoo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 231402    
Attachments:
Description Flags
Patch none

Description Simon Fraser (smfr) 2021-10-07 15:08:45 PDT
Minor refactoring to use ScrollUpdate in more places
Comment 1 Simon Fraser (smfr) 2021-10-07 15:11:09 PDT
Created attachment 440544 [details]
Patch
Comment 2 Myles C. Maxfield 2021-10-07 15:17:53 PDT
Comment on attachment 440544 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=440544&action=review

> Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:263
> +        auto scrollUpdate = ScrollUpdate { scrollingNodeID, scrollPosition, { }, ScrollingLayerPositionAction::Set };

Why not ScrollUpdate scrollUpdate(scrollingNodeID, scrollPosition, { }, ScrollingLayerPositionAction::Set);?

Or even applyScrollUpdate(ScrollUpdate(scrollingNodeID, scrollPosition, { }, ScrollingLayerPositionAction::Set), ScrollType::Programmatic);?

> Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:309
> +        applyScrollPositionUpdate(WTFMove(update), ScrollType::User);

Cool.

> Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h:105
> +struct ScrollUpdate {

If you're going to move this, why not move it into its own file?
Comment 3 EWS 2021-10-07 17:32:39 PDT
Committed r283761 (242681@main): <https://commits.webkit.org/242681@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440544 [details].
Comment 4 Radar WebKit Bug Importer 2021-10-07 17:33:18 PDT
<rdar://problem/84007408>