Bug 225834 - Allow wheel events to be coalesced during scroll deceleration
Summary: Allow wheel events to be coalesced during scroll deceleration
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-14 17:00 PDT by Simon Fraser (smfr)
Modified: 2021-05-17 11:00 PDT (History)
3 users (show)

See Also:


Attachments
Patch (8.99 KB, patch)
2021-05-14 17:43 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (9.02 KB, patch)
2021-05-14 20:28 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-05-14 17:00:15 PDT
Allow wheel events to be coalesced during scroll deceleration
Comment 1 Simon Fraser (smfr) 2021-05-14 17:43:15 PDT
Created attachment 428692 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-05-14 17:43:47 PDT
<rdar://70402512>
Comment 3 Tim Horton 2021-05-14 17:51:48 PDT
Comment on attachment 428692 [details]
Patch

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

> Source/WebKit/Shared/WebWheelEventCoalescer.cpp:152
> +        static constexpr double momentumVelocityEventFrequencyReductionThreashold = 320.0; // Points per second.

Threashold!
Comment 4 Sam Weinig 2021-05-14 17:58:55 PDT
Comment on attachment 428692 [details]
Patch

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

> Source/WebKit/Shared/WebWheelEventCoalescer.cpp:90
> +bool WebWheelEventCoalescer::isInMomentumPhase(const WebWheelEvent& event)

This feels like an odd name for what this checks. It should either have a more descriptive name or at least have a comment explaining things.

> Source/WebKit/Shared/WebWheelEventCoalescer.cpp:151
> +    if (isInMomentumPhase(event) && shouldCoalesceEventsDuringDeceleration() && lastEventInterval && lastEventInterval) {

"lastEventInterval && lastEventInterval" seems duplicated.

> Source/WebKit/Shared/WebWheelEventCoalescer.cpp:152
> +        static constexpr double momentumVelocityEventFrequencyReductionThreashold = 320.0; // Points per second.

No need for the static here.

> Source/WebKit/Shared/WebWheelEventCoalescer.cpp:155
> +        static constexpr auto maxCoalescingInterval = WebCore::FullSpeedAnimationInterval;

No need for the static here.

> Source/WebKit/UIProcess/WebPageProxy.cpp:2829
> +    auto framesPerSecond = m_process->processPool().nominalFramesPerSecondForDisplay(*m_displayID);

Not new, but it is still bizarre this on the process pool.
Comment 5 Simon Fraser (smfr) 2021-05-14 20:28:25 PDT
Created attachment 428704 [details]
Patch
Comment 6 Simon Fraser (smfr) 2021-05-17 11:00:13 PDT
Comment on attachment 428704 [details]
Patch

http://trac.webkit.org/changeset/277587/webkit