Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 133ceaf9e9d8a2eee2cbb83827ab03975bbff8e2
https://github.com/WebKit/WebKit/commit/133ceaf9e9d8a2eee2cbb83827ab03975bbff8e2
Author: Timothy Hatcher <[email protected]>
Date: 2025-06-03 (Tue, 03 Jun 2025)
Changed paths:
M Source/WebKit/Shared/Extensions/WebExtensionMessageTargetParameters.h
M
Source/WebKit/Shared/Extensions/WebExtensionMessageTargetParameters.serialization.in
M
Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPITabsCocoa.mm
M
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIRuntimeCocoa.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIRuntime.mm
M Tools/TestWebKitAPI/cocoa/WebExtensionUtilities.h
Log Message:
-----------
tabs.sendMessage() also sends the message to the tab's opener.
https://webkit.org/b/289640
rdar://problem/146886179
Reviewed by Brian Weinstein.
Since window.open() web views share the same web process, tabs.sendMessage must
include the target
web page’s identifier to ensure messages are delivered only to that specific
page, avoiding
unintended delivery to other pages within the same process.
* Source/WebKit/Shared/Extensions/WebExtensionMessageTargetParameters.h: Add
web page identifier.
*
Source/WebKit/Shared/Extensions/WebExtensionMessageTargetParameters.serialization.in:
Ditto.
*
Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPITabsCocoa.mm:
(WebKit::WebExtensionContext::tabsSendMessage): Add the web page identifier for
the tab
to a copy of the target parameters.
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIRuntimeCocoa.mm:
(WebKit::matches): Check the web page identifier if it is supplied.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIRuntime.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPITabs,
SendMessageFromBackgroundToOpenedWindow)): Added.
* Tools/TestWebKitAPI/cocoa/WebExtensionUtilities.h: Removed a stray space.
Canonical link: https://commits.webkit.org/295792@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes