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 42af4e6df83707026950c9919bb6a8e4f8f5a17d..5e4ca3b031837b1d36239ef85a60f74448f5daeb 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 |
@@ -111,9 +111,9 @@ public class PastePopupMenu implements OnClickListener { |
mRawPositionX = x; |
mRawPositionY = y; |
- View contentView = mContainer.getContentView(); |
- int width = contentView.getMeasuredWidth(); |
- int height = contentView.getMeasuredHeight(); |
+ final View contentView = mContainer.getContentView(); |
+ final int width = contentView.getMeasuredWidth(); |
+ final int height = contentView.getMeasuredHeight(); |
mPositionX = (int) (x - width / 2.0f); |
mPositionY = y - height - mLineOffsetY; |
@@ -130,11 +130,6 @@ public class PastePopupMenu implements OnClickListener { |
final int screenWidth = mContext.getResources().getDisplayMetrics().widthPixels; |
if (coords[1] < minOffsetY) { |
- // Update dimensions from new view |
- contentView = mContainer.getContentView(); |
- width = contentView.getMeasuredWidth(); |
- height = contentView.getMeasuredHeight(); |
- |
// Vertical clipping, move under edited line and to the side of insertion cursor |
// TODO bottom clipping in case there is no system bar |
coords[1] += height; |