Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9a90b5af0558a9b1bfa2f6500cfc1efcf51bd703
https://github.com/WebKit/WebKit/commit/9a90b5af0558a9b1bfa2f6500cfc1efcf51bd703
Author: Abrar Rahman Protyasha <a_protya...@apple.com>
Date: 2026-07-31 (Fri, 31 Jul 2026)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UnifiedPDFTests.mm
Log Message:
-----------
[Site Isolation] PDF HUD of cross-origin <iframe src=pdf> gets displaced by
main frame scroll offset
https://bugs.webkit.org/show_bug.cgi?id=320592
rdar://183356213
Reviewed by Richard Robinson.
With site isolation enabled, if a remote parent's geometry changes (say,
the frame scroll position), that does not actually modify the
cross-origin <iframe> plugin's local root view transform. As such, we
need to ask the plugin to re-report its HUD location to the UI process,
which runs the main frame conversion with newer geometry. Otherwise,
when the top-level page scrolls the HUD stays where it was first placed
and drifts out of the iframe.
We hook up this "ask the plugin" part by keying off frame tree sync data
and calling WebPage::updatePDFHUDLocationsAfterRemoteFrameGeometryChange,
which enumerates through the tracked PDF plugins and asks them to
produce HUD location updates.
Test:
TestWebKitAPI.UnifiedPDF/EmbeddedPDFHUDSiteIsolation.HUDTracksMainFrameScroll
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::frameTreeSyncDataChangedInAnotherProcess):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::updatePDFHUDLocationsAfterRemoteFrameGeometryChange):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UnifiedPDFTests.mm:
(TestWebKitAPI::EmbeddedPDFHUDSiteIsolation::scrollableMainHTML const):
(TestWebKitAPI::EmbeddedPDFHUDSiteIsolation::loadAndWaitForHUD):
(TestWebKitAPI::TEST_P):
We hoist the shared test setup into SetUp() (the gtest sanctioned test
class initializer), which makes the main test logic easier to read.
Canonical link: https://commits.webkit.org/318330@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications