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

  Changed paths:
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm

  Log Message:
  -----------
  [iOS] -setSelectedTextRange: crashes with a nil range when async text input 
is enabled
https://bugs.webkit.org/show_bug.cgi?id=267164
rdar://120553527

Reviewed by Aditya Keerthi.

Ensure that we don't hit legacy UIKit method assertions from within our own 
code, when async text
input is enabled, by moving the logic in `clearSelection` into 
`_internalClearSelection`, limiting
the assertion to `clearSelection`, and then using `_internalClearSelection` 
instead of the former.

Test: KeyboardInputTests.ClearSelectedTextRange

* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView clearSelection]):
(-[WKContentView _internalClearSelection]):
(-[WKContentView setSelectedTextRange:]):
* Tools/TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to