Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 822589b03bb7f01e3f13d8455a7e3d612d8e9187
      
https://github.com/WebKit/WebKit/commit/822589b03bb7f01e3f13d8455a7e3d612d8e9187
  Author: Zak Ridouh <[email protected]>
  Date:   2026-10-14 (Wed, 14 Oct 2026)

  Changed paths:
    M Source/WebCore/workers/service/ServiceWorkerWindowClient.cpp
    M Source/WebKit/UIProcess/WebFrameProxy.cpp
    M Source/WebKit/UIProcess/WebFrameProxy.h
    M Tools/TestWebKitAPI/PlatformCocoa.cmake
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A 
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolationServiceWorkerTests.swift

  Log Message:
  -----------
  [Site Isolation] WindowClient.navigate() resolves to null for cross-site 
iframe clients
<https://bugs.webkit.org/show_bug.cgi?id=326730>
<rdar://problem/189447228>

Reviewed by BJ Burg.

WebFrameProxy reported the main frame process's page identifier after 
navigating a service worker client, so the
network process couldn't match a navigated cross-site iframe to its client and 
WindowClient.navigate() resolved to
null. Report the page identifier the frame's own process uses instead.

The ASSERT in ServiceWorkerWindowClient::navigate assumed that a client's top 
origin is its own origin, which isn't
true of a third-party iframe client. Compare only the client origin.

Test: 
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolationServiceWorkerTests.swift

* Source/WebCore/workers/service/ServiceWorkerWindowClient.cpp:
(WebCore::ServiceWorkerWindowClient::navigate):
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::navigateServiceWorkerClient):
(WebKit::WebFrameProxy::didFinishLoad):
(WebKit::WebFrameProxy::setUpPolicyListenerProxy):
(WebKit::WebFrameProxy::pageIdentifier const): Deleted.
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Tools/TestWebKitAPI/PlatformCocoa.cmake:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* 
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolationServiceWorkerTests.swift:
 Added.
(SiteIsolationServiceWorkerTests.windowClientNavigateResolvesToNavigatedClientInControlledCrossSiteIframe):

Canonical link: https://commits.webkit.org/323776@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to