| Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java
|
| index 403fbeaca43176e7e382eb3502e72feec78448f8..5a4be2266ce42c33ad3832c0ebc4c58336babff7 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java
|
| @@ -122,7 +122,11 @@ public class OverlayPanel extends OverlayPanelAnimation implements ActivityState
|
| /** This is used to make sure there is one show request to one close request. */
|
| private boolean mPanelShown;
|
|
|
| - /** Cache the viewport height of the screen to filter SceneOverlay#onSizeChanged events. */
|
| + /**
|
| + * Cache the viewport width and height of the screen to filter SceneOverlay#onSizeChanged
|
| + * events.
|
| + */
|
| + private float mViewportWidth;
|
| private float mViewportHeight;
|
|
|
| // ============================================================================================
|
| @@ -794,10 +798,11 @@ public class OverlayPanel extends OverlayPanelAnimation implements ActivityState
|
| @Override
|
| public void onSizeChanged(float width, float height, float visibleViewportOffsetY,
|
| int orientation) {
|
| - // Filter events that don't change the viewport height.
|
| - if (height != mViewportHeight) {
|
| - // We only care if the orientation is changing, which will certainly change the screen's
|
| - // viewport height.
|
| + // Filter events that don't change the viewport width or height.
|
| + if (height != mViewportHeight || width != mViewportWidth) {
|
| + // We only care if the orientation is changing or we're shifting in/out of multi-window.
|
| + // In either case the screen's viewport width or height will certainly change.
|
| + mViewportWidth = width;
|
| mViewportHeight = height;
|
| resizePanelContentViewCore(width, height);
|
| onLayoutChanged(width, height, visibleViewportOffsetY);
|
|
|