Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 03628fa1ba3a53426610340c05a9fe255527e706
      
https://github.com/WebKit/WebKit/commit/03628fa1ba3a53426610340c05a9fe255527e706
  Author: Cole Carley <[email protected]>
  Date:   2026-10-14 (Wed, 14 Oct 2026)

  Changed paths:
    M Source/WebCore/editing/TextIterator.cpp
    M Source/WebCore/editing/TextIterator.h
    M Source/WebCore/page/LocalFrameView.h
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/RemoteFrameLayoutInfo.cpp
    M Source/WebCore/page/RemoteFrameLayoutInfo.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Tools/TestWebKitAPI/Helpers/cocoa/FindTestFixtures.h
    M Tools/TestWebKitAPI/Helpers/cocoa/FindTestPage.h
    M Tools/TestWebKitAPI/Helpers/cocoa/FindTestPage.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FindInteraction.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FindPrivateSPI.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FindPublicAPI.mm

  Log Message:
  -----------
  Find selects a match inside a display: none cross-origin frame in site 
isolation
https://bugs.webkit.org/show_bug.cgi?id=326317
rdar://189163547

Reviewed by Ryosuke Niwa.

Find in page matches are found in display: none cross-origin iframes with site
isolation enabled. The TextIterator checks if iframes are fully clipped in
isClippedByFrameAncestor() by walking up the frame owner elements. In site
isolation, a cross-origin frame is a root frame in its process, so it has no
owner element and the walk always returned false.

The parent frame's process now computes whether each child frame's owner is
fully clipped, using the same check TextIterator uses, and sends it to the child
frame's process in RemoteFrameLayoutInfo. isClippedByFrameAncestor() reads it 
once
the walk reaches a root frame. Since the parent's own bit is part of its check,
frames nested inside a clipped frame across several processes are clipped too.
This covers owners clipped by an ancestor (e.g. a zero-height overflow: hidden
container), not only owners without a renderer.

Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FindInteraction.mm
       Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FindPrivateSPI.mm
       Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FindPublicAPI.mm

* Source/WebCore/editing/TextIterator.cpp:
(WebCore::isClippedByFrameAncestor):
(WebCore::isFrameOwnerFullyClipped):
(WebCore::TextIterator::init):
* Source/WebCore/editing/TextIterator.h:
* Source/WebCore/page/LocalFrameView.h:
(WebCore::LocalFrameView::setOwnerIsFullyClippedInParentFrameProcess):
(WebCore::LocalFrameView::ownerIsFullyClippedInParentFrameProcess const):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::syncLocalFrameInfoToRemote):
* Source/WebCore/page/RemoteFrameLayoutInfo.cpp:
(WebCore::RemoteFrameLayoutInfo::RemoteFrameLayoutInfo):
(WebCore::operator==):
(WebCore::operator<<):
* Source/WebCore/page/RemoteFrameLayoutInfo.h:
(WebCore::RemoteFrameLayoutInfo::ownerIsFullyClipped const):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateChildFrameVisibleRectsFromParent):
* Tools/TestWebKitAPI/Helpers/cocoa/FindTestFixtures.h:
(TestWebKitAPI::FindTestFixtures::childFrameInZeroHeightClipper):
(TestWebKitAPI::FindTestFixtures::absolutelyPositionedChildFrameInZeroHeightClipper):
(TestWebKitAPI::FindTestFixtures::grandchildOfChildFrameInZeroHeightClipper):
(TestWebKitAPI::FindTestFixtures::zeroSizeChildFrame):
(TestWebKitAPI::FindTestFixtures::grandchildOfHiddenChildFrame):
* Tools/TestWebKitAPI/Helpers/cocoa/FindTestPage.h:
* Tools/TestWebKitAPI/Helpers/cocoa/FindTestPage.mm:
(TestWebKitAPI::addFrameSpecRoutes):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FindInteraction.mm:
(TestWebKitAPI::TEST_P):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FindPrivateSPI.mm:
(TestWebKitAPI::TEST_P):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/FindPublicAPI.mm:
(TestWebKitAPI::TEST_P):

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



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

Reply via email to