Title: [170629] trunk/Source/WebKit2
Revision
170629
Author
[email protected]
Date
2014-06-30 20:12:17 -0700 (Mon, 30 Jun 2014)

Log Message

[iOS][WK2] The long press gesture recognizers should not block the pinch gesture
https://bugs.webkit.org/show_bug.cgi?id=134477
<rdar://problem/17514936>

Reviewed by Tim Horton.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (170628 => 170629)


--- trunk/Source/WebKit2/ChangeLog	2014-07-01 02:19:21 UTC (rev 170628)
+++ trunk/Source/WebKit2/ChangeLog	2014-07-01 03:12:17 UTC (rev 170629)
@@ -1,3 +1,14 @@
+2014-06-30  Benjamin Poulain  <[email protected]>
+
+        [iOS][WK2] The long press gesture recognizers should not block the pinch gesture
+        https://bugs.webkit.org/show_bug.cgi?id=134477
+        <rdar://problem/17514936>
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
+
 2014-06-30  Anders Carlsson  <[email protected]>
 
         Add WebPageProxy::restoreFromState

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (170628 => 170629)


--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-07-01 02:19:21 UTC (rev 170628)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-07-01 03:12:17 UTC (rev 170629)
@@ -671,8 +671,9 @@
 {
     // A long-press gesture can not be recognized while panning, but a pan can be recognized
     // during a long-press gesture.
-    BOOL shouldNotPreventPanGesture = preventingGestureRecognizer == _highlightLongPressGestureRecognizer || preventingGestureRecognizer == _longPressGestureRecognizer;
-    return !(shouldNotPreventPanGesture && [preventedGestureRecognizer isKindOfClass:NSClassFromString(@"UIScrollViewPanGestureRecognizer")]);
+    BOOL shouldNotPreventScrollViewGestures = preventingGestureRecognizer == _highlightLongPressGestureRecognizer || preventingGestureRecognizer == _longPressGestureRecognizer;
+    return !(shouldNotPreventScrollViewGestures
+        && ([preventedGestureRecognizer isKindOfClass:NSClassFromString(@"UIScrollViewPanGestureRecognizer")] || [preventedGestureRecognizer isKindOfClass:NSClassFromString(@"UIScrollViewPinchGestureRecognizer")]));
 }
 
 - (BOOL)gestureRecognizer:(UIGestureRecognizer *)preventedGestureRecognizer canBePreventedByGestureRecognizer:(UIGestureRecognizer *)preventingGestureRecognizer {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to