[Webkit-unassigned] [Bug 225559] New: Implement standards-compliant user gesture tracking

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 8 03:57:48 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=225559

            Bug ID: 225559
           Summary: Implement standards-compliant user gesture tracking
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ashley at scirra.com

Safari has a big pile of inconsistent, API-specific code for tracking user gestures. This makes it hard to know if any given code will work with user gestures. It also seems WebKit keeps adding support for propagating user gestures with various new APIs and specific situations, deepening the complexity and presumably adding lots of complicated code.

This is clearly not sustainable in the long term, and it still does not even cover all use cases (e.g. postMessage across a worker is still omitted and is something we need). There needs to be a general purpose solution. Google designed and developed User Activation v2 which solves this (see https://mustaqahmed.github.io/user-activation-v2/) which is apparently now in the spec. This amounts to just two bits of state and a short timeout, and solves all use cases.

Some examples of the various hacks WebKit has collected over the years: user gestures are allowed to propagate through nested timers (issue 172173, from 2017), loading script elements (issue 174959, from 2017), XMLHttpRequest (issue 197428, from 2019) fetch (issue 214444, from 2020), and requestAnimationFrame (issue 223775, from 2021). What about all other APIs? Where will this end?

Please implement the user gesture tracking state as is now described in the spec. It covers all APIs and use cases, including ones WebKit doesn't handle such as postMessage() to a worker and back, makes it simpler for web developers to understand what the rules are, and presumably means you could delete all the hacks added over the years for the various special cases that have been implemented so far.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210508/70b39422/attachment.htm>


More information about the webkit-unassigned mailing list