RESOLVED FIXED Bug 252687
REGRESSION(257219@main): [GTK] Cursor blinks oddly in text fields, even if blinking disabled
https://bugs.webkit.org/show_bug.cgi?id=252687
Summary REGRESSION(257219@main): [GTK] Cursor blinks oddly in text fields, even if bl...
Adrian Perez
Reported 2023-02-21 13:25:03 PST
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.
Attachments
Short screencast showing the cursor blinking in DuckDuckGo (11.92 KB, video/webm)
2023-02-21 13:26 PST, Adrian Perez
no flags
Adrian Perez
Comment 1 2023-02-21 13:26:41 PST
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.)
Adrian Perez
Comment 2 2023-03-12 14:56:55 PDT
Happens with a GTK3 build from the webkitglib/2.40 branch, too.
Adrian Perez
Comment 3 2023-04-14 01:34:17 PDT
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().
Adrian Perez
Comment 4 2023-04-14 01:51:54 PDT
(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.
Adrian Perez
Comment 5 2023-04-14 02:37:21 PDT
EWS
Comment 6 2023-04-14 04:29:50 PDT
Committed 262954@main (6a0a83593474): <https://commits.webkit.org/262954@main> Reviewed commits have been landed. Closing PR #12737 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.