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

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: 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
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewGestureHandler.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 026f9b45308f48da1e0c1f50d99e942cc844f698..739a66ab7a2fb0074f31d921dd8aa60857e11c7b 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
@@ -1496,7 +1496,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());
}
private void hidePopupDialog() {
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewGestureHandler.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698