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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java

Issue 421173002: Paste PopupMenu gets cropped by StatusBar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java b/content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java
index 0745d207edb7da317513c811b2d5eafad3224367..e5be4a3eb014373d489540540ecc3cbb1c9617b1 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/PastePopupMenu.java
@@ -131,8 +131,13 @@ public class PastePopupMenu implements OnClickListener {
coords[0] += mPositionX;
coords[1] += mPositionY;
+ int statusBarHeight = 0;
+ int resourceId = mContext.getResources().getIdentifier("status_bar_height", "dimen", "android");
jdduke (slow) 2014/07/28 15:46:03 What guarantees do we have that the status bar wil
kingshuk.j 2014/07/29 11:09:27 ok, I will put a check for the status bar visibili
+ if (resourceId > 0) {
+ statusBarHeight = mContext.getResources().getDimensionPixelSize(resourceId);
+ }
final int screenWidth = mContext.getResources().getDisplayMetrics().widthPixels;
- if (coords[1] < 0) {
+ if (coords[1] < statusBarHeight) {
updateContent(false);
// Update dimensions from new view
contentView = mContainer.getContentView();
« 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