Bug 233678 - Pass the timestamp for scrolling thread animations through all the serviceScrollAnimation() calls
Summary: Pass the timestamp for scrolling thread animations through all the serviceScr...
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: 2021-11-30 20:53 PST by Simon Fraser (smfr)
Modified: 2021-12-01 09:22 PST (History)
10 users (show)

See Also:


Attachments
Patch (19.44 KB, patch)
2021-11-30 20:55 PST, 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-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?