Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 6bcd6d58a6fabcbe3c874506d9a89c138a80a821 https://github.com/WebKit/WebKit/commit/6bcd6d58a6fabcbe3c874506d9a89c138a80a821 Author: Sihui Liu <sihui_...@apple.com> Date: 2025-09-17 (Wed, 17 Sep 2025)
Changed paths: M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm M Source/WebKit/UIProcess/WebFrameProxy.cpp M Source/WebKit/UIProcess/WebPageProxy.cpp M Source/WebKit/UIProcess/WebPageProxy.h M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm M Source/WebKit/WebProcess/WebPage/WebPage.h M Source/WebKit/WebProcess/WebPage/WebPage.messages.in M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm Log Message: ----------- [Site Isolation] Make WKFrameGetWebArchive work under site isolation rdar://160665427 https://bugs.webkit.org/show_bug.cgi?id=298920 Reviewed by Ryosuke Niwa. WKFrameGetWebArchive allows client to get webarchive data for a specified frame. To implement that, this patch makes UI process iterate all child frames of the specified frame, get their processes, and send messages to all processes to collect webarchive data for those frames (see `WebPageProxy::getWebArchiveDataWithFrame`). To test the new implementation, this patch adds a new SPI `_createWebArchiveForFrame`, which uses the same underlying function as WKFrameGetWebArchive. To unify the implementation of getting webarchive data with site isolation on and off, this patch also udpates the implementation of API `createWebArchiveDataWithCompletionHandler` to remove the site isolation enablement check and make it always invoke `WebPageProxy::getWebArchiveDataWithFrame`. For backward compatibility, this patch retains the behavior that if the web view has not made any load before the API is invoked, blank page data will be returned. API Test: SiteIsolation.CreateWebArchiveForFrame * Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView createWebArchiveDataWithCompletionHandler:]): (-[WKWebView _createWebArchiveForFrame:completionHandler:]): * Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h: * Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::getWebArchiveData): (WebKit::WebPageProxy::getWebArchiveDataWithFrame): * Source/WebKit/UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::getWebArchive): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getWebArchiveOfFrame): Deleted. (WebKit::WebPageProxy::getWebArchive): Deleted. * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm: (WebKit::WebPage::getWebArchivesForFrames): (WebKit::WebPage::getWebArchiveData): (WebKit::WebPage::getWebArchives): Deleted. * Source/WebKit/WebProcess/WebPage/WebPage.h: * Source/WebKit/WebProcess/WebPage/WebPage.messages.in: * Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm: (TestWebKitAPI::(SiteIsolation, CreateWebArchiveForFrame)): Canonical link: https://commits.webkit.org/300098@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes