Changeset 244586 in webkit
- Timestamp:
- Apr 24, 2019 5:23:20 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r244582 r244586 1 2019-04-24 Dean Jackson <dino@apple.com> 2 3 Rename _highlightLongPressCanClick and only add gesture recognizer when necessary 4 https://bugs.webkit.org/show_bug.cgi?id=197231 5 <rdar://problem/50164234> 6 7 Reviewed by Antoine Quint. 8 9 Rename _highlightLongPressCanClick to _longPressCanClick since it will be 10 used in other places. 11 12 Only attach the _highlightLongPressGestureRecognizer when we're not 13 using long presses for preview. This might revert in the future, if we 14 can set up an appropriate gesture resolution between the two. 15 16 * UIProcess/ios/WKContentViewInteraction.h: 17 * UIProcess/ios/WKContentViewInteraction.mm: 18 (-[WKContentView setupInteraction]): 19 (-[WKContentView _webTouchEvent:preventsNativeGestures:]): 20 (-[WKContentView _highlightLongPressRecognized:]): 21 (-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]): 22 (-[WKContentView _presentedViewControllerForPreviewItemController:]): 23 (-[WKContentView _previewItemControllerDidCancelPreview:]): 24 1 25 2019-04-24 chris fleizach <cfleizach@apple.com> 2 26 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r244559 r244586 310 310 BOOL _potentialTapInProgress; 311 311 BOOL _isDoubleTapPending; 312 BOOL _ highlightLongPressCanClick;312 BOOL _longPressCanClick; 313 313 BOOL _hasTapHighlightForPotentialTap; 314 314 BOOL _selectionNeedsUpdate; -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r244559 r244586 746 746 [_highlightLongPressGestureRecognizer setDelay:highlightDelay]; 747 747 [_highlightLongPressGestureRecognizer setDelegate:self]; 748 [self addGestureRecognizer:_highlightLongPressGestureRecognizer.get()];749 748 750 749 #if HAVE(LINK_PREVIEW) 751 750 if (!self.shouldUsePreviewForLongPress) 752 751 #endif 752 { 753 [self addGestureRecognizer:_highlightLongPressGestureRecognizer.get()]; 754 753 755 [self _createAndConfigureLongPressGestureRecognizer]; 756 } 754 757 755 758 #if ENABLE(DATA_INTERACTION) … … 1393 1396 { 1394 1397 if (preventsNativeGesture) { 1395 _ highlightLongPressCanClick = NO;1398 _longPressCanClick = NO; 1396 1399 1397 1400 _canSendTouchEventsAsynchronously = YES; … … 2188 2191 switch ([gestureRecognizer state]) { 2189 2192 case UIGestureRecognizerStateBegan: 2190 _ highlightLongPressCanClick = YES;2193 _longPressCanClick = YES; 2191 2194 cancelPotentialTapIfNecessary(self); 2192 2195 _page->tapHighlightAtPosition([gestureRecognizer startPoint], ++_latestTapID); … … 2194 2197 break; 2195 2198 case UIGestureRecognizerStateEnded: 2196 if (_ highlightLongPressCanClick && _positionInformation.isElement) {2199 if (_longPressCanClick && _positionInformation.isElement) { 2197 2200 [self _attemptClickAtLocation:gestureRecognizer.startPoint modifierFlags:gestureRecognizerModifierFlags(gestureRecognizer)]; 2198 2201 [self _finishInteraction]; 2199 2202 } else 2200 2203 [self _cancelInteraction]; 2201 _ highlightLongPressCanClick = NO;2204 _longPressCanClick = NO; 2202 2205 break; 2203 2206 case UIGestureRecognizerStateCancelled: 2204 2207 [self _cancelInteraction]; 2205 _ highlightLongPressCanClick = NO;2208 _longPressCanClick = NO; 2206 2209 break; 2207 2210 default: … … 7196 7199 - (BOOL)_interactionShouldBeginFromPreviewItemController:(UIPreviewItemController *)controller forPosition:(CGPoint)position 7197 7200 { 7198 if (!_ highlightLongPressCanClick)7201 if (!_longPressCanClick) 7199 7202 return NO; 7200 7203 … … 7356 7359 7357 7360 if ([_previewItemController type] == UIPreviewItemTypeLink) { 7358 _ highlightLongPressCanClick = NO;7361 _longPressCanClick = NO; 7359 7362 _page->startInteractionWithElementAtPosition(_positionInformation.request.point); 7360 7363 … … 7508 7511 - (void)_previewItemControllerDidCancelPreview:(UIPreviewItemController *)controller 7509 7512 { 7510 _ highlightLongPressCanClick = NO;7513 _longPressCanClick = NO; 7511 7514 7512 7515 [_webView _didDismissForcePressPreview];
Note: See TracChangeset
for help on using the changeset viewer.