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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/StackLayout.java

Issue 2546603002: Fixed Tab switcher UI misalignment (Closed)
Patch Set: comments Created 4 years 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: 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) {
« 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