RESOLVED FIXED 78938
Have ScrollAnimatorNone use requestAnimationFrame
https://bugs.webkit.org/show_bug.cgi?id=78938
Summary Have ScrollAnimatorNone use requestAnimationFrame
Scott Byer
Reported 2012-02-17 15:10:18 PST
Have ScrollAnimatorNone use requestAnimationFrame
Attachments
Patch (13.25 KB, patch)
2012-03-01 16:23 PST, Scott Byer
no flags
Remove HostWindows, virtualize scheduleAnimation instead, handle non-rAF compile case (11.45 KB, patch)
2012-03-06 17:16 PST, Scott Byer
no flags
Clean out compiler conditionals (10.99 KB, patch)
2012-03-07 13:13 PST, Scott Byer
no flags
Scott Byer
Comment 1 2012-03-01 16:23:17 PST
Scott Byer
Comment 2 2012-03-01 16:28:34 PST
James, any thoughts on this? I'm still trying to collect various traces to be sure this isn't messing things up.
James Robinson
Comment 3 2012-03-01 16:33:09 PST
Comment on attachment 129768 [details] Patch Ooo, nice! Suggestion: instead of a HostWindow getter on ScrollableArea, what about a virtual func to request a serviceScrollAnimations() call that the subclasses can implement?
Scott Byer
Comment 4 2012-03-01 16:48:14 PST
You mean a scheduleAnimation() call? I'm also realizing I didn't bury these changes under ENABLE(REQUEST_ANIMATION_FRAME), so they look cleaner than they should be ;-).
James Robinson
Comment 5 2012-03-01 16:55:22 PST
Yeah, exactly. Theoretically ScrollableAreas that don't have HostWindows could implement this with whatever mechanism they want.
Scott Byer
Comment 6 2012-03-06 17:16:47 PST
Created attachment 130481 [details] Remove HostWindows, virtualize scheduleAnimation instead, handle non-rAF compile case This version of the patch is ready for review, but I'm still checking traces, and it might conflict with 79827, checking...
James Robinson
Comment 7 2012-03-06 18:43:38 PST
Comment on attachment 130481 [details] Remove HostWindows, virtualize scheduleAnimation instead, handle non-rAF compile case View in context: https://bugs.webkit.org/attachment.cgi?id=130481&action=review Are there any platforms that actually compile in ScrollAnimatorNone.cpp and do not set ENABLE(REQUEST_ANIMATION_FRAME)? if not, then all of these guards in the middle of the file are not useful > Source/WebCore/platform/ScrollAnimatorNone.cpp:493 > +#if ENABLE(REQUEST_ANIMATION_FRAME) > +void ScrollAnimatorNone::animationTimerFired() > +#else > void ScrollAnimatorNone::animationTimerFired(Timer<ScrollAnimatorNone>* timer) > +#endif i think this could be refactored to be a lot less if-deffy. For instance, you could factor all of the calculation code into a function that takes a timestamp as a parameter and move the schedule-a-new-tick outside of it. > Source/WebCore/platform/ScrollableArea.h:159 > +#if ENABLE(REQUEST_ANIMATION_FRAME) the #ifdef and runtime guards seem redundant. if a platform doesn't set ENABLE(REQUEST_ANIMATION_FRAME) they can just return false from this function and everything should Just Work (TM)
Scott Byer
Comment 8 2012-03-07 13:13:18 PST
Created attachment 130676 [details] Clean out compiler conditionals
James Robinson
Comment 9 2012-03-07 15:56:55 PST
Comment on attachment 130676 [details] Clean out compiler conditionals This looks good. Are you just waiting for EWS results before landing?
Scott Byer
Comment 10 2012-03-07 16:01:25 PST
I wanted to get in some manual testing on it tomorrow - I think it should be fine, but I want to double-check before marking it c?.
James Robinson
Comment 11 2012-03-07 16:47:17 PST
Sounds good, set cq? whenever you are comfortable.
Scott Byer
Comment 12 2012-03-08 11:08:27 PST
Comment on attachment 130676 [details] Clean out compiler conditionals Ok, the traces look good, it's good to go.
WebKit Review Bot
Comment 13 2012-03-08 11:37:49 PST
Comment on attachment 130676 [details] Clean out compiler conditionals Clearing flags on attachment: 130676 Committed r110185: <http://trac.webkit.org/changeset/110185>
WebKit Review Bot
Comment 14 2012-03-08 11:37:53 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.