https://searchfox.org/wubkat/rev/2517a540e6f5a2037c6843102f3a9cb753f2f9f0/Source/WebCore/dom/UserGestureIndicator.cpp#133-138 The function call (`window->notifyActivated(currentToken()->startTime());`) should happen only for specific events: An activation triggering input event is any event whose isTrusted attribute is true and whose type is one of: "keydown", provided the key is neither the Esc key nor a shortcut key reserved by the user agent. "mousedown". "pointerdown", provided the event's pointerType is "mouse". "pointerup", provided the event's pointerType is not "mouse". "touchend". Here's where we currently trigger it (see EventHandler.cpp notably): https://searchfox.org/wubkat/search?q=symbol:_ZN7WebCore20UserGestureIndicatorC1ESt8optionalINS_26ProcessingUserGestureStateEEPNS_8DocumentENS_15UserGestureTypeENS0_23ProcessInteractionStyleES1_IN3WTF4UUIDEE&redirect=false We don't seem to currently trigger it from pointer events.
<rdar://problem/111970701>
The spec for this is at: https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model
WPT: https://wpt.fyi/results/html/user-activation/activation-trigger-pointerevent.html%3Fmouse?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&view=interop&q=label%3Ainterop-2023-events
Pull request: https://github.com/WebKit/WebKit/pull/18067
Committed 268320@main (df336e8effd7): <https://commits.webkit.org/268320@main> Reviewed commits have been landed. Closing PR #18067 and removing active labels.
This was reverted
Thanks for flipping the bits, Tim. I'll address re-landing soon!
Pull request: https://github.com/WebKit/WebKit/pull/21668
The original fix to address this bug was reverted because it introduced the regression in bug 263887. The PR posted just now attempts to do things "the right way" by imbibing certain web automation script to execute with user activation and not have a blanket "make all web automation script blessed with user activation" policy.
Committed 283353@main (5d09b59ae940): <https://commits.webkit.org/283353@main> Reviewed commits have been landed. Closing PR #21668 and removing active labels.
Committed 283286.32@safari-7620-branch (5c4d89309ff0): <https://commits.webkit.org/283286.32@safari-7620-branch> Reviewed commits have been landed. Closing PR #1735 and removing active labels.