Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b08e2712c1ff73d0aaa7cfa34d7f77f74c3cb9b0
https://github.com/WebKit/WebKit/commit/b08e2712c1ff73d0aaa7cfa34d7f77f74c3cb9b0
Author: Wenson Hsieh <[email protected]>
Date: 2026-01-05 (Mon, 05 Jan 2026)
Changed paths:
M LayoutTests/fast/text-extraction/debug-text-extraction-basic-expected.txt
M LayoutTests/fast/text-extraction/debug-text-extraction-basic.html
M
LayoutTests/fast/text-extraction/debug-text-extraction-markdown-expected.txt
M LayoutTests/fast/text-extraction/debug-text-extraction-markdown.html
M Source/WebCore/page/text-extraction/TextExtraction.cpp
M Source/WebCore/page/text-extraction/TextExtractionTypes.h
M Source/WebKit/Shared/TextExtractionToStringConversion.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/API/Cocoa/_WKTextExtractionInternal.h
M Source/WebKit/UIProcess/Cocoa/TextExtraction/WKTextExtractionUtilities.mm
M Tools/WebKitTestRunner/cocoa/WKTextExtractionTestingHelpers.mm
Log Message:
-----------
[AutoFill Debugging] Add support for strikethrough text (s, strike, del)
https://bugs.webkit.org/show_bug.cgi?id=304939
rdar://167555658
Reviewed by Abrar Rahman Protyasha.
Add support for strikethrough text in text extraction output.
See below for more details.
* LayoutTests/fast/text-extraction/debug-text-extraction-markdown-expected.txt:
* LayoutTests/fast/text-extraction/debug-text-extraction-markdown.html:
* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::extractItemData):
(WebCore::TextExtraction::shouldIncludeNodeIdentifier):
* Source/WebCore/page/text-extraction/TextExtractionTypes.h:
Add `Strikethrough` as a container enum type, similar to `Superscript` /
`Subscript`.
* Source/WebKit/Shared/TextExtractionToStringConversion.cpp:
(WebKit::escapeStringForMarkdown):
Escape `~~` here, so that occurrences of `~~` inside strikethrough text will
not cause the
strikethrough text to end early.
(WebKit::TextExtractionAggregator::pushStrikethrough):
(WebKit::TextExtractionAggregator::isInsideStrikethrough const):
(WebKit::TextExtractionAggregator::popStrikethrough):
Add a mechanism to keep track of when we enter / exit strikethrough container
items.
(WebKit::addPartsForItem):
When emitting strikethrough text, surround it with `~~` for markdown.
Otherwise, for other output
formats, handle it as a container type named `strikethrough`.
(WebKit::addTextRepresentationRecursive):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtractionInternal.h:
* Source/WebKit/UIProcess/Cocoa/TextExtraction/WKTextExtractionUtilities.mm:
(WebKit::containerType):
* Tools/WebKitTestRunner/cocoa/WKTextExtractionTestingHelpers.mm:
(WTR::description):
Canonical link: https://commits.webkit.org/305132@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications