forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement browser.storageArea.getKeys() for Web Extension Storage API.
https://bugs.webkit.org/show_bug.cgi?id=280275 Reviewed by Timothy Hatcher. This patch implements a web extension API to retrieve all keys for a given storage area in the browser.storage API. WECG Proposal: https://github.com/w3c/webextensions/blob/main/proposals/storage-get-keys.md WECG Original Issue: w3c/webextensions#601 This patch also includes the following clean-ups: - Change 'auto' to 'auto *' when assigning the result of WebExtensionContext::storageForType() to explicitly denote pointer type. - Update strongSelf retrieval to in _WKWebExtensionStorageSQLiteStore.mm methods to leverage ARC in extension code, allowing the use of Objective-C pointers instead of RetainPtr, which is only necessary in other parts of WebKit that do not utilize ARC. - Remove unnecessary explicit template types from WeakObjCPtr in _WKWebExtensionStorageSQLiteStore. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIStorageCocoa.mm: (WebKit::WebExtensionContext::storageGet): (WebKit::WebExtensionContext::storageGetKeys): (WebKit::WebExtensionContext::storageGetBytesInUse): * Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionStorageSQLiteStore.h: * Source/WebKit/UIProcess/Extensions/Cocoa/_WKWebExtensionStorageSQLiteStore.mm: (-[_WKWebExtensionStorageSQLiteStore getAllKeys:]): (-[_WKWebExtensionStorageSQLiteStore getValuesForKeys:completionHandler:]): (-[_WKWebExtensionStorageSQLiteStore getStorageSizeForKeys:completionHandler:]): (-[_WKWebExtensionStorageSQLiteStore getStorageSizeForAllKeysIncludingKeyedData:withCompletionHandler:]): (-[_WKWebExtensionStorageSQLiteStore setKeyedData:completionHandler:]): (-[_WKWebExtensionStorageSQLiteStore deleteValuesForKeys:completionHandler:]): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: * Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in: * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIStorageAreaCocoa.mm: (WebKit::WebExtensionAPIStorageArea::getKeys): * Source/WebKit/WebProcess/Extensions/API/WebExtensionAPIStorageArea.h: * Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPIStorageArea.idl: * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIStorage.mm: (TestWebKitAPI::TEST(WKWebExtensionAPIStorage, Errors)): (TestWebKitAPI::TEST(WKWebExtensionAPIStorage, GetKeys)): Canonical link: https://commits.webkit.org/284602@main
- Loading branch information
1 parent
85240f4
commit 972a6ce
Showing
9 changed files
with
96 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters