[webkit-changes] [WebKit/WebKit] a73477: Add source origin information to WKUIDelegate call...

Brady Eidson noreply at github.com
Mon Dec 19 22:56:34 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a7347736572758d9f671498aaab7ec3b37ca88cb
      https://github.com/WebKit/WebKit/commit/a7347736572758d9f671498aaab7ec3b37ca88cb
  Author: Brady Eidson <beidson at apple.com>
  Date:   2022-12-19 (Mon, 19 Dec 2022)

  Changed paths:
    M Source/WebKit/PlatformMac.cmake
    M Source/WebKit/UIProcess/API/APIUIClient.h
    M Source/WebKit/UIProcess/API/Cocoa/WKSecurityOrigin.mm
    A Source/WebKit/UIProcess/API/Cocoa/WKSecurityOriginPrivate.h
    M Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
    M Source/WebKit/UIProcess/Cocoa/UIDelegate.h
    M Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
    M Source/WebKit/UIProcess/WebProcessProxy.cpp
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/Badging.mm

  Log Message:
  -----------
  Add source origin information to WKUIDelegate calls for badging
https://bugs.webkit.org/show_bug.cgi?id=249618
rdar://103536731

Reviewed by Chris Dumez.

API clients need to be able to decide whether to allow a badging update based on source origin.

In the case of the shared/service worker update coming through the _WKWebsiteDataStoreDelegate,
all the information was there.

Not adding it to the WKUIDelegate was an oversight.

This fixes that.

* Source/WebKit/PlatformMac.cmake:
* Source/WebKit/UIProcess/API/APIUIClient.h:
(API::UIClient::updateAppBadge):
(API::UIClient::updateClientBadge):
* Source/WebKit/UIProcess/API/Cocoa/WKSecurityOrigin.mm:
(-[WKSecurityOrigin isSameSiteAsOrigin:]):
(-[WKSecurityOrigin isSameSiteAsURL:]):
* Source/WebKit/UIProcess/API/Cocoa/WKSecurityOriginPrivate.h: Copied from Source/WebKit/UIProcess/API/Cocoa/WKSecurityOrigin.mm.
* Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* Source/WebKit/UIProcess/Cocoa/UIDelegate.h:
* Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::updateAppBadge):
(WebKit::UIDelegate::UIClient::updateClientBadge):
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::setAppBadge):
(WebKit::WebProcessProxy::setClientBadge):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/Badging.mm:
(-[BadgeDelegate updatedAppBadge:fromOrigin:]):
(-[BadgeDelegate _webView:updatedAppBadge:fromSecurityOrigin:]):
(-[BadgeDelegate _webView:updatedClientBadge:fromSecurityOrigin:]):
(-[BadgeDelegate websiteDataStore:workerOrigin:updatedAppBadge:]):
(-[BadgeDelegate updatedAppBadge:]): Deleted.
(-[BadgeDelegate _webView:updatedAppBadge:]): Deleted.
(-[BadgeDelegate _webView:updatedClientBadge:]): Deleted.

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




More information about the webkit-changes mailing list