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

  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 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/_WKTextExtraction.swift
    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 form elements and more text form control DOM 
attributes
https://bugs.webkit.org/show_bug.cgi?id=304508
rdar://166750217

Reviewed by Aditya Keerthi.

Add several new DOM attributes to the text extraction output on text fields:

- `pattern`
- `minlength`
- `maxlength`
- `name`

...and also introduce a new container type, `form`, which represents a `form` 
element with
attributes:

- `name`
- `autocomplete`

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

Augment an existing test to include a new `form` that contains a few text 
fields.

* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::extractItemData):
* Source/WebCore/page/text-extraction/TextExtractionTypes.h:
* Source/WebKit/Shared/TextExtractionToStringConversion.cpp:
(WebKit::addPartsForItem):
(WebKit::addTextRepresentationRecursive):

Drive-by fix: address an issue where a single text child node can be 
incorrectly flagged as
"redundant with the HREF" in the case where the client has opted out of 
including URLs. I spotted
this while looking through the augmented layout test's HTML text representation 
above, since the
anchor tags were just getting surfaced as `<a>` with no text or href.

* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.swift:
* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtractionInternal.h:
* Source/WebKit/UIProcess/Cocoa/TextExtraction/WKTextExtractionUtilities.mm:
(WebKit::createItemWithChildren):
* Tools/WebKitTestRunner/cocoa/WKTextExtractionTestingHelpers.mm:
(WTR::buildDescriptionIgnoringChildren):

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



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

Reply via email to