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

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

Issue 1127013002: Make Mac pinch thresholding apply only to zoom (Blink side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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 | public/web/WebInputEvent.h » ('j') | public/web/WebInputEvent.h » ('J')
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 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 return true; 2176 return true;
2177 2177
2178 // Unhandled touchpad gesture pinch events synthesize mouse wheel events. 2178 // Unhandled touchpad gesture pinch events synthesize mouse wheel events.
2179 if (inputEvent.type == WebInputEvent::GesturePinchUpdate) { 2179 if (inputEvent.type == WebInputEvent::GesturePinchUpdate) {
2180 const WebGestureEvent& pinchEvent = static_cast<const WebGestureEvent&>( inputEvent); 2180 const WebGestureEvent& pinchEvent = static_cast<const WebGestureEvent&>( inputEvent);
2181 2181
2182 // First, synthesize a Windows-like wheel event to send to any handlers that may exist. 2182 // First, synthesize a Windows-like wheel event to send to any handlers that may exist.
2183 if (handleSyntheticWheelFromTouchpadPinchEvent(pinchEvent)) 2183 if (handleSyntheticWheelFromTouchpadPinchEvent(pinchEvent))
2184 return true; 2184 return true;
2185 2185
2186 if (pinchEvent.data.pinchUpdate.zoomDisabled)
2187 return false;
ccameron 2015/05/06 03:48:32 Testing for this requires event sender support fro
2188
2186 if (page()->frameHost().pinchViewport().magnifyScaleAroundAnchor(pinchEv ent.data.pinchUpdate.scale, FloatPoint(pinchEvent.x, pinchEvent.y))) 2189 if (page()->frameHost().pinchViewport().magnifyScaleAroundAnchor(pinchEv ent.data.pinchUpdate.scale, FloatPoint(pinchEvent.x, pinchEvent.y)))
2187 return true; 2190 return true;
2188 } 2191 }
2189 2192
2190 return false; 2193 return false;
2191 } 2194 }
2192 2195
2193 void WebViewImpl::setCursorVisibilityState(bool isVisible) 2196 void WebViewImpl::setCursorVisibilityState(bool isVisible)
2194 { 2197 {
2195 if (m_page) 2198 if (m_page)
(...skipping 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after
4466 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4469 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4467 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4470 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4468 } 4471 }
4469 4472
4470 void WebViewImpl::forceNextWebGLContextCreationToFail() 4473 void WebViewImpl::forceNextWebGLContextCreationToFail()
4471 { 4474 {
4472 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4475 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4473 } 4476 }
4474 4477
4475 } // namespace blink 4478 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | public/web/WebInputEvent.h » ('j') | public/web/WebInputEvent.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698