Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java |
index b5c41b85f737337db260541c8376243f7baf1a8c..f3103b2c0d7e77edea57d2641bd8da2de15f89a6 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/components/LayoutTab.java |
@@ -103,6 +103,7 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property> |
private boolean mInsetBorderVertical; |
private float mToolbarYOffset; |
private float mSideBorderScale; |
+ private boolean mTitleLayerNeedsUpdate; |
private final RectF mBounds = new RectF(); // Pre-allocated to avoid in-frame allocations. |
private final RectF mClosePlacement = new RectF(); |
@@ -204,6 +205,7 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property> |
mOriginalContentHeight = maxContentTextureHeight; |
mMaxContentWidth = maxContentTextureWidth; |
mMaxContentHeight = maxContentTextureHeight; |
+ mTitleLayerNeedsUpdate = false; |
mInitFromHostCalled = false; |
} |
@@ -227,6 +229,10 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property> |
boolean needsUpdate = false; |
+ // When the LayoutTab is reinitialized, the color of the text might not be appropriate for |
+ // the color of the border. |
+ mTitleLayerNeedsUpdate = true; |
+ |
// If the toolbar color changed, animate between the old and new colors. |
if (mToolbarBackgroundColor != toolbarBackgroundColor && isVisible() |
&& mInitFromHostCalled) { |
@@ -952,6 +958,20 @@ public class LayoutTab implements ChromeAnimation.Animatable<LayoutTab.Property> |
} |
/** |
+ * @return True if the title layer needs to be updated. |
+ */ |
+ public boolean getTitleLayerNeedsUpdate() { |
+ return mTitleLayerNeedsUpdate; |
+ } |
+ |
+ /** |
+ * @param needsUpdate True if the title layer needs to be updated. |
+ */ |
+ public void setTitleLayerNeedsUpdate(boolean needsUpdate) { |
+ mTitleLayerNeedsUpdate = needsUpdate; |
+ } |
+ |
+ /** |
* Callback for |
* {@link org.chromium.chrome.browser.compositor.layouts.ChromeAnimation.Animatable} |
* |