Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 22412678c3fec6d8ec29ff4af2e25de631f69f3b
      
https://github.com/WebKit/WebKit/commit/22412678c3fec6d8ec29ff4af2e25de631f69f3b
  Author: Zak Ridouh <[email protected]>
  Date:   2026-10-11 (Sun, 11 Oct 2026)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation] Remove `convertRectToMainFrameCoordinates` and deprecate the 
`_convertRect:fromFrame:toMainFrameCoordinates:` SPI
https://bugs.webkit.org/show_bug.cgi?id=327108
rdar://189720248

Reviewed by Tim Nguyen.

WebPageProxy::convertRectToMainFrameCoordinates converted a rect to main frame 
coordinates with a
chain of asynchronous ContentsToRootViewRect messages to the process of each 
ancestor frame, which
gave wrong results in some cases, such as in scrolled cross-origin iframes. 
Every WebKit caller now
computes main frame coordinates in the web process with contentsToMainFrameView 
instead, so its only
remaining caller is the -[WKWebView 
_convertRect:fromFrame:toMainFrameCoordinates:] SPI, which no
longer has any clients.

Remove WebPageProxy::convertRectToMainFrameCoordinates and the 
ContentsToRootViewRect message. Also
remove the ContentsToRootViewPoint message, which has had no sender since
WebPageProxy::convertPointToMainFrameCoordinates was removed.

Keep the SPI for binary compatibility, since its last client stopped using it 
only recently, but
deprecate it and make it call the completion handler with an empty rect and an
NSFeatureUnsupportedError.

* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _convertRect:fromFrame:toMainFrameCoordinates:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::convertRectToMainFrameCoordinates): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::contentsToRootViewRect): Deleted.
(WebKit::WebPage::contentsToRootViewPoint): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::testImageServiceControlledImageBounds):
(TestWebKitAPI::TEST(SiteIsolation, CoordinateTransformation)): Deleted.

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



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

Reply via email to