Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ef35f4ceb48a2f99990de74e8f192db9171b7fc6
https://github.com/WebKit/WebKit/commit/ef35f4ceb48a2f99990de74e8f192db9171b7fc6
Author: Wenson Hsieh <[email protected]>
Date: 2025-12-05 (Fri, 05 Dec 2025)
Changed paths:
M Source/WebCore/page/text-extraction/TextExtraction.cpp
M Source/WebCore/page/text-extraction/TextExtractionTypes.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.h
M Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm
Log Message:
-----------
[AutoFill Debugging] Allow clients to specify a list of nodes to skip during
text extraction
https://bugs.webkit.org/show_bug.cgi?id=303663
rdar://165944267
Reviewed by Tim Horton.
Add support for `-nodesToSkip`. See below for more details.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm
* Source/WebCore/page/text-extraction/TextExtraction.cpp:
Map the JS handles to a `WeakHashSet` of nodes, and bail during
recursion if we encounter any nodes in the set.
(WebCore::TextExtraction::extractRecursive):
(WebCore::TextExtraction::extractItem):
* Source/WebCore/page/text-extraction/TextExtractionTypes.h:
Plumb the list of JS handles representing node IDs over to the web
process.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(extractHandleIdentifiersOfNodesToSkip):
(-[WKWebView _requestTextExtractionInternal:completion:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.mm:
(-[_WKTextExtractionConfiguration nodesToSkip]):
(-[_WKTextExtractionConfiguration setNodesToSkip:]):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm:
(TestWebKitAPI::TEST(TextExtractionTests, NodesToSkip)):
Add an API test that exercises the new property.
Canonical link: https://commits.webkit.org/304040@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications