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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.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: change to height and ratio Created 4 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
Index: content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java
index 2157ce4357ac8de8c728523e4c98868f16852340..f18f86a02e58256c98f3b743c04b3b15a791efde 100644
--- a/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java
+++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java
@@ -864,7 +864,7 @@ public class BrowserAccessibilityManager {
parentRelativeLeft + width, parentRelativeTop + height);
if (isRootNode) {
// Offset of the web content relative to the View.
- boundsInParent.offset(0, (int) mRenderCoordinates.getContentOffsetYPix());
+ boundsInParent.offset(0, (int) mRenderCoordinates.getTopControlsShownYPix());
}
node.setBoundsInParent(boundsInParent);
@@ -883,7 +883,7 @@ public class BrowserAccessibilityManager {
// Offset by the location of the web content within the view.
rect.offset(0,
- (int) mRenderCoordinates.getContentOffsetYPix());
+ (int) mRenderCoordinates.getTopControlsShownYPix());
// Finally offset by the location of the view within the screen.
final int[] viewLocation = new int[2];
@@ -891,7 +891,7 @@ public class BrowserAccessibilityManager {
rect.offset(viewLocation[0], viewLocation[1]);
// Clip the node's bounding rect to the viewport bounds.
- int viewportRectTop = viewLocation[1] + (int) mRenderCoordinates.getContentOffsetYPix();
+ int viewportRectTop = viewLocation[1] + (int) mRenderCoordinates.getTopControlsShownYPix();
int viewportRectBottom = viewportRectTop + mContentViewCore.getViewportHeightPix();
if (rect.top < viewportRectTop) rect.top = viewportRectTop;
if (rect.bottom > viewportRectBottom) rect.bottom = viewportRectBottom;

Powered by Google App Engine
This is Rietveld 408576698