Steps to reproduce: 1. Build WebKit from “main” using “-DPORT=GTK -DUSE_GTK4=ON” 2. Open the URL data:text/html,<input> 3. Focus the input element Expected: Cursor blinks at the rate indicated by GTK, for example by configuring “Cursor Blinking” in the Accessibility page in GNOME Settings Actual outcome: Cursor blinks oddly fast, no matter the setting.
Created attachment 465114 [details] Short screencast showing the cursor blinking in DuckDuckGo Here's a short screencast of the issue in the input field from https://ddg.gg (the issue is reproducible in all input fields, though.)
Happens with a GTK3 build from the webkitglib/2.40 branch, too.
I have started to investigate this a bit, it seems nothing is calling RenderTheme{Adwaita,Gtk}::caretBlinkInterval(), so of course the GTK settings are never taken into account. The culprit seems to be 257219@main which removed a call to RenderTheme::singleton().caretBlinkInterval().
(In reply to Adrian Perez from comment #3) > I have started to investigate this a bit, it seems nothing is calling > RenderTheme{Adwaita,Gtk}::caretBlinkInterval(), so of course the GTK > settings are never taken into account. The culprit seems to be 257219@main > which removed a call to RenderTheme::singleton().caretBlinkInterval(). Actually, RenderThemeGtk::caretBlinkInterval() does get called from inside SimpleCaretAnimator, but RenderThemeAdwaita::caretBlinkInterval() does not, and it is useless because both have the same implementation duplicated. I think we can just keep the one from RenderThemeAdwaita with an USE(GTK) guard to determine whether to read the GTK settings, and provide some hardcoded defaults to be used by WPE. At least one of the issues is that with blinking disabled caretBlinkInterval() returns zero, so the SimpleCaretAnimator is scheduling an update of the cursor every zero seconds, resulting in the oddly fast blinking.
Pull request: https://github.com/WebKit/WebKit/pull/12737
Committed 262954@main (6a0a83593474): <https://commits.webkit.org/262954@main> Reviewed commits have been landed. Closing PR #12737 and removing active labels.