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

  Changed paths:
    M 
LayoutTests/fast/text-extraction/debug-text-extraction-interactions-expected.txt
    M LayoutTests/fast/text-extraction/debug-text-extraction-interactions.html
    M Source/WebCore/page/text-extraction/TextExtraction.cpp
    M Source/WebCore/page/text-extraction/TextExtractionTypes.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.h
    M Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm

  Log Message:
  -----------
  [AutoFill Debugging] Scroll interaction type should support `text` as an 
argument
https://bugs.webkit.org/show_bug.cgi?id=308014
rdar://170513168

Reviewed by Abrar Rahman Protyasha and Megan Gardner.

Add `text` as a valid argument for scrolling interaction type; see below for 
more details.

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

Extend an existing layout test to cover this case.

* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::searchForText):
(WebCore::TextExtraction::scrollToReveal):
(WebCore::TextExtraction::handleInteraction):
(WebCore::TextExtraction::interactionDescription):

Handle the `text` argument with `scroll` interaction type by searching for the 
text in the DOM, and
scrolling to reveal the element containing the start of the matching range.

* Source/WebCore/page/text-extraction/TextExtractionTypes.h:

Also rename `ScrollBy` to just `Scroll`, now that it takes either a scroll 
delta or search string.

* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _convertToWebCoreInteraction:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.h:
* Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
(WTR::UIScriptControllerCocoa::performTextExtractionInteraction):

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



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

Reply via email to