Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2bfbbefcfdee9bf201c0a205242a0e0ab4c988f1
      
https://github.com/WebKit/WebKit/commit/2bfbbefcfdee9bf201c0a205242a0e0ab4c988f1
  Author: Wenson Hsieh <[email protected]>
  Date:   2026-01-29 (Thu, 29 Jan 2026)

  Changed paths:
    M 
LayoutTests/fast/text-extraction/debug-text-extraction-all-container-uids-expected.txt
    M LayoutTests/fast/text-extraction/debug-text-extraction-basic-expected.txt
    M 
LayoutTests/fast/text-extraction/debug-text-extraction-data-detectors-expected.txt
    M 
LayoutTests/fast/text-extraction/debug-text-extraction-form-controls-expected.txt
    M 
LayoutTests/fast/text-extraction/debug-text-extraction-lightweight-expected.txt
    M LayoutTests/fast/text-extraction/debug-text-extraction-markup-expected.txt
    M Source/WebCore/page/text-extraction/TextExtraction.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm

  Log Message:
  -----------
  [AutoFill Debugging] Extracted text sometimes contains extra trailing and 
leading whitespace
https://bugs.webkit.org/show_bug.cgi?id=306494
rdar://168978618

Reviewed by Richard Robinson.

Only merge adjacent runs of text in the case where they're inside the same 
enclosing block
container. We currently try to merge all adjacent text runs instead, which 
leads to extra whitespace
being unnecessarily included in the results, or text that is visually separate 
being squished
together in the same line.

Covered by rebaselining various layout and API tests.

* 
LayoutTests/fast/text-extraction/debug-text-extraction-all-container-uids-expected.txt:
* LayoutTests/fast/text-extraction/debug-text-extraction-basic-expected.txt:
* 
LayoutTests/fast/text-extraction/debug-text-extraction-data-detectors-expected.txt:
* 
LayoutTests/fast/text-extraction/debug-text-extraction-form-controls-expected.txt:
* 
LayoutTests/fast/text-extraction/debug-text-extraction-lightweight-expected.txt:
* LayoutTests/fast/text-extraction/debug-text-extraction-markup-expected.txt:
* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::canMerge):

See above for more details.

(WebCore::TextExtraction::extractRecursive):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm:
(TestWebKitAPI::TEST(TextExtractionTests, VisibleTextOnly)):
(TestWebKitAPI::TEST(TextExtractionTests, NodesToSkip)):

Canonical link: https://commits.webkit.org/306400@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to