-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Remote Inspection] _WKTargetedElementInfo should expose a method to …
…get contained subframes https://bugs.webkit.org/show_bug.cgi?id=271510 Reviewed by Megan Gardner. Add a new method on `_WKTargetedElementInfo` to request `_WKFrameTreeNode`s that correspond to the subframes underneath the targeted element. See below for more details. * Source/WebCore/page/ElementTargeting.cpp: (WebCore::collectChildFrameIdentifiers): (WebCore::targetedElementInfo): Plumb frame IDs for subframes underneath the targeted element from the web process to the UI process. * Source/WebCore/page/ElementTargetingTypes.h: * Source/WebKit/Shared/API/APIObject.h: Drive-by fix a typo in a comment: `namespace Object` should be `namespace API`. * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in: * Source/WebKit/UIProcess/API/APIFrameInfo.cpp: (API::FrameInfo::title const): Add a getter for `title` on `FrameInfo`, which calls into `WebFrameProxy`. * Source/WebKit/UIProcess/API/APIFrameInfo.h: * Source/WebKit/UIProcess/API/APITargetedElementInfo.cpp: (API::TargetedElementInfo::isSameElement const): (API::TargetedElementInfo::childFrames const): * Source/WebKit/UIProcess/API/APITargetedElementInfo.h: * Source/WebKit/UIProcess/API/Cocoa/WKFrameInfo.mm: (-[WKFrameInfo _title]): Add a new SPI method on `WKFrameInfo`, which allows clients to read the last cached `title` for the given frame. * Source/WebKit/UIProcess/API/Cocoa/WKFrameInfoPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/_WKTargetedElementInfo.h: * Source/WebKit/UIProcess/API/Cocoa/_WKTargetedElementInfo.mm: (-[_WKTargetedElementInfo getChildFrames:]): Implement the new API method. Using the list of subframe IDs from the targeting results, request `FrameTreeNodeData` for each subframe and call the completion handler once all the async calls are complete. * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WebKitCocoa/ElementTargetingTests.mm: (-[_WKTargetedElementInfo childFrames]): (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/element-targeting-1.html: * Tools/TestWebKitAPI/Tests/WebKitCocoa/nested-frames.html: Added. Augment an existing API test to cover this new method as well. Canonical link: https://commits.webkit.org/276647@main
- Loading branch information
Showing
16 changed files
with
211 additions
and
21 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
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
Oops, something went wrong.