Title: [193476] branches/safari-601-branch/Source/WebKit2
Revision
193476
Author
matthew_han...@apple.com
Date
2015-12-04 14:38:15 -0800 (Fri, 04 Dec 2015)

Log Message

Merge r191409. rdar://problem/23732400

Modified Paths

Diff

Modified: branches/safari-601-branch/Source/WebKit2/ChangeLog (193475 => 193476)


--- branches/safari-601-branch/Source/WebKit2/ChangeLog	2015-12-04 22:38:12 UTC (rev 193475)
+++ branches/safari-601-branch/Source/WebKit2/ChangeLog	2015-12-04 22:38:15 UTC (rev 193476)
@@ -1,5 +1,29 @@
 2015-12-04  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r191409. rdar://problem/23732400
+
+    2015-10-21  Wenson Hsieh  <wenson_hs...@apple.com>
+
+            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-04  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r191309. rdar://problem/23732400
 
     2015-10-17  Wenson Hsieh  <wenson_hs...@apple.com>

Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (193475 => 193476)


--- branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h	2015-12-04 22:38:12 UTC (rev 193475)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h	2015-12-04 22:38:15 UTC (rev 193476)
@@ -161,6 +161,7 @@
     BOOL _usingGestureForSelection;
     BOOL _inspectorNodeSearchEnabled;
     BOOL _didAccessoryTabInitiateFocus;
+    BOOL _isExpectingFastSingleTapCommit;
 }
 
 @end

Modified: branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (193475 => 193476)


--- branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2015-12-04 22:38:12 UTC (rev 193475)
+++ branches/safari-601-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2015-12-04 22:38:15 UTC (rev 193476)
@@ -359,6 +359,7 @@
     _actionSheetAssistant = adoptNS([[WKActionSheetAssistant alloc] initWithView:self]);
     [_actionSheetAssistant setDelegate:self];
     _smartMagnificationController = std::make_unique<SmartMagnificationController>(self);
+    _isExpectingFastSingleTapCommit = NO;
 }
 
 - (void)cleanupInteraction
@@ -368,6 +369,7 @@
     _actionSheetAssistant = nil;
     _smartMagnificationController = nil;
     _didAccessoryTabInitiateFocus = NO;
+    _isExpectingFastSingleTapCommit = NO;
     [_formInputSession invalidate];
     _formInputSession = nil;
     [_highlightView removeFromSuperview];
@@ -757,6 +759,11 @@
     }
 
     [self _showTapHighlight];
+    if (_isExpectingFastSingleTapCommit) {
+        [self _finishInteraction];
+        if (!_potentialTapInProgress)
+            _isExpectingFastSingleTapCommit = NO;
+    }
 }
 
 - (CGFloat)_fastClickZoomThreshold
@@ -1152,6 +1159,7 @@
     _page->potentialTapAtPosition(gestureRecognizer.location, ++_latestTapID);
     _potentialTapInProgress = YES;
     _isTapHighlightIDValid = YES;
+    _isExpectingFastSingleTapCommit = !_doubleTapGestureRecognizer.get().enabled;
 }
 
 static void cancelPotentialTapIfNecessary(WKContentView* contentView)
@@ -1205,7 +1213,8 @@
 
     _page->commitPotentialTap();
 
-    [self _finishInteraction];
+    if (!_isExpectingFastSingleTapCommit)
+        [self _finishInteraction];
 }
 
 - (void)_doubleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to