Index: ui/compositor/layer_animation_element.cc |
diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc |
index 79f4a7f0d49a7f2dc091931760be3de4c4f7276b..da2b8cce61332db3f7d597ec3be6c12cba1aaab8 100644 |
--- a/ui/compositor/layer_animation_element.cc |
+++ b/ui/compositor/layer_animation_element.cc |
@@ -555,7 +555,7 @@ bool LayerAnimationElement::Progress(base::TimeTicks now, |
base::TimeDelta elapsed = now - effective_start_time_; |
if ((duration_ > base::TimeDelta()) && (elapsed < duration_)) |
- t = elapsed.InMillisecondsF() / duration_.InMillisecondsF(); |
+ t = std::max(0.0, elapsed.InMillisecondsF() / duration_.InMillisecondsF()); |
James Cook
2013/03/05 20:30:38
Maybe comment why this is needed?
Harry McCleave
2013/03/06 01:59:49
Removed this, it was a place holder for the proper
|
need_draw = OnProgress(Tween::CalculateValue(tween_type_, t), delegate); |
first_frame_ = t == 1.0; |
last_progressed_fraction_ = t; |