Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9a753fd3e08746a0158839beeb86738c51e3d5f8
      
https://github.com/WebKit/WebKit/commit/9a753fd3e08746a0158839beeb86738c51e3d5f8
  Author: Brian Weinstein <[email protected]>
  Date:   2024-09-04 (Wed, 04 Sep 2024)

  Changed paths:
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCommandCocoa.mm
    M 
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPINamespaceCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtension.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPICommands.mm

  Log Message:
  -----------
  Don't return early from populateCommandsIfNeeded if the dictionary is empty
https://bugs.webkit.org/show_bug.cgi?id=279164
rdar://135279505

Reviewed by Timothy Hatcher.

If an extension specifies an empty "commands" manifest entry (or no entry at 
all), we still want to give it an `_execute_*_action` command. This PR
makes that change and adds a test.

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm:
(WebKit::WebExtension::populateCommandsIfNeeded): Only return early if the 
commands entry is malformed, not just if it's empty.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCommandCocoa.mm:
(WebKit::WebExtensionCommand::setActivationKey): Add comments for what these 
values represent.
* 
Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPINamespaceCocoa.mm:
(WebKit::WebExtensionAPINamespace::isPropertyAllowed): Consider an empty 
dictionary entry non-nil.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPICommands.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPICommands, GetAllCommandsEmptyManifest)):

Canonical link: https://commits.webkit.org/283189@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

Reply via email to