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

  Changed paths:
    M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

  Log Message:
  -----------
  Selecting text inside containers inside site isolated iframes needs to clip 
selection highlight on iOS
https://bugs.webkit.org/show_bug.cgi?id=325005
rdar://185154620

Reviewed by Megan Gardner and Wenson Hsieh.

This is definitely AI-assisted and inspired partially by 318631@main, but when
selecting text on multiple lines on iOS in a site isolated iframe in a 
scrollable div,
we need to clip the text selection highlight to the bounds of whatever contains 
it.
Otherwise, the selection extends infinitely to the right, until the bounds of 
the iframe
clips it by having a layer that is only so big.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::overflowClipRectForSelection):
(WebKit::WebPage::getPlatformEditorState const):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation, SelectionInCrossOriginIframeIsClippedToIframe)):
(TestWebKitAPI::(SiteIsolation, 
SelectionInOverflowScrollerInCrossOriginIframeIsClippedToScroller)):
(TestWebKitAPI::(SiteIsolation, 
SelectionInSameSiteIframeNestedInCrossOriginIframeIsClippedToInnerIframe)):

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



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

Reply via email to