-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION(257219@main): [GTK] Cursor blinks oddly in text fields, ev…
…en if blinking disabled https://bugs.webkit.org/show_bug.cgi?id=252687 Reviewed by Carlos Garcia Campos. Before 257219@main if RenderTheme::caretBlinkInterval() returned zero then the timer controlling the blink animation was never started. When introducing CaretAnimator + SimpleCaretAnimator the check was not carried over, resulting in the animator trying to paint the caret on-and-off as fast as possible when blinking should have been disabled. The fix reintroduces the check, reusing setBlinkingSuspended() to enable (or disable) blinking depending on RenderTheme::caretBlinkInterval(), which in turn is changed to return std::optional<Seconds>, with std::nullopt signalling that blinking is disables. The improved typing ensures that the code explicitly handles the case of blinking being disabled. While at it, remove the RenderThemeGtk.{h,cpp} files, because they only contained an implementation of caretBlinkInterval() that was exactly the same code guarded with PLATFORM(GTK) in RenderThemeAdwaita. * Source/WebCore/SourcesGTK.txt: Remove RenderThemeGtk.cpp from the list. * Source/WebCore/platform/CaretAnimator.h: (WebCore::CaretAnimator::didStart): Adapt to use std::optional<Seconds>. * Source/WebCore/platform/SimpleCaretAnimator.cpp: (WebCore::SimpleCaretAnimator::updateAnimationProperties): Arrange to enable or disable caret blinking, adapting to use std::optional<Seconds>. * Source/WebCore/rendering/RenderTheme.h: (WebCore::RenderTheme::caretBlinkInterval const): Change the return type to std::optional<Seconds>. * Source/WebCore/rendering/RenderThemeAdwaita.cpp: (WebCore::RenderTheme::singleton): Remove PLATFORM(GTK) guard. (WebCore::RenderThemeAdwaita::caretBlinkInterval const): Adapt to use std::optional<Seconds>. * Source/WebCore/rendering/RenderThemeAdwaita.h: Ditto. * Source/WebCore/rendering/RenderThemeGtk.cpp: Removed. * Source/WebCore/rendering/RenderThemeGtk.h: Removed. Canonical link: https://commits.webkit.org/262954@main
- Loading branch information
Showing
8 changed files
with
18 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.