Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4d3c1638849c09d284d917e02555ca166c863e52
      
https://github.com/WebKit/WebKit/commit/4d3c1638849c09d284d917e02555ca166c863e52
  Author: Simon Pena <[email protected]>
  Date:   2026-10-07 (Wed, 07 Oct 2026)

  Changed paths:
    M Source/WebKit/UIProcess/API/glib/InputMethodFilter.cpp
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp

  Log Message:
  -----------
  [GTK][WPE] Input method composition underlines pile up while composing
https://bugs.webkit.org/show_bug.cgi?id=326575

Reviewed by Carlos Garcia Campos.

InputMethodFilter::preeditChanged() added the underlines of each pre-edit 
update to the ones it
already had, and only cleared them when the composition ended. So every update 
also sent the
underlines of all the earlier ones. When the pre-edit got shorter, for example 
with Backspace, the
underlines of the longer pre-edit were painted under the text after it.

Clear the underlines before adding the new ones.

The test makes the pre-edit longer and then shorter, and compares a snapshot of 
the result with
one of the same pre-edit typed directly. The mock input method now handles 
Backspace, to make the
pre-edit shorter.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp

* Source/WebKit/UIProcess/API/glib/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::preeditChanged):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestInputMethodContext.cpp:
(webkitInputMethodContextMockFilterKeyEvent):
(testWebKitInputMethodContextPreeditUnderlines):
(beforeAll):

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



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

Reply via email to