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

  Changed paths:
    M 
LayoutTests/fast/text-extraction/debug-text-extraction-form-controls-expected.txt
    M LayoutTests/fast/text-extraction/debug-text-extraction-form-controls.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/Cocoa/TextExtraction/WKTextExtractionUtilities.mm

  Log Message:
  -----------
  [AutoFill Debugging] Extract select element options for non-markdown output 
formats
https://bugs.webkit.org/show_bug.cgi?id=306547
rdar://169134455

Reviewed by Abrar Rahman Protyasha.

Surface `option` elements under `select` during text extraction. The text tree 
representation looks
like:

```
select
    option,value='one','Number 1'
    option,value='two','Number 2'
    option,selected,value='three','Number 3'
```

...the HTML representation looks like:

```
<select>
    <option value='one'>Number 1</option>
    <option value='two'>Number 2</option>
    <option value='three' selected>Number 3</option>
</select>
```

...and the JSON representation looks like:

```
{
  "type": "select",
  "nodeName": "select",
  "options": [
    { "value": "one", "label": "Number 1", "selected": false },
    { "value": "two", "label": "Number 2", "selected": false },
    { "value": "three", "label": "Number 3", "selected": true }
  ]
}
```

* 
LayoutTests/fast/text-extraction/debug-text-extraction-form-controls-expected.txt:
* LayoutTests/fast/text-extraction/debug-text-extraction-form-controls.html:

Augment an existing layout test to include selects.

* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::extractItemData):
* Source/WebCore/page/text-extraction/TextExtractionTypes.h:
* Source/WebKit/Shared/TextExtractionToStringConversion.cpp:
(WebKit::populateJSONForItem):
(WebKit::addPartsForItem):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/Cocoa/TextExtraction/WKTextExtractionUtilities.mm:
(WebKit::createItemWithChildren):

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



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

Reply via email to