Bug 1828008 - Avoid creating timers with a delay of UINT32_MAX in nsCaret::ResetBlinking, r=emilio.

Differential Revision: https://phabricator.services.mozilla.com/D175421
This commit is contained in:
Florian Quèze 2023-04-14 13:25:13 +00:00
Родитель 41f1a352a8
Коммит 59b4cf8598
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -604,7 +604,7 @@ void nsCaret::ResetBlinking() {
}
auto blinkRate =
uint32_t(LookAndFeel::GetInt(IntID::CaretBlinkTime, kDefaultBlinkRate));
LookAndFeel::GetInt(IntID::CaretBlinkTime, kDefaultBlinkRate);
if (blinkRate > 0) {
// Make sure to reset the remaining blink count even if the blink rate

Просмотреть файл

@ -252,9 +252,9 @@ class nsCaret final : public nsISelectionListener {
/**
* mBlinkRate is the rate of the caret blinking the last time we read it.
* It is used as a way to optimize whether we need to reset the blinking
* timer.
* timer. 0 or a negative value means no blinking.
*/
uint32_t mBlinkRate;
int32_t mBlinkRate;
/**
* mHideCount is not 0, it means that somebody doesn't want the caret
* to be visible. See AddForceHide() and RemoveForceHide().