Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b0da4c18f786cf60aa8ee4b0a2d02f091627c526
https://github.com/WebKit/WebKit/commit/b0da4c18f786cf60aa8ee4b0a2d02f091627c526
Author: Razvan Caliman <[email protected]>
Date: 2026-08-12 (Wed, 12 Aug 2026)
Changed paths:
M Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp
Log Message:
-----------
[Web Automation] WebDriver commands hang for elements in cross-origin iframes
under Site Isolation
https://bugs.webkit.org/show_bug.cgi?id=321440
rdar://184526544
Reviewed by BJ Burg.
Element Send Keys, Element Clear, Get Element Rect, and Element Click commands
hang
in cross-origin iframes under Site Isolation.
`WebAutomationSessionProxy::computeElementLayout()` and `takeScreenshot()`
reached to the page's
main frame to convert position coordinates, via
`dynamicDowncast<LocalFrame>(mainFrame())`.
When Site Isolation is enabled, the main frame of an
out-of-process iframe is a RemoteFrame,
so the downcast produces `null` and both functions early return, destroying
their completion
handler without calling it. This prevents an IPC reply from ever being, so the
automation command
never completes and the WebDriver client hangs until it times out.
This affects every command that computes an element's layout for an element
inside a cross-origin iframe:
Element Send Keys, Element Clear, Element Click and Get Element Rect.
This patch introduces a change to convert through the frame's local root
instead of the page's main frame.
This is not a new approximation: `LocalFrameView::contentsToRootView()` already
stops at the local root,
so the existing conversion helpers produce local-root coordinates and pairing
them with the local
root's view is consistent. Without Site Isolation the local root is the main
frame, so behavior there is unchanged.
When the local root has no view, reply with an error instead of dropping the
completion handler,
so that any future failure surfaces as a WebDriver error rather than as a hang.
* Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::computeElementLayout):
(WebKit::WebAutomationSessionProxy::takeScreenshot):
Canonical link:
https://flagged.apple.com:443/proxy?t2=Di1y3v9RW9&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE5MDI2QG1haW4=&emid=fc101342-9e9c-4c1c-a09e-ce343c5fe19f&c=11
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications