blob: 5eadb5198167bcd41f8a768e015b30318edc0ed8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From e969ceb8b02f542f21a263ac14781eaba4d36ecd Mon Sep 17 00:00:00 2001
From: Adrian Perez de Castro <aperez@igalia.com>
Date: Tue, 4 Mar 2025 00:57:07 +0200
Subject: =?UTF-8?q?REGRESSION(262954@main):=20[GTK]=20Attempts=20access=20?=
=?UTF-8?q?to=20disengaged=20optional=20with=20caret=20blinking=20disabled?=
=?UTF-8?q?=0Ahttps://bugs.webkit.org/show=5Fbug.cgi=3Fid=3D289007?=
Reviewed by NOBODY (OOPS!).
* Source/WebCore/platform/SimpleCaretAnimator.cpp:
(WebCore::SimpleCaretAnimator::updateAnimationProperties): Always return
early when caret blinking is suspended, regardless of the current
blinking state; but nevertheless still schedule toggling the visibility
if needed.
---
Source/WebCore/platform/SimpleCaretAnimator.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Source/WebCore/platform/SimpleCaretAnimator.cpp b/Source/WebCore/platform/SimpleCaretAnimator.cpp
index f502ebe86753..065ae900c29e 100644
--- a/Source/WebCore/platform/SimpleCaretAnimator.cpp
+++ b/Source/WebCore/platform/SimpleCaretAnimator.cpp
@@ -45,14 +45,13 @@ void SimpleCaretAnimator::updateAnimationProperties()
setBlinkingSuspended(!caretBlinkInterval);
- // Ensure the caret is always visible when blinking is suspended.
- if (isBlinkingSuspended() && m_presentationProperties.blinkState == PresentationProperties::BlinkState::On) {
- m_blinkTimer.startOneShot(caretBlinkInterval.value_or(0_ms));
+ if (isBlinkingSuspended()) {
+ // Ensure the caret is always visible when blinking is suspended.
+ if (m_presentationProperties.blinkState == PresentationProperties::BlinkState::On)
+ m_blinkTimer.startOneShot(caretBlinkInterval.value_or(0_ms));
return;
}
- // If blinking is disabled, set isBlinkingSuspended() would have made the
- // previous check return early and at this point there must be an interval.
ASSERT(caretBlinkInterval.has_value());
if (currentTime - m_lastTimeCaretPaintWasToggled >= caretBlinkInterval) {
--
2.48.1
|