Bug 231395 - Minor refactoring to use ScrollUpdate in more places
Summary: Minor refactoring to use ScrollUpdate in more places
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks: 231402
  Show dependency treegraph
 
Reported: 2021-10-07 15:08 PDT by Simon Fraser (smfr)
Modified: 2021-10-07 17:33 PDT (History)
9 users (show)

See Also:


Attachments
Patch (14.36 KB, patch)
2021-10-07 15:11 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>