Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1074)

Unified Diff: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm

Issue 2868783006: Re-add delay to PostTask in StartScrollbarPaintTimer() (Closed)
Patch Set: add comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm
diff --git a/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm b/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm
index 1ec040f2c6356d2be8b21b6ca11066431761a05a..3716df6a7f466e13bab67a308c496c5dd16ec2d2 100644
--- a/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm
+++ b/third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm
@@ -1033,9 +1033,14 @@ void ScrollAnimatorMac::UpdateScrollerStyle() {
}
void ScrollAnimatorMac::StartScrollbarPaintTimer() {
- initial_scrollbar_paint_task_handle_ = task_runner_->PostCancellableTask(
- BLINK_FROM_HERE, WTF::Bind(&ScrollAnimatorMac::InitialScrollbarPaintTask,
- WrapWeakPersistent(this)));
+ // Post a task with 1 ms delay to give a chance to run other immediate tasks
+ // that may cancel this.
+ initial_scrollbar_paint_task_handle_ =
+ task_runner_->PostDelayedCancellableTask(
+ BLINK_FROM_HERE,
+ WTF::Bind(&ScrollAnimatorMac::InitialScrollbarPaintTask,
+ WrapWeakPersistent(this)),
+ 1);
}
bool ScrollAnimatorMac::ScrollbarPaintTimerIsActive() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698