-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Web Extension #48452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
akutira-umich
wants to merge
2
commits into
WebKit:main
Choose a base branch
from
akutira-umich:eng/Web-Extension-Add-the-ability-for-extensions-to-create-a-new-bookmark
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Web Extension #48452
akutira-umich
wants to merge
2
commits into
WebKit:main
from
akutira-umich:eng/Web-Extension-Add-the-ability-for-extensions-to-create-a-new-bookmark
Conversation
This file contains hidden or 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
Contributor
Collaborator
|
EWS run on previous version of this PR (hash 366a276) |
rdar://155264420 https://bugs.webkit.org/show_bug.cgi?id=295551 Reviewed by NOBODY (OOPS!). Implementation of getTree and mockNode for create bookmarks for testing. Created a delegate for getTree and create. * Source/WebKit/Modules/OSX_Private.modulemap: * Source/WebKit/Modules/iOS_Private.modulemap: * Source/WebKit/UIProcess/API/Cocoa/WKWebExtensionControllerDelegatePrivate.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionBookmarks.h: Added. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIBookmarksCocoa.mm: (WebKit::createParametersFromProtocolObject): (WebKit::createParametersFromProtocolObjects): (WebKit::WebExtensionContext::bookmarksCreate): (WebKit::WebExtensionContext::bookmarksGetTree): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIBookmarksCocoa.mm: (WebKit::toAPI): (WebKit::toWebAPI): (WebKit::WebExtensionAPIBookmarks::createBookmark): (WebKit::WebExtensionAPIBookmarks::getTree): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIBookmarks.mm: (-[_MockBookmarkNode initWithDictionary:]): (-[_MockBookmarkNode childrenForWebExtensionContext:]): (findParentInMockTree): (-[TestBookmarksDelegate init]): (-[TestBookmarksDelegate _webExtensionController:getBookmarksForExtensionContext:completionHandler:]): (-[TestBookmarksDelegate _webExtensionController:createBookmarkWithParentIdentifier:index:url:title:forExtensionContext:completionHandler:]): (TestWebKitAPI::TEST_F(WKWebExtensionAPIBookmarks, BookmarksAPIMockNodeWithgetRecent)): (TestWebKitAPI::TEST_F(WKWebExtensionAPIBookmarks, BookmarksAPICreateParse)): (TestWebKitAPI::TEST_F(WKWebExtensionAPIBookmarks, BookmarksAPIGetTree)): (TestWebKitAPI::TEST_F(WKWebExtensionAPIBookmarks, CreateAndGetTree)): * Tools/TestWebKitAPI/cocoa/TestWebExtensionsDelegate.h: * Tools/TestWebKitAPI/cocoa/TestWebExtensionsDelegate.mm: (-[TestWebExtensionsDelegate _webExtensionController:createBookmarkWithParentIdentifier:index:url:title:forExtensionContext:completionHandler:]): (-[TestWebExtensionsDelegate _webExtensionController:getBookmarksForExtensionContext:completionHandler:]):
366a276 to
337d675
Compare
Collaborator
|
EWS run on previous version of this PR (hash 337d675) |
…ildren() rdar://152505844 https://bugs.webkit.org/show_bug.cgi?id=295876 Reviewed by NOBODY (OOPS!). Adds the WebProcess and UIProcess for get(), getSubTree(), and getChildren(). Also adds tests for these. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIBookmarksCocoa.mm: (WebKit::findBookmarkNodeInTree): (WebKit::createShallowParametersFromProtocolObjects): (WebKit::WebExtensionContext::bookmarksGetSubTree): (WebKit::WebExtensionContext::bookmarksGet): (WebKit::WebExtensionContext::bookmarksGetChildren): * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIBookmarksCocoa.mm: (WebKit::WebExtensionAPIBookmarks::getChildren): (WebKit::WebExtensionAPIBookmarks::getSubTree): (WebKit::WebExtensionAPIBookmarks::get): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIBookmarks.mm: (-[_MockBookmarkNode bookmarkTypeForWebExtensionContext:]): (TestWebKitAPI::TEST_F(WKWebExtensionAPIBookmarks, CreateAndGetTree)): (TestWebKitAPI::TEST_F(WKWebExtensionAPIBookmarks, GetSubTree)):
337d675 to
9edb20b
Compare
Collaborator
|
EWS run on current version of this PR (hash 9edb20b) |
xeenon
approved these changes
Jul 24, 2025
| translating its native bookmark objects into objects that conform to the `_WKWebExtensionBookmark` protocol and | ||
| represent the top-level nodes of the bookmark hierarchy. | ||
| */ | ||
| - (void)_webExtensionController:(WKWebExtensionController * _Nonnull)controller getBookmarksForExtensionContext:(WKWebExtensionContext * _Nonnull)context completionHandler:(void (^)(NSArray<NSObject<_WKWebExtensionBookmark> *> * _Nullable, NSError * _Nullable))completionHandler; |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| - (void)_webExtensionController:(WKWebExtensionController * _Nonnull)controller getBookmarksForExtensionContext:(WKWebExtensionContext * _Nonnull)context completionHandler:(void (^)(NSArray<NSObject<_WKWebExtensionBookmark> *> * _Nullable, NSError * _Nullable))completionHandler; | |
| - (void)_webExtensionController:(WKWebExtensionController * _Nonnull)controller bookmarksForExtensionContext:(WKWebExtensionContext * _Nonnull)context completionHandler:(void (^)(NSArray<NSObject<_WKWebExtensionBookmark> *> * _Nullable, NSError * _Nullable))completionHandler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
9edb20b
6a60011
9edb20b
🧪 win-tests🛠 playstation