[webkit-changes] [WebKit/WebKit] 7fd681: [iOS] Pressing any modifier with a hardware keyboa...
Wenson Hsieh
noreply at github.com
Wed Feb 14 23:34:03 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7fd6818d91806bf407ec38e3be19038ee2790e98
https://github.com/WebKit/WebKit/commit/7fd6818d91806bf407ec38e3be19038ee2790e98
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths:
M Source/WebCore/platform/ios/WebEvent.mm
Log Message:
-----------
[iOS] Pressing any modifier with a hardware keyboard debug asserts under -[WebEvent characters]
https://bugs.webkit.org/show_bug.cgi?id=269430
rdar://122968675
Reviewed by Aditya Keerthi.
In iOS 17.4, UIKit now always calls into `-characters` and `-charactersIgnoringModifiers` in the
process of constructing a `UIKeyEvent` from a `WebEvent` (which is eventually wrapped in a
`BEKeyEvent`). For modifier keys, this ends up triggering assertions in these two methods.
To keep these assertions relevant when using `BEKeyEntry` for key event dispatch, only allow them to
trigger once the key event arrives in WebKit code, and we proceed to unwrap the `BEKeyEntry` back
into the underlying `WebEvent`.
This fixes ~25 failing tests in debug iOS.
* Source/WebCore/platform/ios/WebEvent.mm:
(-[WebEvent characters]):
(-[WebEvent charactersIgnoringModifiers]):
(-[WebEvent initWithKeyEntry:]):
Canonical link: https://commits.webkit.org/274701@main
More information about the webkit-changes
mailing list