| Index: ui/compositor/layer.cc
|
| diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
|
| index df67e9075c5cbc775179c05ffe5ddec68b53f2f0..a0a3bca93c8d5a7629a4b910bfaa3d2d0db48004 100644
|
| --- a/ui/compositor/layer.cc
|
| +++ b/ui/compositor/layer.cc
|
| @@ -164,6 +164,12 @@ void Layer::Add(Layer* child) {
|
| }
|
|
|
| void Layer::Remove(Layer* child) {
|
| + // Current bounds are used to calculate offsets when layers are reparented.
|
| + // Stop (and complete) an ongoing animation to update the bounds immediately.
|
| + if (child->GetAnimator()) {
|
| + child->GetAnimator()->StopAnimatingProperty(
|
| + ui::LayerAnimationElement::BOUNDS);
|
| + }
|
| std::vector<Layer*>::iterator i =
|
| std::find(children_.begin(), children_.end(), child);
|
| DCHECK(i != children_.end());
|
|
|