[webkit-changes] [WebKit/WebKit] 027a60: RefinedForGithub extension cannot be enabled: Inva...

Commit Queue noreply at github.com
Wed Mar 13 19:28:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 027a604092f7e3765e9f22f44e71cbd8c506bf90
      https://github.com/WebKit/WebKit/commit/027a604092f7e3765e9f22f44e71cbd8c506bf90
  Author: Elijah Sawyers <esawyers at apple.com>
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
    M Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIActionCocoa.mm
    M Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPICommandsCocoa.mm
    M Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIMenusCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIAction.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPICommands.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIMenus.mm

  Log Message:
  -----------
  RefinedForGithub extension cannot be enabled: Invalid call to permissions.request()
https://bugs.webkit.org/show_bug.cgi?id=270918
rdar://123775789

Reviewed by Timothy Hatcher.

When requesting permissions (permissions.request()), there is a check to make sure
that the method was called when processing a user gesture. As it stands, the check
doesn't handle events for actions, context menus, and commands. This patch makes
it such that WebCore::UserGestureIndicator::processingUserGesture() returns true
when handling those events.

* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIActionCocoa.mm:
(WebKit::WebExtensionContextProxy::dispatchActionClickedEvent):
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPICommandsCocoa.mm:
(WebKit::WebExtensionContextProxy::dispatchCommandsCommandEvent):
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIMenusCocoa.mm:
(WebKit::WebExtensionContextProxy::dispatchMenusClickedEvent):

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



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


More information about the webkit-changes mailing list