Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 30178fb84c6f1831d3bf27a784d8ec38100d7834
https://github.com/WebKit/WebKit/commit/30178fb84c6f1831d3bf27a784d8ec38100d7834
Author: Fujii Hironori <[email protected]>
Date: 2026-10-15 (Thu, 15 Oct 2026)
Changed paths:
M Source/WebKit/WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp
Log Message:
-----------
[GTK][WPE] Input method commit without a preedit dispatches compositionend
without compositionstart
https://bugs.webkit.org/show_bug.cgi?id=327413
Reviewed by Carlos Garcia Campos.
When an input method committed text without a preedit outside key
handling, for example a keyboard committing a whole suggestion or an
input method talking text-input-v3, the text was confirmed as a
composition. Editor::setComposition() then inserted it with inputType
insertFromComposition and dispatched a compositionend, although no
composition had started.
Insert the committed text as typing when there is no composition, so the
page gets a beforeinput with inputType insertText and no composition
events, like Chromium does. No triggering event is given: the keydown
has already been dispatched and no keypress follows it, and
EventHandler::handleTextInputEvent() asserts that a keyboard triggering
event is a keypress. Like Cocoa, the text is not inserted, and no
textInput event is dispatched, when the frame can no longer be edited,
for example because a keydown listener moved the focus.
Test: /webkit/WebKitInputMethodContext/commit-without-preedit
* Source/WebKit/WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp:
(WebKit::WebEditorClient::didDispatchInputMethodKeydown):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp:
(testWebKitInputMethodContextCommitWithoutPreedit):
(beforeAll):
Canonical link: https://commits.webkit.org/323806@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications