Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8581ecd662efd805bfb8e6c7e60e27a7c772c483
https://github.com/WebKit/WebKit/commit/8581ecd662efd805bfb8e6c7e60e27a7c772c483
Author: Wenson Hsieh <[email protected]>
Date: 2026-09-24 (Thu, 24 Sep 2026)
Changed paths:
M
LayoutTests/fast/text-extraction/debug-text-extraction-bare-images-expected.txt
M LayoutTests/fast/text-extraction/debug-text-extraction-basic-expected.txt
M LayoutTests/fast/text-extraction/debug-text-extraction-basic.html
M Source/WebKit/Shared/TextExtractionToStringConversion.cpp
Log Message:
-----------
[Text Extraction] Collapse single text children into the parent container in
few more cases
https://bugs.webkit.org/show_bug.cgi?id=325173
Reviewed by Abrar Rahman Protyasha.
A container with `role=button` with a single text child like:
┃ uid=… role=button
┃ uid=… clickable 'Next'
...could be represented in a much more compact format, without losing any
semantically important
information:
┃ uid=… role=button 'Next'
This makes it easier for agents to reason about the button, and saves a few
tokens in the process.
Test: fast/text-extraction/debug-text-extraction-basic.html
* LayoutTests/fast/text-extraction/debug-text-extraction-basic-expected.txt:
* LayoutTests/fast/text-extraction/debug-text-extraction-basic.html:
* Source/WebKit/Shared/TextExtractionToStringConversion.cpp:
(WebKit::shouldInlineSingleTextLabel):
(WebKit::isTransparentLabelContainer):
(WebKit::addTextRepresentationRecursive):
Canonical link: https://commits.webkit.org/321847@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications