Avoid manually handling quickLookWithEvent: if the immediate action gesture recognize...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jan 2015 01:09:50 +0000 (01:09 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jan 2015 01:09:50 +0000 (01:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141018
<rdar://problem/19619999>

Reviewed by Beth Dakin.

* UIProcess/API/mac/WKView.mm:
(-[WKView quickLookWithEvent:]):
If we have an immediate action gesture recognizer, just call super and
avoid WebKit's special quickLookWithEvent: implementation.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179320 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm

index 8381e9c73ebe39ffcaef69be59f94cf35b09f98a..86a18b742483ecdc7b17a2dd0f672e7dd8099ee8 100644 (file)
@@ -1,3 +1,16 @@
+2015-01-28  Timothy Horton  <timothy_horton@apple.com>
+
+        Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
+        https://bugs.webkit.org/show_bug.cgi?id=141018
+        <rdar://problem/19619999>
+
+        Reviewed by Beth Dakin.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView quickLookWithEvent:]):
+        If we have an immediate action gesture recognizer, just call super and
+        avoid WebKit's special quickLookWithEvent: implementation.
+
 2015-01-28  Sungmann Cho  <sungmann.cho@navercorp.com>
 
         Remove remaining PLATFORM(WIN) code blocks from WebKit2.
index a1e7fcc3fb6d22e8c9ac9df98f86097c938e2ae9..cae331417abd4a0403595d8b0b9e1b2728687a4c 100644 (file)
@@ -2855,6 +2855,13 @@ static void* keyValueObservingContext = &keyValueObservingContext;
     if (_data->_ignoresNonWheelEvents)
         return;
 
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
+    if (_data->_immediateActionGestureRecognizer) {
+        [super quickLookWithEvent:event];
+        return;
+    }
+#endif
+
     NSPoint locationInViewCoordinates = [self convertPoint:[event locationInWindow] fromView:nil];
     _data->_page->performDictionaryLookupAtLocation(FloatPoint(locationInViewCoordinates.x, locationInViewCoordinates.y));
 }