Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: b14b70f5eff5dd4c67e9f53f598382a8cf0fb91b https://github.com/WebKit/WebKit/commit/b14b70f5eff5dd4c67e9f53f598382a8cf0fb91b Author: Brian Weinstein <bweinst...@apple.com> Date: 2023-12-12 (Tue, 12 Dec 2023)
Changed paths: M Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIWebNavigationCocoa.mm M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h M Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in M Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIWebNavigationCocoa.mm M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIWebNavigation.mm Log Message: ----------- Change behavior of webNavigation.getFrame/getAllFrames to better match spec https://bugs.webkit.org/show_bug.cgi?id=266305 rdar://118340990 Reviewed by Timothy Hatcher. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webNavigation/getFrame states: "If the specified tab or frame ID could not be found, or some other error occurs, the promise will be rejected with an error message." Before this change, we weren't doing that - we were just vending an empty object. This PR also adds a couple tests for this behavior. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIWebNavigationCocoa.mm: (WebKit::WebExtensionContext::webNavigationGetFrame): (WebKit::WebExtensionContext::webNavigationGetAllFrames): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: * Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in: * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIWebNavigationCocoa.mm: (WebKit::WebExtensionAPIWebNavigation::getAllFrames): (WebKit::WebExtensionAPIWebNavigation::getFrame): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIWebNavigation.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/271961@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes