[webkit-changes] [WebKit/WebKit] f8d4e2: Expose dataStoreIdentifier and webPushPartition ge...

bnham noreply at github.com
Thu Feb 16 10:19:47 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f8d4e263f3a9d2e00d6f348a7d176d57bcfd02f5
      https://github.com/WebKit/WebKit/commit/f8d4e263f3a9d2e00d6f348a7d176d57bcfd02f5
  Author: Ben Nham <nham at apple.com>
  Date:   2023-02-16 (Thu, 16 Feb 2023)

  Changed paths:
    M Source/WebKit/PlatformMac.cmake
    M Source/WebKit/SourcesCocoa.txt
    A Source/WebKit/UIProcess/API/C/mac/WKWebsiteDataStoreRefPrivateMac.h
    A Source/WebKit/UIProcess/API/C/mac/WKWebsiteDataStoreRefPrivateMac.mm
    M Source/WebKit/UIProcess/API/Cocoa/APIAttachmentCocoa.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h
    M Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm
    M Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm

  Log Message:
  -----------
  Expose dataStoreIdentifier and webPushPartition getters on WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=252067
rdar://problem/105287995

Reviewed by Sihui Liu.

When showing a notification, we need to provide the embedder with a way to know the data store
identifier and push partition that the notification is associated with. This patch facilitates this
by adding those properties to WKWebsiteDataStore. You could do this before, but it would require
accessing the configuration property on WKWebsiteDataStore, which does a large copy operation.

Additionally, this provides a way to go from a the C API WKWebsiteDataStoreRef to Obj-C API
WKWebsiteDataStore. This is because the callback for showing a notification uses the C API.

Contains miscellaneous unified build fixes.

* Source/WebKit/PlatformMac.cmake:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/API/C/mac/WKWebsiteDataStoreRefPrivateMac.h: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h.
* Source/WebKit/UIProcess/API/C/mac/WKWebsiteDataStoreRefPrivateMac.mm: Copied from Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h.
(WKWebsiteDataStoreGetDataStore):
* Source/WebKit/UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _identifier]):
(-[WKWebsiteDataStore _webPushPartition]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm:
* Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm:
* Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::createWebsiteDataStoreAndPrepare):
(TestWebKitAPI::TEST):

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




More information about the webkit-changes mailing list