Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 98c97d08a135b120b8e0db74d573f745b1845c77
      
https://github.com/WebKit/WebKit/commit/98c97d08a135b120b8e0db74d573f745b1845c77
  Author: Ryosuke Niwa <[email protected]>
  Date:   2026-10-07 (Wed, 07 Oct 2026)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/touch-events/resources/post-message-on-click.html
    A 
LayoutTests/http/tests/site-isolation/touch-events/tap-cross-origin-iframe-border-expected.txt
    A 
LayoutTests/http/tests/site-isolation/touch-events/tap-cross-origin-iframe-border.html
    A 
LayoutTests/http/tests/site-isolation/touch-events/tap-near-cross-origin-iframe-expected.txt
    A 
LayoutTests/http/tests/site-isolation/touch-events/tap-near-cross-origin-iframe.html
    M LayoutTests/platform/ios-site-isolation/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm

  Log Message:
  -----------
  [Site Isolation] [iOS] 
imported/w3c/web-platform-tests/html/user-activation/propagation-crossorigin.sub.html
 fails
https://bugs.webkit.org/show_bug.cgi?id=326577

Reviewed by Aditya Keerthi and Wenson Hsieh.

When a tap's target is a frame owner element whose content frame is in another 
process,
WebPage::potentialTapAtPosition and WebPage::commitPotentialTap forwarded the 
tap to that frame
regardless of where on the owner element the tap landed, and used the tap's 
original location
rather than the location adjusted by LocalFrame::nodeRespondingToClickEvents.

As a result, a tap that was adjusted onto the border or padding of a 
cross-origin iframe was
forwarded to the iframe's content at a point outside of it, and dropped. 
Without site isolation,
EventHandler::subframeForHitTestResult only routes a mouse event into a 
subframe when the hit test
is over the subframe's content (HitTestResult::isOverWidget), so such a tap 
clicks the owner element
in the parent frame instead. Similarly, a tap adjusted onto a cross-origin 
iframe from outside of it
was forwarded at the original location, which is outside the iframe, and 
dropped.

Fixed the bug by forwarding a tap to a remote frame only when the adjusted 
location is over the
frame's content, and by forwarding the adjusted location.

Tests: 
http/tests/site-isolation/touch-events/tap-cross-origin-iframe-border.html
       http/tests/site-isolation/touch-events/tap-near-cross-origin-iframe.html

* 
LayoutTests/http/tests/site-isolation/touch-events/resources/post-message-on-click.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/touch-events/tap-cross-origin-iframe-border-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/touch-events/tap-cross-origin-iframe-border.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/touch-events/tap-near-cross-origin-iframe-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/touch-events/tap-near-cross-origin-iframe.html:
 Added.
* LayoutTests/platform/ios-site-isolation/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::remoteFrameForTapTarget): Added.
(WebKit::WebPage::potentialTapAtPosition):
(WebKit::WebPage::commitPotentialTap):

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



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

Reply via email to