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

Unified Diff: chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc

Issue 693623003: Fix system freeze in accessibility focus ring code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@682583002
Patch Set: Created 6 years, 2 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 | chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc
diff --git a/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc b/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc
index b2c93a80312310a6239b2c9041c5518244bee748..8aa57a55f3313207bca9419aa57e64592e1085b7 100644
--- a/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc
+++ b/chrome/browser/chromeos/ui/accessibility_focus_ring_controller.cc
@@ -297,6 +297,12 @@ void AccessibilityFocusRingController::OnAnimationStep(
CHECK(!layers_.empty());
CHECK(layers_[0]);
+ // It's quite possible for the first 1 or 2 animation frames to be
+ // for a timestamp that's earlier than the time we received the
+ // focus change, so we just treat those as a delta of zero.
+ if (timestamp < focus_change_time_)
+ timestamp = focus_change_time_;
+
base::TimeDelta delta = timestamp - focus_change_time_;
base::TimeDelta transition_time =
base::TimeDelta::FromMilliseconds(kTransitionTimeMilliseconds);
« no previous file with comments | « no previous file | chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698