Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2aa9a4fd0ae02725b7de8efe10f0ac581f26f562
      
https://github.com/WebKit/WebKit/commit/2aa9a4fd0ae02725b7de8efe10f0ac581f26f562
  Author: Wenson Hsieh <[email protected]>
  Date:   2025-12-19 (Fri, 19 Dec 2025)

  Changed paths:
    M LayoutTests/fast/text-extraction/debug-text-extraction-basic-expected.txt
    M Source/WebKit/Shared/TextExtractionToStringConversion.cpp

  Log Message:
  -----------
  [AutoFill Debugging] Items with a single redundant child text node are 
missing bounding rects
https://bugs.webkit.org/show_bug.cgi?id=304461
rdar://166750088

Reviewed by Aditya Keerthi.

Currently, text extraction items with a single text child whose text content 
matches one or more
DOM attributes on the item will skip including the single text child, since 
it's redundant. However,
this clashes with the fact that rects in text extraction output only appear in 
leaf nodes (items
without any children). The end result is that rects are neither printed out in 
the text extraction
item parent, nor its only text child.

To fix this, we add plumbing to adjust the rect output strategy, such that we 
output rects on non-
leaf child items *only* in the case where the item only has one redundant text 
child.

* LayoutTests/fast/text-extraction/debug-text-extraction-basic-expected.txt:

Rebaseline an existing test to test this change.

* Source/WebKit/Shared/TextExtractionToStringConversion.cpp:
(WebKit::partsForItem):
(WebKit::addPartsForItem):
(WebKit::addTextRepresentationRecursive):

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



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

Reply via email to