Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a65fcfd58f654367419cbde0de9901fd940c7bce
      
https://github.com/WebKit/WebKit/commit/a65fcfd58f654367419cbde0de9901fd940c7bce
  Author: Vitor Roriz <[email protected]>
  Date:   2025-12-01 (Mon, 01 Dec 2025)

  Changed paths:
    A LayoutTests/fast/events/popup-forwarded-gesture-fetch-expected.txt
    A LayoutTests/fast/events/popup-forwarded-gesture-fetch.html
    M Source/WebCore/Modules/fetch/WindowOrWorkerGlobalScopeFetch.cpp
    M Source/WebCore/bindings/js/JSDOMWindowBase.cpp
    M Source/WebCore/dom/UserGestureIndicator.h

  Log Message:
  -----------
  Propagate user gesture scope through promise microtasks for fetch #54143
https://bugs.webkit.org/show_bug.cgi?id=302803
rdar://157791649

Reviewed by Brent Fulgham.

We already forward user gestures but we hardcode its scope to 
GestureScope::MediaOnly.
LocalDOMWindow::allowPopUp depends on 
UserGestureIndicator::processingUserGesture(),
which returns false if the user gesture scope is not GestureScope::All.

Instead of hardcoding the gesture's scope to ::MediaOnly when forwarding, we can
pass whatever its original scope is.

Test: fast/events/popup-forwarded-gesture-fetch.html

* LayoutTests/fast/events/popup-forwarded-gesture-fetch-expected.txt: Added.
* LayoutTests/fast/events/popup-forwarded-gesture-fetch.html: Added.
* Source/WebCore/Modules/fetch/WindowOrWorkerGlobalScopeFetch.cpp:
(WebCore::doFetch):
* Source/WebCore/bindings/js/JSDOMWindowBase.cpp:
* Source/WebCore/dom/UserGestureIndicator.h:
(WebCore::UserGestureToken::scope const):

Canonical link: https://commits.webkit.org/303733@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to