Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 159b6e9fb7ce49f1a81656ee453e23134027a438
      
https://github.com/WebKit/WebKit/commit/159b6e9fb7ce49f1a81656ee453e23134027a438
  Author: Wenson Hsieh <[email protected]>
  Date:   2026-03-22 (Sun, 22 Mar 2026)

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

  Log Message:
  -----------
  [AutoFill Debugging] request(Container)JSHandleForNodeIdentifier should fall 
back to the nodeID if searchText is not found
https://bugs.webkit.org/show_bug.cgi?id=310487
rdar://172953055

Reviewed by Richard Robinson and Abrar Rahman Protyasha.

Make these methods fall back to the node corresponding to the `nodeIdentifier` 
(if found), in the
case where `searchText` doesn't match any text in the document.

Test:   TextExtractionTests.RequestJSHandleForNodeIdentifier
        TextExtractionTests.RequestContainerJSHandleForNodeIdentifier

* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::elementForExtractedText):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TextExtractionTests.mm:
(TestWebKitAPI::TEST(TextExtractionTests, RequestJSHandleForNodeIdentifier)):
(TestWebKitAPI::TEST(TextExtractionTests, 
RequestContainerJSHandleForNodeIdentifier)):

Augment a couple of test cases to cover this scenario.

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



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

Reply via email to