Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 69414c30375b5099697bf2b350d7c8f3576a5d58
      
https://github.com/WebKit/WebKit/commit/69414c30375b5099697bf2b350d7c8f3576a5d58
  Author: Brian Weinstein <bweinst...@apple.com>
  Date:   2023-11-11 (Sat, 11 Nov 2023)

  Changed paths:
    M 
Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIWebNavigationCocoa.mm
    M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIWebNavigation.mm

  Log Message:
  -----------
  Implement UI process side of getFrame and getAllFrames
https://bugs.webkit.org/show_bug.cgi?id=264686
rdar://118278958

Reviewed by Timothy Hatcher.

This patch sets up basic frame traversal APIs to:
1) Iterate all frames, adding their WebExtensionFrameParameters to a vector
2) Find a frame in a subtree

* 
Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIWebNavigationCocoa.mm:
(WebKit::frameParametersForFrame): Set up the various parts of the 
WebExtensionFrameParameters object.
(WebKit::WebExtensionContext::webNavigationTraverseFrameTreeForFrame): Traverse 
the frame and subframes recursively.
(WebKit::WebExtensionContext::webNavigationFindFrameIdentifierInFrameTree): 
Find the frame with the given identifier recursively.
(WebKit::WebExtensionContext::webNavigationGetFrame): Call into 
webNavigationFindFrameIdentifierInFrameTree.
(WebKit::WebExtensionContext::webNavigationGetAllFrames): Call into 
webNavigationTraverseFrameTreeForFrame.
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIWebNavigation.mm:
(TestWebKitAPI::TEST): Add tests for webNavigation.getAllFrames and 
webNavigation.getFrame (for both the main frame and subframes).

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to