Title: [193555] branches/safari-601.1.46-branch/Source/WebKit2

Diff

Modified: branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog (193554 => 193555)


--- branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog	2015-12-06 06:12:47 UTC (rev 193554)
+++ branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog	2015-12-06 06:14:18 UTC (rev 193555)
@@ -1,5 +1,29 @@
 2015-12-05  Babak Shafiei  <[email protected]>
 
+        Merge r191409.
+
+    2015-10-21  Wenson Hsieh  <[email protected]>
+
+            Single tapping clickable elements in unscalable pages should show a tap highlight
+            https://bugs.webkit.org/show_bug.cgi?id=150382
+
+            Reviewed by Simon Fraser.
+
+            When the double tap gesture recognizer is disabled ahead of time (as in the case of unscalable pages) the tap is
+            committed before the geometries come in. To fix this, we introduce a flag that allows the single tap to be
+            committed before the tap highlight arrives. This allows the tap highlight to be immediately animated when receiving
+            the tap highlight geometries only in the case where double tapping is disabled when recognizing the single tap.
+
+            * UIProcess/ios/WKContentViewInteraction.h:
+            * UIProcess/ios/WKContentViewInteraction.mm:
+            (-[WKContentView setupInteraction]):
+            (-[WKContentView cleanupInteraction]):
+            (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
+            (-[WKContentView _singleTapRecognized:]):
+            (-[WKContentView _singleTapCommited:]):
+
+2015-12-05  Babak Shafiei  <[email protected]>
+
         Merge r191309.
 
     2015-10-17  Wenson Hsieh  <[email protected]>

Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (193554 => 193555)


--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h	2015-12-06 06:12:47 UTC (rev 193554)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h	2015-12-06 06:14:18 UTC (rev 193555)
@@ -163,6 +163,7 @@
     BOOL _usingGestureForSelection;
     BOOL _inspectorNodeSearchEnabled;
     BOOL _didAccessoryTabInitiateFocus;
+    BOOL _isExpectingFastSingleTapCommit;
 }
 
 @end

Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (193554 => 193555)


--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2015-12-06 06:12:47 UTC (rev 193554)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2015-12-06 06:14:18 UTC (rev 193555)
@@ -387,6 +387,7 @@
     _actionSheetAssistant = adoptNS([[WKActionSheetAssistant alloc] initWithView:self]);
     [_actionSheetAssistant setDelegate:self];
     _smartMagnificationController = std::make_unique<SmartMagnificationController>(self);
+    _isExpectingFastSingleTapCommit = NO;
 }
 
 - (void)cleanupInteraction
@@ -396,6 +397,7 @@
     _actionSheetAssistant = nil;
     _smartMagnificationController = nil;
     _didAccessoryTabInitiateFocus = NO;
+    _isExpectingFastSingleTapCommit = NO;
     [_formInputSession invalidate];
     _formInputSession = nil;
     [_highlightView removeFromSuperview];
@@ -783,6 +785,11 @@
     }
 
     [self _showTapHighlight];
+    if (_isExpectingFastSingleTapCommit) {
+        [self _finishInteraction];
+        if (!_potentialTapInProgress)
+            _isExpectingFastSingleTapCommit = NO;
+    }
 }
 
 - (CGFloat)_fastClickZoomThreshold
@@ -1177,6 +1184,7 @@
     _page->potentialTapAtPosition(gestureRecognizer.location, ++_latestTapID);
     _potentialTapInProgress = YES;
     _isTapHighlightIDValid = YES;
+    _isExpectingFastSingleTapCommit = !_doubleTapGestureRecognizer.get().enabled;
 }
 
 static void cancelPotentialTapIfNecessary(WKContentView* contentView)
@@ -1230,7 +1238,8 @@
 
     _page->commitPotentialTap();
 
-    [self _finishInteraction];
+    if (!_isExpectingFastSingleTapCommit)
+        [self _finishInteraction];
 }
 
 - (void)_doubleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to