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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelInflater.java

Issue 1823203002: [Contextual Search] Fixing ViewResourceInflater layout invalidation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 4 years, 9 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
« no previous file with comments | « no previous file | ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceInflater.java » ('j') | 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/bottombar/OverlayPanelInflater.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelInflater.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelInflater.java
index bc0dd096f23bfbcdf0a884fbfee82f59ad042144..873b41ce411aef866a4828d610a3eadbed8e60e1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelInflater.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelInflater.java
@@ -57,7 +57,7 @@ public abstract class OverlayPanelInflater extends ViewResourceInflater {
@Override
protected void onFinishInflate() {
if (!mOverlayPanel.isFullWidthSizePanel()) {
- setWidth(mOverlayPanel.getMaximumWidthPx());
+ invalidate(true);
}
}
@@ -68,22 +68,6 @@ public abstract class OverlayPanelInflater extends ViewResourceInflater {
}
/**
- * @param width The width of the view to be inforced.
- */
- private void setWidth(int width) {
- // When the view is attached, we need to force the layout to have a specific width
- // because the container is "full-width" (as wide as a tab). When not attached,
- // ViewResourceInflater#layout() will properly resize the view offscreen.
- if (shouldAttachView()) {
- View view = getView();
- if (view != null) {
- view.getLayoutParams().width = width;
- view.requestLayout();
- }
- }
- }
-
- /**
* Sanitizes a string to be displayed on the Overlay Panel Bar.
* @param text The text to be sanitized.
* @return The sanitized text.
@@ -92,5 +76,4 @@ public abstract class OverlayPanelInflater extends ViewResourceInflater {
if (text == null) return null;
return text.replace(OBJ_CHARACTER, " ").trim();
}
-
}
« no previous file with comments | « no previous file | ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceInflater.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698