This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ iOS Debug ] ASSERTION FAILED: Attempt to access post layout data be…
…fore receiving it on editing/editable-region/fixed-and-absolute-contenteditable-scrolled.html https://bugs.webkit.org/show_bug.cgi?id=237541 rdar://89918871 Reviewed by Simon Fraser. After the changes in r289876, this test started sometimes hitting an assertion when run immediately after `editing/deleting/ios/backspace-last-character.html`. By eliminating a sync IPC call to the web content process when requesting autocorrection information, UIKit now requests selection-caret- relative character information slightly earlier than it previously did when dismissing the keyboard, which may occur after we've received an editor state update after blurring the focused element, but before we've received post-layout data. In this scenario, we already know that the focused element has been blurred and the selection is no longer editable, so once the post-layout data does arrive, it would contain `0` for all of the characters close to the selection caret. As such, we can simply return 0 early before attempting to access post-layout data if the selection is not a caret in editable content, since all of the relevant post-layout data members (`characterAfterSelection`, `characterBeforeSelection` and `twoCharacterBeforeSelection`) are going to be 0 anyways. * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _characterInRelationToCaretSelection:]): Canonical link: https://commits.webkit.org/251447@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 1 changed file with 10 additions and 8 deletions.