Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 474182fa172de470ab7e1b59b5e10a1f3c15ec47
https://github.com/WebKit/WebKit/commit/474182fa172de470ab7e1b59b5e10a1f3c15ec47
Author: Wenson Hsieh <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M Source/WebCore/page/text-extraction/TextExtraction.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/debug-text-extraction.html
Log Message:
-----------
[AutoFill Debugging] Add id and class names to human-readable element
descriptions
https://bugs.webkit.org/show_bug.cgi?id=308062
rdar://170562403
Reviewed by Aditya Keerthi and Abrar Rahman Protyasha.
Add support for surfacing element ID and class names in interaction description
strings, but with
some limitations:
- Each class name or ID must be "probably human readable" (based on the same
heuristics used for
URL shortening)
- Each class name or ID must be between some minimum / maximum lengths (for
now, we arbitrarily
choose 6 and 20).
- Limit to 3 class names
Tests: TextExtractionTests.InteractionDebugDescription
* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::normalizeText):
(WebCore::TextExtraction::textDescription):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm:
(TestWebKitAPI::TEST(TextExtractionTests, InteractionDebugDescription)):
Rebaseline an existing API test.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/debug-text-extraction.html:
Canonical link: https://commits.webkit.org/307722@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications