Bug 219416 - Simplify some callsites of WheelEventTestMonitor
Summary: Simplify some callsites of WheelEventTestMonitor
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:
 
Reported: 2020-12-01 17:09 PST by Simon Fraser (smfr)
Modified: 2020-12-01 19:29 PST (History)
9 users (show)

See Also:


Attachments
Patch (22.50 KB, patch)
2020-12-01 17:12 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (22.33 KB, patch)
2020-12-01 18:46 PST, Simon Fraser (smfr)
dbates: review+
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) 2020-12-01 17:09:09 PST
Simplify some callsites of WheelEventTestMonitor
Comment 1 Simon Fraser (smfr) 2020-12-01 17:12:31 PST
Created attachment 415179 [details]
Patch
Comment 2 Simon Fraser (smfr) 2020-12-01 18:46:45 PST
Created attachment 415186 [details]
Patch
Comment 3 Daniel Bates 2020-12-01 19:00:04 PST
View in context: https://bugs.webkit.org/attachment.cgi?id=415179&action=review

> Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp:161
> +    auto makeDeferrer = [&]() -> WheelEventTestMonitorCompletionDeferrer {

Consider just using a local and moving it because this function is unconditionally invoked (so not avoiding computing it sometimes) and its body is branchless.  Oh, the repeated reinterpret_casts i now see. Could extract this lambda into a real function that does the cast.

> Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm:101
> +    auto makeDeferrer = [&]() -> WheelEventTestMonitorCompletionDeferrer {

Same as above.
Comment 4 Simon Fraser (smfr) 2020-12-01 19:28:44 PST
https://trac.webkit.org/r270338
Comment 5 Radar WebKit Bug Importer 2020-12-01 19:29:20 PST
<rdar://problem/71878326>