Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2303005d07fdc48097754e6f35b9a3325bcf4ba7
      
https://github.com/WebKit/WebKit/commit/2303005d07fdc48097754e6f35b9a3325bcf4ba7
  Author: Wenson Hsieh <[email protected]>
  Date:   2026-05-01 (Fri, 01 May 2026)

  Changed paths:
    M Source/WebCore/page/text-extraction/TextExtraction.cpp
    M Source/WebCore/page/text-extraction/TextExtraction.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.h
    M Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKTextExtractionInternal.h
    M Source/WebKit/UIProcess/WebFrameProxy.cpp
    M Source/WebKit/UIProcess/WebFrameProxy.h
    M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
    M Source/WebKit/WebProcess/WebPage/WebFrame.h
    M Source/WebKit/WebProcess/WebPage/WebFrame.messages.in
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm

  Log Message:
  -----------
  [AutoFill Debugging] Add the interacted element bounding rect in web view 
coordinates to _WKTextExtractionInteractionResult
https://bugs.webkit.org/show_bug.cgi?id=313836
rdar://176042042

Reviewed by Abrar Rahman Protyasha.

Add plumbing for the targeted element bounds, in text extraction interaction 
results (in the web
view's coordinate space).

Test: TextExtractionTests.InteractedElementBounds

* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::dispatchInteraction):

Pull out the main interaction logic into a separate helper function, and make 
`handleInteraction`
wrap that function. This will allow us to easily gather more information about 
the interaction
target in the future (e.g. selector paths).

(WebCore::TextExtraction::handleInteraction):
* Source/WebCore/page/text-extraction/TextExtraction.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _performInteraction:completionHandler:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.mm:
(-[_WKTextExtractionInteractionResult 
initWithErrorDescription:summary:interactedElementBounds:]):
(-[_WKTextExtractionInteractionResult interactedElementBounds]):
(-[_WKTextExtractionInteractionResult initWithErrorDescription:summary:]): 
Deleted.

Add `interactedElementBounds` to the result object's initializer.

* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtractionInternal.h:
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::handleTextExtractionInteraction):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::handleTextExtractionInteraction):
* Source/WebKit/WebProcess/WebPage/WebFrame.h:
* Source/WebKit/WebProcess/WebPage/WebFrame.messages.in:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm:
(TestWebKitAPI::(TextExtractionTests, InteractedElementBounds)):

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



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

Reply via email to