Bug 234168

Summary: Momentum Event Dispatcher: Tail frames are the wrong velocity if momentum event dispatch rate doesn't match screen refresh rate
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Tim Horton 2021-12-10 12:37:57 PST
Momentum Event Dispatcher: Tail frames are the wrong velocity if momentum event dispatch rate doesn't match screen refresh rate
Comment 1 Tim Horton 2021-12-10 12:38:29 PST
Created attachment 446783 [details]
Patch
Comment 2 Tim Horton 2021-12-10 12:38:32 PST
<rdar://problem/86247557>
Comment 3 Simon Fraser (smfr) 2021-12-10 13:04:29 PST
Comment on attachment 446783 [details]
Patch

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

> Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp:295
> +    DisplayProperties properties;
> +    properties.displayID = displayID;
> +    properties.nominalFrameRate = nominalFramesPerSecond.value_or(WebCore::FullSpeedFramesPerSecond);

auto properties = DisplayProperties { displayID, nominalFramesPerSecond.value_or(WebCore::FullSpeedFramesPerSecond) } ?

> Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.h:78
> +        float nominalFrameRate;

Use the FramesPerSecond type?

> Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.h:144
> +        float displayNominalFrameRate { 0 };

Is this a frames per second, or a frame duration? If the former, can it use FramesPerSecond?
Comment 4 Tim Horton 2021-12-10 14:15:58 PST
Created attachment 446810 [details]
Patch
Comment 5 EWS 2021-12-11 16:39:23 PST
Committed r286919 (245145@main): <https://commits.webkit.org/245145@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446810 [details].