[webkit-reviews] review granted: [Bug 223775] Propagate user gestures through `requestAnimationFrame` just like `setTimeout` : [Attachment 424311] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 29 14:01:07 PDT 2021


Geoffrey Garen <ggaren at apple.com> has granted Devin Rousso
<drousso at apple.com>'s request for review:
Bug 223775: Propagate user gestures through `requestAnimationFrame` just like
`setTimeout`
https://bugs.webkit.org/show_bug.cgi?id=223775

Attachment 424311: Patch

https://bugs.webkit.org/attachment.cgi?id=424311&action=review




--- Comment #4 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 424311
  --> https://bugs.webkit.org/attachment.cgi?id=424311
Patch

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

r=me

> Source/WebCore/ChangeLog:10
> +	   There should be similar features/"affordances" for both so that if a
developer decides

No need to scare-quote affordances -- this is an affordance.

> Source/WebCore/dom/ScriptedAnimationController.cpp:170
> +	   if (userGestureTokenToForward &&
userGestureTokenToForward->hasExpired(UserGestureToken::maximumIntervalForUserG
estureForwarding))
> +	       userGestureTokenToForward = nullptr;
> +	   UserGestureIndicator gestureIndicator(userGestureTokenToForward);

Not new in this patch, but it would be nice (perhaps in a follow-up patch) if
the UserGestureIndicator constructor checked the token for expiration, and
automatically set the null user gesture state in that case. That could
eliminate some boilerplate code and, more importantly, make it impossible to
construct an invalid user gesture state.


More information about the webkit-reviews mailing list