Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c979f48a163a8a69277648a175327c66b009050e
https://github.com/WebKit/WebKit/commit/c979f48a163a8a69277648a175327c66b009050e
Author: Fujii Hironori <[email protected]>
Date: 2026-10-09 (Fri, 09 Oct 2026)
Changed paths:
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp
Log Message:
-----------
[GTK][WPE] Input method is not told when inputmode changes on the focused
element
https://bugs.webkit.org/show_bug.cgi?id=326624
Reviewed by Patrick Griffis.
A page may change the inputmode attribute of the focused element, for
example to suppress the on-screen keyboard with inputmode="none" while the
page shows its own virtual keyboard. WebCore reports that with
ChromeClient::focusedElementDidChangeInputMode(), but WebChromeClient only
implemented it for Cocoa, so the input method kept the purpose and hints of
the time the element got the focus.
Forward the focus related ChromeClient calls on GTK and WPE as well, which
also makes WebPage::m_focusedElement available there, and update the input
method state of the focused element when its inputmode changes. The comparison
with the last state in WebPage::setInputMethodState() avoids sending redundant
updates to the UI process, and the embedder only sees a change of the content
type, not a new focus.
As on focus, the InhibitOnScreenKeyboard hint follows whether the user is
interacting with the page. The hint only keeps the on-screen keyboard from
being opened automatically. It doesn't close an open one.
WebPage::focusedSelectElementDidChangeOptions() does something only on iOS,
so it and its ChromeClient override are now limited to PLATFORM(IOS_FAMILY).
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::focusedElementDidChangeInputMode):
(WebKit::WebPage::focusedSelectElementDidChangeOptions):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp:
(InputMethodTest::waitForContentType):
(testWebKitInputMethodContextInputModeChange):
(beforeAll):
Canonical link: https://commits.webkit.org/323258@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications