Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0f020dd66e35bea20763cb607e3b3570c0b8e98a
      
https://github.com/WebKit/WebKit/commit/0f020dd66e35bea20763cb607e3b3570c0b8e98a
  Author: Anthony Tarbinian <[email protected]>
  Date:   2026-09-24 (Thu, 24 Sep 2026)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-cross-origin-iframe-expected.txt
    A 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-cross-origin-iframe.html
    A 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-scrolled-cross-origin-iframe-expected.txt
    A 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-scrolled-cross-origin-iframe.html
    A 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-transformed-cross-origin-iframe-expected.txt
    A 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-transformed-cross-origin-iframe.html
    A 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-with-two-same-site-cross-origin-iframes-expected.txt
    A 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-with-two-same-site-cross-origin-iframes.html
    A LayoutTests/http/tests/site-isolation/resources/tall-tap-target-frame.html
    A LayoutTests/http/tests/site-isolation/resources/tap-target-frame.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/page/FrameView.cpp
    M Source/WebCore/page/FrameView.h
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm

  Log Message:
  -----------
  [Site Isolation] Taps on Sign in with Google buttons don't draw highlights
https://bugs.webkit.org/show_bug.cgi?id=323255
rdar://185718733

Reviewed by Kiet Ho.

When tapping on the "Continue" button for sign in with Google iframes, the
highlight when the button is tapped didn't render.

The tap was registering fine, but no highlight was drawn at all.

There were two problems. sendTapHighlightForNodeIfNecessary returned early when
localMainFrame() was null, which is what happens in a cross-origin subframe's
process because the main frame there is a RemoteFrame, so the highlight geometry
was never sent to the UI process. The main frame was only needed to check
whether the tapped node is the body of an editable page and to run a DNS
prefetch for the tapped link, neither of which needs to stop the rest of the
function.

Once that was fixed, the highlight was drawn at the wrong coordinates. The 
node's
quads were mapped with ScrollView::contentsToRootView, which only follows widget
parents and stops at the process boundary, so they stayed relative to the
iframe's origin instead of the main frame's.

In this patch, the editable body check and the DNS prefetch only run when the
main frame is local.
When the main frame is remote the tapped node cannot be its body, and the
function used to return before reaching the prefetch anyway, so site
isolation behavior with a cross-origin iframe is unchanged.

I also added FrameView::contentsToMainFrameView for FloatQuad and switched to
it, which is aware of remote frames and site isolation (it uses
convertToRootViewAcrossIsolatedFrames, so it applies each ancestor frame's
offset, transform and scroll position without any IPC). It takes a quad rather
than a rect because a transformed ancestor frame doesn't preserve axis
alignment.

I didn't use WebPageProxy::convertRectToMainFrameCoordinates for this, since it
needs a message from the UI process to the web process (and returns the wrong
result).

http/tests/site-isolation/ios is skipped by default, so the new tests are opted
in for iOS the way the other tests in that directory are.

Tests: http/tests/site-isolation/ios/tap-highlight-in-cross-origin-iframe.html
       
http/tests/site-isolation/ios/tap-highlight-in-scrolled-cross-origin-iframe.html
       
http/tests/site-isolation/ios/tap-highlight-in-transformed-cross-origin-iframe.html
       
http/tests/site-isolation/ios/tap-highlight-with-two-same-site-cross-origin-iframes.html

* 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-cross-origin-iframe-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-cross-origin-iframe.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-scrolled-cross-origin-iframe-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-scrolled-cross-origin-iframe.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-transformed-cross-origin-iframe-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-in-transformed-cross-origin-iframe.html:
 Added.
* 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-with-two-same-site-cross-origin-iframes-expected.txt:
 Added.
* 
LayoutTests/http/tests/site-isolation/ios/tap-highlight-with-two-same-site-cross-origin-iframes.html:
 Added.
* LayoutTests/http/tests/site-isolation/resources/tall-tap-target-frame.html: 
Added.
* LayoutTests/http/tests/site-isolation/resources/tap-target-frame.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::contentsToMainFrameView const): Added FloatPoint and 
FloatQuad overloads.
* Source/WebCore/page/FrameView.h:
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):

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



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

Reply via email to