Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b33075ac6c0e3bc0177339797b1ae644ec8faf2f
https://github.com/WebKit/WebKit/commit/b33075ac6c0e3bc0177339797b1ae644ec8faf2f
Author: Richard Robinson <[email protected]>
Date: 2024-05-14 (Tue, 14 May 2024)
Changed paths:
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
M Tools/TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm
Log Message:
-----------
Occasional crash in `WebViewImpl::setMarkedText` (`com.apple.WebKit:
_ZN6WebKit11WebViewImpl13setMarkedTextEP11objc_object8_NSRangeS3_`)
https://bugs.webkit.org/show_bug.cgi?id=274186
rdar://127658062
Reviewed by Abrar Rahman Protyasha.
The existing logic to ensure that `setWritingSuggestions` only gets called when
`string` is an
`NSAttributedString` was flawed in some cases (when
`m_isHandlingAcceptedCandidate == true` and `hasTextCompletion == false`).
This resulted in `-[NSAttributedString string]` being called on an `NSString`,
causing a crash.
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::setMarkedText):
* Tools/TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm:
(-[SetMarkedTextWithNoAttributedStringTestCandidate
initWithReplacementString:inRange:]):
(-[SetMarkedTextWithNoAttributedStringTestCandidate replacementString]):
(-[SetMarkedTextWithNoAttributedStringTestCandidate resultType]):
(-[SetMarkedTextWithNoAttributedStringTestCandidate range]):
(TEST(WKWebViewMacEditingTests, SetMarkedTextWithNoAttributedString)):
Canonical link: https://commits.webkit.org/278792@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes