rdar://90736710
Created attachment 457213 [details] For EWS
Comment on attachment 457213 [details] For EWS View in context: https://bugs.webkit.org/attachment.cgi?id=457213&action=review > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:-1857 > - if (gestureRecognizer != _mouseGestureRecognizer && [_mouseGestureRecognizer mouseTouch] == touch && touch.type == UITouchTypeIndirectPointer) I think this isn't the only use of `UITouchTypeIndirectPointer` in our code? Are the others wrong too?
Comment on attachment 457213 [details] For EWS View in context: https://bugs.webkit.org/attachment.cgi?id=457213&action=review Thanks for the review! >> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:-1857 >> - if (gestureRecognizer != _mouseGestureRecognizer && [_mouseGestureRecognizer mouseTouch] == touch && touch.type == UITouchTypeIndirectPointer) > > I think this isn't the only use of `UITouchTypeIndirectPointer` in our code? Are the others wrong too? That's a good point — the two other checks in `-_shouldReceiveTouch:forEvent:recognizerView:` and in this same function (below) also look a bit suspicious. I'll double check to see if they should be changed as well....
(In reply to Wenson Hsieh from comment #3) > Comment on attachment 457213 [details] > For EWS > > View in context: > https://bugs.webkit.org/attachment.cgi?id=457213&action=review > > Thanks for the review! > > >> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:-1857 > >> - if (gestureRecognizer != _mouseGestureRecognizer && [_mouseGestureRecognizer mouseTouch] == touch && touch.type == UITouchTypeIndirectPointer) > > > > I think this isn't the only use of `UITouchTypeIndirectPointer` in our code? Are the others wrong too? > > That's a good point — the two other checks in > `-_shouldReceiveTouch:forEvent:recognizerView:` and in this same function > (below) also look a bit suspicious. > > I'll double check to see if they should be changed as well.... So for this check: ``` if (gestureRecognizer == _doubleTapGestureRecognizer || gestureRecognizer == _nonBlockingDoubleTapGestureRecognizer) return touch.type != UITouchTypeIndirectPointer; ``` I'm actually not sure how to exercise that codepath using touches produced by a trackpad on iOS, since we would normally already have bailed in the `gestureRecognizer != _mouseGestureRecognizer && [_mouseGestureRecognizer mouseTouch] == touch` check above. It's also interesting to note that this was changed in trac.webkit.org/r261978 as well, from `-_isPointerTouch` to `UITouchTypeIndirectPointer`, though maybe that was just about moving off of UIKit SPI (rather than about changing behavior). For the other check: ``` - (BOOL)_shouldReceiveTouch:(UITouch *)touch forEvent:(UIEvent *)event recognizerView:(id)gestureOwner { return touch == _currentTouch && touch.type == UITouchTypeIndirectPointer; } ``` I confirmed that this causes `mousedown` and `mouseup` events to *not* be dispatched in non-"UIApplicationSupportsIndirectInputEvents" apps when clicking with a trackpad! This is fixed if we use `-_isPointerTouch` instead. Since this also appears to be a recent regression (from r290009), I'll fix it in this patch as well.
Created attachment 457259 [details] For landing
Committed r292715 (249505@main): <https://commits.webkit.org/249505@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 457259 [details].