Bug 233678

Summary: Pass the timestamp for scrolling thread animations through all the serviceScrollAnimation() calls
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: ScrollingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, darin, ews-watchlist, fred.wang, jamesr, luiz, simon.fraser, thorton, tonikitoo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Simon Fraser (smfr) 2021-11-30 20:53:21 PST
Pass the timestamp for scrolling thread animations through all the serviceScrollAnimation() calls
Comment 1 Simon Fraser (smfr) 2021-11-30 20:55:07 PST
Created attachment 445510 [details]
Patch
Comment 2 EWS 2021-11-30 23:18:53 PST
Committed r286352 (244711@main): <https://commits.webkit.org/244711@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 445510 [details].
Comment 3 Radar WebKit Bug Importer 2021-11-30 23:19:49 PST
<rdar://problem/85909120>
Comment 4 Darin Adler 2021-12-01 09:22:48 PST
Comment on attachment 445510 [details]
Patch

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

> Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp:362
> +    auto displayFPS = nominalFramesPerSecond().value_or(FullSpeedFramesPerSecond);
> +    return 1_s / (double)displayFPS;

I’d like to understand more about why the cast to double is needed here. Another way to write this is to make the local variable "displayFPS" have type double, but I think we’d want Seconds to do correct division without requiring a typecast. Maybe if we don’t cast to double we end up doing integer division instead of floating point? But if so, why?