Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java |
index b6a71ccc29199471757e06a77c0c4d4d81a96c59..533615999013391a7460e8dcbb072dc4ebdc7c9e 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java |
@@ -399,6 +399,17 @@ public class InfoBarLayout extends ViewGroup implements View.OnClickListener { |
// could arise with extremely narrow infobars. |
mWidth = Math.max(MeasureSpec.getSize(widthMeasureSpec), mMinWidth); |
mTop = mBottom = 0; |
+ |
+ int uniformMeasureSpec = MeasureSpec.makeMeasureSpec(mWidth, MeasureSpec.EXACTLY); |
+ for (int i = 0; i < getChildCount(); i++) { |
+ View child = getChildAt(i); |
+ LayoutParams lp = (LayoutParams) child.getLayoutParams(); |
+ |
+ if (lp.width == LayoutParams.MATCH_PARENT) { |
+ // Remeasure with new dimensions |
+ measureChild(child, uniformMeasureSpec, unspecifiedSpec); |
+ } |
+ } |
placeGroups(); |
setMeasuredDimension(mWidth, resolveSize(mBottom, heightMeasureSpec)); |