Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9681e24c3b287eab1f380c38ed7488db874d66fa
      
https://github.com/WebKit/WebKit/commit/9681e24c3b287eab1f380c38ed7488db874d66fa
  Author: Rupin Mittal <[email protected]>
  Date:   2026-06-12 (Fri, 12 Jun 2026)

  Changed paths:
    M Source/WebCore/dom/UserGestureIndicator.cpp

  Log Message:
  -----------
  [Site Isolation] Make UserGestureIndicator not require the mainFrameDocument
https://bugs.webkit.org/show_bug.cgi?id=316924
rdar://179386506

Reviewed by Aditya Keerthi.

After 314903@main, logUserInteractionWithReducedTimeResolution() is capable of
working with a non-mainFrame document. So we amend UserGestureIndicator to not
need to pass in the mainFrameDocument.

It's not possible to add a new test for this. UserGestureIndicator only calls
logUserInteractionWithReducedTimeResolution() when the ProcessInteractionStyle
passed in is ProcessInteractionStyle::Immediate. This only happens for mouse
and touch events (see EventHandler::handleMousePressEvent and handleTouchEvent)
which are always processed in the main frame first. This means that for those
events, the user interaction is already attributed to the main frame's origin.
This scenario is covered by existing tests which still pass after this change
with and without site isolation 
(user-interaction-in-cross-origin-sub-frame.html).

Even though we can't add a new test, it still makes sense to ensure that
UserGestureIndicator isn't dependent on accessing the mainFrameDocument.

* Source/WebCore/dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator):

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



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

Reply via email to