[webkit-changes] [WebKit/WebKit] 435af5: [Remote Inspection] Surface image, media and link ...
Wenson Hsieh
noreply at github.com
Tue May 21 15:06:43 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 435af5beb5ff9261093529de205c5d30d30d222a
https://github.com/WebKit/WebKit/commit/435af5beb5ff9261093529de205c5d30d30d222a
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2024-05-21 (Tue, 21 May 2024)
Changed paths:
M Source/WebCore/page/ElementTargetingController.cpp
M Source/WebCore/page/ElementTargetingTypes.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/API/APITargetedElementInfo.h
M Source/WebKit/UIProcess/API/Cocoa/_WKTargetedElementInfo.h
M Source/WebKit/UIProcess/API/Cocoa/_WKTargetedElementInfo.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ElementTargetingTests.mm
Log Message:
-----------
[Remote Inspection] Surface image, media and link URLs in selected element subtrees
https://bugs.webkit.org/show_bug.cgi?id=274476
Reviewed by Megan Gardner and Abrar Protyasha.
Add support for a `-mediaAndLinkURLs` property that exposes a set of `NSURL`s derived from scanning
the DOM subtree for targeted elements in search of:
- Media element source URLs
- Image source URLs
- Link HREFs
- CSS background image URLs
* Source/WebCore/page/ElementTargetingController.cpp:
(WebCore::urlForElement):
(WebCore::collectAllMediaAndLinkURLsRecursive):
(WebCore::collectUniqueMediaAndLinkURLs):
(WebCore::targetedElementInfo):
* Source/WebCore/page/ElementTargetingTypes.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/API/APITargetedElementInfo.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKTargetedElementInfo.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKTargetedElementInfo.mm:
(-[_WKTargetedElementInfo mediaAndLinkURLs]):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ElementTargetingTests.mm:
(TestWebKitAPI::TEST(ElementTargeting, RequestTargetedElementsBySearchableText)):
Canonical link: https://commits.webkit.org/279077@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list