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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.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: Fix typo 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/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 a7da5bc527bc7450f9f1531519e47ec208285838..89fcc7919a242005e0a5486dfe4e1680a095b0b9 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
@@ -1461,7 +1461,14 @@ public class ContentViewCore
private void onRenderCoordinatesUpdated() {
if (mContentViewGestureHandler == null) return;
- mContentViewGestureHandler.updateHasFixedPageScale(mRenderCoordinates.hasFixedPageScale());
+
+ // We disable double tap zoom for pages that have a width=device-width
+ // or narrower viewport (indicating that this is a mobile-optimized or
+ // responsive web design, so text will be legible without zooming).
+ // We also disable it for pages that disallow the user from zooming in
+ // or out (even if they don't have a device-width or narrower viewport).
+ mContentViewGestureHandler.updateShouldDisableDoubleTap(
+ mRenderCoordinates.hasMobileViewport() || mRenderCoordinates.hasFixedPageScale());
Ted C 2013/10/24 19:52:44 +4 indent (and it looks like it will require a lin
johnme 2013/10/31 19:13:12 Done (still fit within 100 chars without line wrap
}
private void hidePopupDialog() {

Powered by Google App Engine
This is Rietveld 408576698