Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 791128e0c9adf467dc218b396e8e7c5932f72871
https://github.com/WebKit/WebKit/commit/791128e0c9adf467dc218b396e8e7c5932f72871
Author: Kiet Ho <[email protected]>
Date: 2026-09-29 (Tue, 29 Sep 2026)
Changed paths:
M Source/WebCore/dom/mac/ImageControlsMac.cpp
M Source/WebCore/page/FrameView.cpp
M Source/WebCore/page/FrameView.h
M Source/WebCore/page/mac/ServicesOverlayController.mm
M Source/WebKit/Shared/ContextMenuContextData.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/WebProcess/WebPage/WebContextMenu.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] REGRESSION(317940@main): Context menu is positioned
incorrectly in scrolled isolated iframes
rdar://184770853
https://bugs.webkit.org/show_bug.cgi?id=325329
Reviewed by Ryosuke Niwa and Abrar Rahman Protyasha.
WebPageProxy::showContextMenuFromFrame was using
convertRectsToMainFrameCoordinates
to convert the context menu's position, which is wrong. Fix it by switching
to contentsToMainFrameView.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
* Source/WebCore/dom/mac/ImageControlsMac.cpp:
(WebCore::ImageControlsMac::handleEvent):
- Switch from contentsToWindow to contentsToMainFrameView. I believe it
should
have used contentsToRootView from the beginning, so changing to
contentsToMainFrameView is right.
* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::convertToRootViewAcrossIsolatedFrames const):
* Source/WebCore/page/FrameView.h:
- Add contentsToMainFrameView(IntPoint).
* Source/WebCore/page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::handleClick):
- Switch from contentsToWindow to contentsToMainFrameView. Again I believe
it
should have used contentsToRootView from the beginning.
* Source/WebKit/Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::controlledImageBounds const):
(WebKit::ContextMenuContextData::setMenuLocation): Deleted.
(WebKit::ContextMenuContextData::setControlledImageBounds): Deleted.
- Remove no longer needed setters.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showContextMenuFromFrame):
(WebKit::WebPageProxy::showContextMenu): Deleted.
- Fold into showContextMenuFromFrame.
(WebKit::WebPageProxy::convertRectsToMainFrameCoordinates): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
- Remove this method, as nothing else uses it.
* Source/WebKit/WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
- Switch from contentsToRootView to contentsToMainFrameView.
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::contentsToRootViewRects): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
- Remove ContentsToRootViewRects IPC, as nothing else uses it.
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleImageServiceClick):
(WebKit::WebPage::handlePDFServiceClick):
- There're two places that forget to convert from content to main frame
view,
so I added the conversion.
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation, ContextMenuLocationInCrossSiteIframe)):
(TestWebKitAPI::(SiteIsolation, ContextMenuLocationInScrolledCrossSiteIframe)):
(TestWebKitAPI::(SiteIsolation,
ContextMenuLocationInCrossSiteIframeWithScrolledMainPage)):
(TestWebKitAPI::(SiteIsolation,
ContextMenuLocationInScrolledCrossSiteIframeWithScrolledMainPage)):
- Added tests for context menu location.
(TestWebKitAPI::(SiteIsolation,
ImageServiceControlledImageBoundsInCrossOriginIframe)):
(TestWebKitAPI::(SiteIsolation,
ImageServiceControlledImageBoundsInScrolledCrossOriginIframe)):
(TestWebKitAPI::(SiteIsolation,
ImageServiceControlledImageBoundsInCrossOriginIframeWithScrolledMainPage)):
(TestWebKitAPI::(SiteIsolation,
ImageServiceControlledImageBoundsInScrolledCrossOriginIframeWithScrolledMainPage)):
Canonical link: https://commits.webkit.org/322203@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications