[webkit-changes] [WebKit/WebKit] e03867: [UIAsyncTextInput] Adopt the replacement for `-mod...

Wenson Hsieh noreply at github.com
Mon Nov 27 13:19:46 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e03867f649760a416b74dbc07ae516ecb24b3110
      https://github.com/WebKit/WebKit/commit/e03867f649760a416b74dbc07ae516ecb24b3110
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-11-27 (Mon, 27 Nov 2023)

  Changed paths:
    M Source/WebKit/Platform/spi/ios/UIKitSPI.h
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

  Log Message:
  -----------
  [UIAsyncTextInput] Adopt the replacement for `-modifierFlagsDidChangeFrom:to:`
https://bugs.webkit.org/show_bug.cgi?id=265293
rdar://118755098

Reviewed by Megan Gardner.

Adopt `-shiftKeyStateChangedFrom:to:`, to replace calls to `-modifierFlagsDidChangeFrom:to:` when
the async text input codepath is enabled.

* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(shiftKeyState):
(-[WKContentView modifierFlagsDidChangeFrom:to:]):

Add an "async interactions disabled" assertion and call into the new async text input helper method.

(-[WKContentView shiftKeyStateChangedFrom:to:]):

Add an early return in the case where `_isHandlingActivePressesEvent` is set. Currently, this is
called when using Caps Lock with a hardware keyboard; however, we also get corresponding calls to
`-handleKeyWebEvent:withCompletionHandler:` in this case, so we end up with a redundant set of
`keyup` and `keydown` events, due to the synthetic key events triggered by the modifier flag change.

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




More information about the webkit-changes mailing list