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

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

Issue 228613006: [Android] Increase the mobile viewport epsilon threshold (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | no next file » | 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/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 0023dbdb991e631e57daf2d1f95ebc4746410f24..ecce49e900c6649b6fb555ea88bcd98a0d564705 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
@@ -15,8 +15,10 @@ package org.chromium.content.browser;
public class RenderCoordinates {
// Used to accomodate finite precision when comparing scaled viewport and
- // content widths in {@link #hasMobileViewport()}.
- private static final float MOBILE_VIEWPORT_WIDTH_EPSILON = 0.005f;
+ // content widths in {@link #hasMobileViewport()}. While this value may
+ // seem large, width=device-width on an N7 V1 saw errors of ~0.065 between
+ // computed window and content widths.
+ private static final float MOBILE_VIEWPORT_WIDTH_EPSILON = 0.15f;
// Scroll offset from the native in CSS.
private float mScrollXCss;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698