[webkit-changes] [WebKit/WebKit] fff2fd: browser.commands missing when action command has n...

Timothy Hatcher noreply at github.com
Wed Jan 3 13:36:00 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fff2fd0be2e4544d9141f1f6ea058c932e49c823
      https://github.com/WebKit/WebKit/commit/fff2fd0be2e4544d9141f1f6ea058c932e49c823
  Author: Timothy Hatcher <timothy at apple.com>
  Date:   2024-01-03 (Wed, 03 Jan 2024)

  Changed paths:
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPICommands.mm

  Log Message:
  -----------
  browser.commands missing when action command has no description (breaks 1Password)
https://webkit.org/b/267058
rdar://120391725

Reviewed by Brian Weinstein.

The description is optional for action commands in the manifest. We currently log an error
and return no commands, so the commands API is omitted. This change makes the action commands
fallback to the action label if the description key is missing. An error is still logged
for standard commands that are missing a description.

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm:
(WebKit::WebExtension::populateCommandsIfNeeded): Adjusted logic to only require description for
standard commands and not action commands.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPICommands.mm:
(TestWebKitAPI::TEST): Adjusted current test manifest and GetAll test to check fallback.

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




More information about the webkit-changes mailing list