Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 366e62cee33201aa57470a99cb9ecabbc0d5b7d8
      
https://github.com/WebKit/WebKit/commit/366e62cee33201aa57470a99cb9ecabbc0d5b7d8
  Author: Brady Eidson <[email protected]>
  Date:   2026-08-17 (Mon, 17 Aug 2026)

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

  Log Message:
  -----------
  [Site Isolation] Web inspector extension panels cannot find the inspected tab
rdar://185031280
https://bugs.webkit.org/show_bug.cgi?id=321866

Reviewed by Timothy Hatcher.

With site isolation the Web Inspector frontend page and the extension's dev 
tools background
page are in different web content processes. We sent the frontend page's 
identifier to the
background page's process, where it means nothing, so the frontend page was 
never registered.
Panels look up their tab through that page, so devtools.inspectedWindow.tabId 
returned the
"none" value instead of the inspected tab.

Now we send each identifier to the processes hosting the page it names, and 
include the frontend
page's processes in processes(), since panels live there and listen for those 
events too.

Also replaced the foreground activity branch with a ProcessActivityGroup, which 
covers the
page's current process and any it later spreads to.

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

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::processes const):
(WebKit::WebExtensionContext::loadInspectorBackgroundPage):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIDevTools.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPIDevTools, 
PortMessagePassingFromPanelToDevToolsBackground)):
(TestWebKitAPI::TEST(WKWebExtensionAPIDevTools, InspectedWindowTabIdFromPanel)):

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



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

Reply via email to