Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5ed175038d30803bc01a545bb27dac5e445f767e
      
https://github.com/WebKit/WebKit/commit/5ed175038d30803bc01a545bb27dac5e445f767e
  Author: Brian Weinstein <[email protected]>
  Date:   2026-09-26 (Sat, 26 Sep 2026)

  Changed paths:
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm
    M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIOffscreen.mm

  Log Message:
  -----------
  Web Extension offscreen document calling window.close() doesn't close the 
document
https://bugs.webkit.org/show_bug.cgi?id=325311
rdar://188408957

Reviewed by Kiara Rose and Timothy Hatcher.

Hook up the _WKWebExtensionContextDelegate to handle webViewDidClose, and 
forward it to the WebExtensionContext.

The WebExtensionContext will close an offscreen document that called 
window.close().

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIOffscreen.mm

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(-[_WKWebExtensionContextDelegate webViewDidClose:]):
(WebKit::WebExtensionContext::webViewDidClose):
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIOffscreen.mm:
(TestWebKitAPI::TEST_F(WKWebExtensionAPIOffscreen, 
WindowCloseFromDocumentClosesDocument)):

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



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

Reply via email to