Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a924caf3ef4e1a6e68810dad57eab97ffb8ab80a
      
https://github.com/WebKit/WebKit/commit/a924caf3ef4e1a6e68810dad57eab97ffb8ab80a
  Author: Wenson Hsieh <[email protected]>
  Date:   2026-02-09 (Mon, 09 Feb 2026)

  Changed paths:
    M Source/WebCore/page/text-extraction/TextExtraction.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm

  Log Message:
  -----------
  [AutoFill Debugging] Specifying search `text` with no `nodeIdentifier` for a 
click should fall back to searching the document
https://bugs.webkit.org/show_bug.cgi?id=307360
rdar://169986627

Reviewed by Aditya Keerthi, Megan Gardner, Richard Robinson, and Abrar Rahman 
Protyasha.

Add support for handling text extraction interactions of type `click` that 
receive only `text` with
no node identifier, by searching the document for the text. Also add the 
ability to describe such
interactions.

Test:   TextExtractionTests.InteractionDebugDescription (added)
        TextExtractionTests.ClickInteractionWithTextOnly

* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::documentBodyElement):
(WebCore::TextExtraction::resolveNodeWithBodyAsFallback):
(WebCore::TextExtraction::handleInteraction):
(WebCore::TextExtraction::wrapWithDoubleQuotes):
(WebCore::TextExtraction::textDescription):
(WebCore::TextExtraction::interactionDescription):
(WebCore::TextExtraction::rangeForExtractedText):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm:
(TestWebKitAPI::TEST(TextExtractionTests, InteractionDebugDescription)):

Exercise the ability to describe a click interaction with only text.

(TestWebKitAPI::TEST(TextExtractionTests, ClickInteractionWithTextOnly)):

Exercise the ability to issue a click with only text.

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



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

Reply via email to