Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 48a549d19069fa0b192096d9ff87c57816060876
https://github.com/WebKit/WebKit/commit/48a549d19069fa0b192096d9ff87c57816060876
Author: Zak Ridouh <[email protected]>
Date: 2026-09-24 (Thu, 24 Sep 2026)
Changed paths:
M Source/WebCore/page/FrameView.cpp
M Source/WebCore/page/FrameView.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/WebProcess/WebCoreSupport/WebPopupMenu.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] <select> popup menu opens at the top of the page in a
scrolled cross-origin iframe
https://bugs.webkit.org/show_bug.cgi?id=324912
rdar://187215530
Reviewed by Kiet Ho.
WebPopupMenu::show sent the popup rect in the iframe's own root view
coordinates, and
WebPageProxy::showPopupMenuFromFrame converted it with
convertRectToMainFrameCoordinates.
That conversion runs contentsToRootView on the RemoteFrameView in the parent
process, whose
scroll position mirrors the iframe's, so the iframe's scroll offset was
subtracted twice and
the menu was anchored above the view (and pinned to the top by AppKit).
Like the color picker and validation bubble, convert the rect to main frame
view coordinates
in the web process with contentsToMainFrameView (adding an IntPoint overload),
and use it
as-is in the UI process. Only the location is converted so the popup keeps the
element's
untransformed size, as before. Also fold showPopupMenu into
showPopupMenuFromFrame now that
there's no async conversion step.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::contentsToMainFrameView const):
* Source/WebCore/page/FrameView.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenuFromFrame):
(WebKit::WebPageProxy::showPopupMenu): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebPopupMenu.cpp:
(WebKit::WebPopupMenu::show):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation, SelectPopupMenuLocationInCrossSiteIframe)):
(TestWebKitAPI::(SiteIsolation,
SelectPopupMenuLocationInScrolledCrossSiteIframe)):
(TestWebKitAPI::(SiteIsolation,
SelectPopupMenuLocationInCrossSiteIframeWithScrolledMainFrame)):
(TestWebKitAPI::(SiteIsolation,
SelectPopupMenuLocationInScrolledCrossSiteIframeWithScrolledMainFrame)):
Canonical link: https://commits.webkit.org/321859@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications