Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4adbd1941411849750e27363d5750697dfa2ef9f
https://github.com/WebKit/WebKit/commit/4adbd1941411849750e27363d5750697dfa2ef9f
Author: Wenson Hsieh <[email protected]>
Date: 2026-05-19 (Tue, 19 May 2026)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm
Log Message:
-----------
Occasional debug assert in `-_requestTextExtraction:completionHandler:`
https://bugs.webkit.org/show_bug.cgi?id=315137
rdar://177462928
Reviewed by Abrar Rahman Protyasha and Aditya Keerthi.
It's currently possible for text extraction to hit a debug assertion when
running on web content
where the `body` element is missing (of the many cases, one of these is an SVG
document). For now,
make the extraction logic robust against this scenario by returning a `null`
item earlier.
Test: TextExtractionTests.RequestTextExtractionInSVGDocument
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _requestTextExtractionInternal:completion:]):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm:
(TestWebKitAPI::(TextExtractionTests, RequestTextExtractionInSVGDocument)):
(TestWebKitAPI::(TextExtractionTests, KeyPressInsertsCharactersInOrder)):
Canonical link: https://commits.webkit.org/313538@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications