Bug 1376796 - Label the nsCaret::CaretBlinkCallback_timer. r=heycam

This commit is contained in:
Bevis Tseng 2017-08-03 11:03:05 +08:00
Родитель 6b1ced62cf
Коммит 31897831a5
1 изменённых файлов: 8 добавлений и 1 удалений

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

@ -654,8 +654,15 @@ void nsCaret::ResetBlinking()
} else {
nsresult err;
mBlinkTimer = do_CreateInstance("@mozilla.org/timer;1", &err);
if (NS_FAILED(err))
if (NS_FAILED(err)) {
return;
}
if (nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShell)) {
if (nsCOMPtr<nsIDocument> doc = presShell->GetDocument()) {
mBlinkTimer->SetTarget(doc->EventTargetFor(TaskCategory::Other));
}
}
}
if (blinkRate > 0) {