Index: content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java b/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java |
index c56660c2c99ccbd48ac9face8ba7c9f2401ca017..7670ea3b6ebbf3f01a060e55d66b1369513cbc47 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java |
@@ -36,7 +36,8 @@ public class RenderCoordinates { |
// Cached device density. |
private float mDeviceScaleFactor; |
- private float mContentOffsetYPix; |
+ private float mTopControlsShownYPix; |
+ private float mBottomControlsShownYPix; |
private boolean mHasFrameInfo; |
@@ -61,13 +62,14 @@ public class RenderCoordinates { |
float contentWidthCss, float contentHeightCss, |
float viewportWidthCss, float viewportHeightCss, |
float pageScaleFactor, float minPageScaleFactor, float maxPageScaleFactor, |
- float contentOffsetYPix) { |
+ float topControlsShownYPix, float bottomControlsShownYPix) { |
mScrollXCss = scrollXCss; |
mScrollYCss = scrollYCss; |
mPageScaleFactor = pageScaleFactor; |
mMinPageScaleFactor = minPageScaleFactor; |
mMaxPageScaleFactor = maxPageScaleFactor; |
- mContentOffsetYPix = contentOffsetYPix; |
+ mTopControlsShownYPix = topControlsShownYPix; |
+ mBottomControlsShownYPix = bottomControlsShownYPix; |
updateContentSizeCss(contentWidthCss, contentHeightCss); |
mLastFrameViewportWidthCss = viewportWidthCss; |
@@ -78,14 +80,14 @@ public class RenderCoordinates { |
/** |
* Sets several fields for unit test. (used by {@link CursorAnchorInfoControllerTest}). |
- * @param deviceScaleFactor Device scale factor (maps DIP pixels to physical pixels). |
- * @param contentOffsetYPix Physical on-screen Y offset amount below the top controls. |
+ * @param deviceScaleFactor Device scale factor (maps DIP pixels to physical pixels). |
+ * @param topControlsShownYPix Physical on-screen Y offset amount the top controls shows. |
*/ |
@VisibleForTesting |
- public void setFrameInfoForTest(float deviceScaleFactor, float contentOffsetYPix) { |
+ public void setFrameInfoForTest(float deviceScaleFactor, float topControlsShownYPix) { |
reset(); |
mDeviceScaleFactor = deviceScaleFactor; |
- mContentOffsetYPix = contentOffsetYPix; |
+ mTopControlsShownYPix = topControlsShownYPix; |
} |
/** |
@@ -137,7 +139,7 @@ public class RenderCoordinates { |
* @return Physical (screen) Y coordinate of the point. |
*/ |
public float getYPix() { |
- return getYLocalDip() * mDeviceScaleFactor + mContentOffsetYPix; |
+ return getYLocalDip() * mDeviceScaleFactor + mTopControlsShownYPix; |
} |
/** |
@@ -299,10 +301,15 @@ public class RenderCoordinates { |
} |
/** |
- * @return The Physical on-screen Y offset amount below the top controls. |
+ * @return The Physical on-screen Y offset amount between the top of the web content and the |
+ * bottom of the status bar. |
*/ |
- public float getContentOffsetYPix() { |
- return mContentOffsetYPix; |
+ public float getTopControlsShownYPix() { |
+ return mTopControlsShownYPix; |
+ } |
+ |
+ public float getBottomControlsShownYPix() { |
+ return mBottomControlsShownYPix; |
} |
/** |