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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java

Issue 1332063003: permissions: implement coalesced permissions on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@request-multiple
Patch Set: Bring CL up to scratch with mocks Created 5 years, 3 months 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
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));

Powered by Google App Engine
This is Rietveld 408576698