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

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

Issue 2106753004: Introduce bottom controls to CC and let it respond to scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: vector->float in IPC Created 4 years, 4 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
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..a971c681ec145ef91c1fa6ef92aeb96a5fb4a90a 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 mTopContentOffsetYPix;
+ private float mBottomContentOffsetYPix;
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 contentOffsetYPix, float contentOffsetYPixBottom) {
mScrollXCss = scrollXCss;
mScrollYCss = scrollYCss;
mPageScaleFactor = pageScaleFactor;
mMinPageScaleFactor = minPageScaleFactor;
mMaxPageScaleFactor = maxPageScaleFactor;
- mContentOffsetYPix = contentOffsetYPix;
+ mTopContentOffsetYPix = contentOffsetYPix;
+ mBottomContentOffsetYPix = contentOffsetYPixBottom;
updateContentSizeCss(contentWidthCss, contentHeightCss);
mLastFrameViewportWidthCss = viewportWidthCss;
@@ -85,7 +87,7 @@ public class RenderCoordinates {
public void setFrameInfoForTest(float deviceScaleFactor, float contentOffsetYPix) {
reset();
mDeviceScaleFactor = deviceScaleFactor;
- mContentOffsetYPix = contentOffsetYPix;
+ mTopContentOffsetYPix = contentOffsetYPix;
}
/**
@@ -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 + mTopContentOffsetYPix;
}
/**
@@ -302,7 +304,14 @@ public class RenderCoordinates {
* @return The Physical on-screen Y offset amount below the top controls.
*/
public float getContentOffsetYPix() {
- return mContentOffsetYPix;
+ return mTopContentOffsetYPix;
+ }
+
+ /**
+ * @return The Physical on-screen Y offset amount below the bottom controls.
+ */
+ public float getContentOffsetYPixBottom() {
+ return mBottomContentOffsetYPix;
}
/**

Powered by Google App Engine
This is Rietveld 408576698