Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1478a332edc9750c30234e585e7bb11b42bd8ad5
      
https://github.com/WebKit/WebKit/commit/1478a332edc9750c30234e585e7bb11b42bd8ad5
  Author: Zak Ridouh <[email protected]>
  Date:   2026-10-13 (Tue, 13 Oct 2026)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Tools/TestWebKitAPI/PlatformCocoa.cmake
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A 
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolationUIDelegateTests.swift

  Log Message:
  -----------
  [Site Isolation] beforeunload dialogs from cross-site iframes ignore a UI 
delegate set after load
https://bugs.webkit.org/show_bug.cgi?id=327067
rdar://problem/189680146

Reviewed by BJ Burg.

setUIClient() and setCanRunModal() sent SetCanRunBeforeUnloadConfirmPanel and 
SetCanRunModal only to the main frame's
WebContent process, so existing cross-site iframe processes kept the stale 
values. Send both messages to every
WebContent process for the page.

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

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setUIClient):
(WebKit::WebPageProxy::setCanRunModal):
* Tools/TestWebKitAPI/PlatformCocoa.cmake:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* 
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolationUIDelegateTests.swift: 
Added.
(BeforeUnloadDelegate._webView(_:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:)):
(SiteIsolationUIDelegateTests.beforeUnloadDelegateSetAfterCrossOriginIframeLoads):

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



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

Reply via email to