| Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/StackLayout.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/StackLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/StackLayout.java
|
| index 9651c2f6983e010c5b8859088fc82f1b72135e7a..2cee9527ab88c618c31122bc01cf8e8919bda65b 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/StackLayout.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/StackLayout.java
|
| @@ -473,6 +473,9 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper
|
| }
|
|
|
| private void startMarginAnimation(boolean enter, boolean showIncognito) {
|
| + // Any outstanding animations must be cancelled to avoid race condition.
|
| + cancelAnimation(this, Property.INNER_MARGIN_PERCENT);
|
| +
|
| float start = mInnerMarginPercent;
|
| float end = enter && showIncognito ? 1.0f : 0.0f;
|
| if (start != end) {
|
| @@ -481,6 +484,9 @@ public class StackLayout extends Layout implements Animatable<StackLayout.Proper
|
| }
|
|
|
| private void startYOffsetAnimation(boolean enter) {
|
| + // Any outstanding animations must be cancelled to avoid race condition.
|
| + cancelAnimation(this, Property.STACK_OFFSET_Y_PERCENT);
|
| +
|
| float start = mStackOffsetYPercent;
|
| float end = enter ? 1.f : 0.f;
|
| if (start != end) {
|
|
|