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

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
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 27c5705577dc2a01dbc595108710d3fd69a9d0dd..1edb0c1e486909f17d91f9d6ca5f49e6bb43f880 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());
+ requestLayout();
}
}
@@ -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.

Powered by Google App Engine
This is Rietveld 408576698