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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 22706009: Make sure proper double tap scale gets recorded for next double tap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 1269
1270 float scale; 1270 float scale;
1271 WebPoint scroll; 1271 WebPoint scroll;
1272 bool doubleTapShouldZoomOut; 1272 bool doubleTapShouldZoomOut;
1273 1273
1274 computeScaleAndScrollForBlockRect(blockBounds, touchPointPadding, scale, scr oll, doubleTapShouldZoomOut); 1274 computeScaleAndScrollForBlockRect(blockBounds, touchPointPadding, scale, scr oll, doubleTapShouldZoomOut);
1275 1275
1276 bool isAnimating; 1276 bool isAnimating;
1277 1277
1278 if (doubleTapShouldZoomOut) { 1278 if (doubleTapShouldZoomOut) {
1279 isAnimating = startPageScaleAnimation(mainFrameImpl()->frameView()->wind owToContents(point), true, minimumPageScaleFactor(), doubleTapZoomAnimationDurat ionInSeconds); 1279 scale = minimumPageScaleFactor();
1280 isAnimating = startPageScaleAnimation(mainFrameImpl()->frameView()->wind owToContents(point), true, scale, doubleTapZoomAnimationDurationInSeconds);
1280 } else { 1281 } else {
1281 isAnimating = startPageScaleAnimation(scroll, false, scale, doubleTapZoo mAnimationDurationInSeconds); 1282 isAnimating = startPageScaleAnimation(scroll, false, scale, doubleTapZoo mAnimationDurationInSeconds);
1282 } 1283 }
1283 1284
1284 if (isAnimating) { 1285 if (isAnimating) {
1285 m_doubleTapZoomPageScaleFactor = scale; 1286 m_doubleTapZoomPageScaleFactor = scale;
1286 m_doubleTapZoomPending = true; 1287 m_doubleTapZoomPending = true;
1287 } 1288 }
1288 } 1289 }
1289 1290
(...skipping 2793 matching lines...) Expand 10 before | Expand all | Expand 10 after
4083 } 4084 }
4084 4085
4085 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4086 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4086 { 4087 {
4087 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4088 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4088 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4089 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4089 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4090 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4090 } 4091 }
4091 4092
4092 } // namespace WebKit 4093 } // namespace WebKit
OLDNEW
« 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