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

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

Issue 2506373006: [TTS][Overlay] Update fix to overflowing the narrow panel. (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | 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/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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698