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

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

Issue 224723019: [Android] Use latest page scale factor when computing content width (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use epsilon Created 6 years, 8 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 | content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java » ('j') | 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/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 7f2093596bb63f5099baf336dd22859b63a21d78..b1fe2e6442c53bd12c1033fd1580ea043c51aef5 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -2298,11 +2298,11 @@ public class ContentViewCore
TraceEvent.instant("ContentViewCore:updateFrameInfo");
// Adjust contentWidth/Height to be always at least as big as
// the actual viewport (as set by onSizeChanged).
+ final float deviceScale = mRenderCoordinates.getDeviceScaleFactor();
contentWidth = Math.max(contentWidth,
- mRenderCoordinates.fromPixToLocalCss(mViewportWidthPix));
+ mViewportWidthPix / (deviceScale * pageScaleFactor));
contentHeight = Math.max(contentHeight,
- mRenderCoordinates.fromPixToLocalCss(mViewportHeightPix));
-
+ mViewportHeightPix / (deviceScale * pageScaleFactor));
final float contentOffsetYPix = mRenderCoordinates.fromDipToPix(contentOffsetYCss);
final boolean contentSizeChanged =
@@ -2356,7 +2356,6 @@ public class ContentViewCore
if (contentOffsetChanged) updateHandleScreenPositions();
// Update offsets for fullscreen.
- final float deviceScale = mRenderCoordinates.getDeviceScaleFactor();
final float controlsOffsetPix = controlsOffsetYCss * deviceScale;
final float overdrawBottomHeightPix = overdrawBottomHeightCss * deviceScale;
getContentViewClient().onOffsetsForFullscreenChanged(
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698