Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 6d776ad376d9e10dd25da4baafc8b558df896a9f https://github.com/WebKit/WebKit/commit/6d776ad376d9e10dd25da4baafc8b558df896a9f Author: Wenson Hsieh <wenson_hs...@apple.com> Date: 2025-08-12 (Tue, 12 Aug 2025)
Changed paths: M Source/WebCore/page/text-extraction/TextExtraction.cpp M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm Log Message: ----------- The bounds of each _WKTextRun should contain the text range (instead of the entire node) https://bugs.webkit.org/show_bug.cgi?id=297308 rdar://158187835 Reviewed by Abrar Rahman Protyasha. Currently, each visible run of text extracted through this SPI reports its containing text node's bounds as the `rectInWebView`. However, this is inconsistent with the text run itself, which is limited to a single line. Fix this inconsistency by instead reporting the bounds of the text rects corresponding to each range surfaced by `TextIterator`. * Source/WebCore/page/text-extraction/TextExtraction.cpp: (WebCore::TextExtraction::extractAllTextAndRectsRecursive): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm: (TestWebKitAPI::TEST(WKWebView, RequestAllTextRunsWithSubframes)): Rebaseline an existing API test to exercise this fix. Canonical link: https://commits.webkit.org/298609@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes