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

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

Issue 18850005: Disable double tap zoom on mobile sites, to remove 300ms click delay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 2 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 be362fb406aa1aad726a44dd2d769e11976cad9d..abb6ffc1a0d916bb8d7f78d93ecbd68056c5259d 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
@@ -271,6 +271,14 @@ public class RenderCoordinates {
public boolean hasFixedPageScale() { return mMinPageScaleFactor == mMaxPageScaleFactor; }
/**
+ * @return True if the page has a width=device-width or narrower viewport.
+ */
+ public boolean hasMobileViewport() {
+ float windowWidthDip = mPageScaleFactor * mLastFrameViewportWidthCss;
+ return mContentWidthCss <= windowWidthDip;
+ }
+
+ /**
* @return Maximum possible horizontal scroll in physical pixels.
*/
public float getMaxHorizontalScrollPix() {

Powered by Google App Engine
This is Rietveld 408576698