Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d8b72b35b624b81715d501836c8e06d69bcea221
      
https://github.com/WebKit/WebKit/commit/d8b72b35b624b81715d501836c8e06d69bcea221
  Author: Ryosuke Niwa <[email protected]>
  Date:   2026-06-04 (Thu, 04 Jun 2026)

  Changed paths:
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm
    M Tools/Scripts/webkitpy/api_tests/allowlist.txt
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/WKWebViewMacEditingTests.mm

  Log Message:
  -----------
  REGRESSION: Inserting a space sometimes doesn't work in 2-Set Korean
https://bugs.webkit.org/show_bug.cgi?id=316292

Reviewed by Wenson Hsieh.

With InputMethodUsesCorrectKeyEventOrder enabled, 2-Set Korean's insertText: "한"
(fired as a side effect of committing the composition on space press) gets 
queued into
commands rather than dispatched directly. This sets hasInsertText = true, which 
blocked
the keyboard-layout pass from appending insertText: " " (the space).

With InputMethodUsesCorrectKeyEventOrder disabled, the insertText: is 
dispatched directly,
leaving commands empty with hasInsertText = false, so the space is always 
appended.

This PR fixes the regression by tracking whether input method has fully handled 
the key
event or not before forced-to-No logic kicks for 
inputMethodCommittedPartialInsertText.

Test: 
TestWebKitAPI.WKWebViewMacEditingTests.ModelessInputMethodCommitOnDelimiterInsertsCommittedTextAndDelimiter

* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::interpretKeyEvent):
* Tools/Scripts/webkitpy/api_tests/allowlist.txt:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/WKWebViewMacEditingTests.mm:
(-[MockTextInputContextAction 
initWithMarkedText:selectedRange:replacementRange:]):
(-[MockTextInputContextAction initWithInsertText:replacementRange:]):
(-[MockTextInputContext handleEventByInputMethod:completionHandler:]):
(TestWebKitAPI::TEST(WKWebViewMacEditingTests, 
ModelessInputMethodStagingToleratesExternalSetMarkedText)):
(TestWebKitAPI::TEST(WKWebViewMacEditingTests, 
ModelessInputMethodCommitOnDelimiterInsertsCommittedTextAndDelimiter)):

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



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

Reply via email to