Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 40d437a09e4a2265f66866a449e88ed4c9a240b4
https://github.com/WebKit/WebKit/commit/40d437a09e4a2265f66866a449e88ed4c9a240b4
Author: Wenson Hsieh <[email protected]>
Date: 2026-05-06 (Wed, 06 May 2026)
Changed paths:
M Source/WebCore/page/text-extraction/TextExtraction.cpp
M Tools/TestWebKitAPI/Resources/cocoa/debug-text-product.html
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm
Log Message:
-----------
[AutoFill Debugging] Fall back to full-document text search for each piece of
target text when requesting container JS handles
https://bugs.webkit.org/show_bug.cgi?id=314153
rdar://176319231
Reviewed by Aditya Keerthi and Abrar Rahman Protyasha.
In the case where one or more of the given search text samples can't be found
in the target
container node, fall back to searching the document. This allows text samples
to remain useful in
identifying the targeted content, even if the target node IDs are incorrect.
Test:
TextExtractionTests.RequestContainerJSHandleForSearchTextsFallsBackToBodyWhenTargetMisses
* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::containerElementForSearchTexts):
* Tools/TestWebKitAPI/Resources/cocoa/debug-text-product.html:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm:
(TestWebKitAPI::TEST(TextExtractionTests,
RequestContainerJSHandleForSearchTextsFallsBackToBodyWhenTargetMisses)):
Canonical link: https://commits.webkit.org/312697@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications