Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: efe3badc6bfedfc2f00671c489bc5956bc474514
      
https://github.com/WebKit/WebKit/commit/efe3badc6bfedfc2f00671c489bc5956bc474514
  Author: Wenson Hsieh <[email protected]>
  Date:   2026-07-20 (Mon, 20 Jul 2026)

  Changed paths:
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

  Log Message:
  -----------
  [iOS 27] Mitigate increased hangs under -[WKContentView 
_internalInvalidateTextEntryContext]
https://bugs.webkit.org/show_bug.cgi?id=319863
rdar://182521239

Reviewed by Abrar Rahman Protyasha.

This is an attempted mitigation to try and reduce the number of hangs under
`-_internalInvalidateTextEntryContext` observed on iOS, due to a deadlock in 
UIKit keyboard code.
While this deadlock isn't new by any means, its frequency seems to have spiked 
in iOS 27, for
reasons that are still unknown.

The new traces show a trend of hanging while the user is also trying to change 
the selection via
indirect gesture (e.g. long press on the space bar, or two-finger pan on the 
software keyboard on
iPad); to try and mitigate this, we avoid going down this codepath altogether 
if the user is
actively trying to change the selection via user gesture.

This codepath was intended to refresh text candidates and other IME-related 
keyboard state when the
focused text field is programmatically cleared, so there's no need to force 
suggestions to update if
the user is changing the selection anyways (which would result in the 
suggestions being updated as
the selection changes).

* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didProgrammaticallyClearFocusedElement:]):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to