[webkit-changes] [WebKit/WebKit] b47184: Merge postAsyncNotification into permissionsDidCha...
Timothy Hatcher
noreply at github.com
Mon Aug 26 19:56:25 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b47184be6c2810abd778acdafeb86291c79f0fd3
https://github.com/WebKit/WebKit/commit/b47184be6c2810abd778acdafeb86291c79f0fd3
Author: Timothy Hatcher <timothy at apple.com>
Date: 2024-08-26 (Mon, 26 Aug 2024)
Changed paths:
M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm
M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h
Log Message:
-----------
Merge postAsyncNotification into permissionsDidChange for WebExtensionContext.
https://webkit.org/b/278681
rdar://problem/134736871
Reviewed by Brian Weinstein and Jeff Miller.
clean up how permissions updates are tracked, by having a single
`permissionsDidChange` function that calls the various functions. This avoids
missing a call site when adding something that needs to track permissions.
Finally, don't fire the notifications when granting or denying permissions
if the permission was already granted / denied. This was triggering additional
work in Safari when it can be avoided by not firing the notification excessively.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::setGrantedPermissions):
(WebKit::WebExtensionContext::setDeniedPermissions):
(WebKit::WebExtensionContext::setGrantedPermissionMatchPatterns):
(WebKit::WebExtensionContext::setDeniedPermissionMatchPatterns):
(WebKit::WebExtensionContext::permissionsDidChange):
(WebKit::WebExtensionContext::grantPermissions):
(WebKit::WebExtensionContext::denyPermissions):
(WebKit::WebExtensionContext::grantPermissionMatchPatterns):
(WebKit::WebExtensionContext::denyPermissionMatchPatterns):
(WebKit::WebExtensionContext::removePermissions):
(WebKit::WebExtensionContext::removePermissionMatchPatterns):
(WebKit::WebExtensionContext::removeExpired):
(WebKit::WebExtensionContext::addInjectedContent):
(WebKit::WebExtensionContext::removeInjectedContent):
(WebKit::WebExtensionContext::postAsyncNotification): Deleted.
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
Canonical link: https://commits.webkit.org/282771@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