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

Unified Diff: Source/web/WebInputEventFactoryMac.mm

Issue 906623003: Mac: Enable two finger double-tap smart zoom (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebInputEventFactoryMac.mm
diff --git a/Source/web/WebInputEventFactoryMac.mm b/Source/web/WebInputEventFactoryMac.mm
index 572b3e25d8976378694c7cc280baf6854805645f..f2ec180204237cecaf6841d96e3a6fe23f68b32a 100644
--- a/Source/web/WebInputEventFactoryMac.mm
+++ b/Source/web/WebInputEventFactoryMac.mm
@@ -62,6 +62,10 @@ enum {
NSEventPhaseMayBegin = 0x1 << 5
};
+enum {
+ NSEventTypeSmartMagnify = 32
+};
+
#endif // __MAC_OS_X_VERSION_MAX_ALLOWED < 1080
namespace blink {
@@ -1148,6 +1152,10 @@ WebGestureEvent WebInputEventFactory::gestureEvent(NSEvent *event, NSView *view)
result.type = WebInputEvent::GesturePinchUpdate;
result.data.pinchUpdate.scale = [event magnification] + 1.0;
break;
+ case NSEventTypeSmartMagnify:
+ result.type = WebInputEvent::GestureDoubleTap;
aelias_OOO_until_Jul13 2015/02/07 01:48:00 I think this is worth a comment: // Map the OS X
ccameron 2015/02/07 08:19:41 Good idea (and thanks for the wording suggestion).
+ result.data.tap.tapCount = 1;
+ break;
case NSEventTypeBeginGesture:
case NSEventTypeEndGesture:
// The specific type of a gesture is not defined when the gesture begin
« 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