Title: [258155] branches/safari-609-branch/Source/WebKit
- Revision
- 258155
- Author
- [email protected]
- Date
- 2020-03-09 13:03:06 -0700 (Mon, 09 Mar 2020)
Log Message
Cherry-pick r257659. rdar://problem/60183766
macCatalyst: 'Open' context menu item doesn't work
https://bugs.webkit.org/show_bug.cgi?id=208388
<rdar://problem/59820273>
Reviewed by Wenson Hsieh.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _doubleTapRecognizedForDoubleClick:]):
(-[WKContentView _singleTapRecognized:]):
(-[WKContentView _attemptClickAtLocation:modifierFlags:]):
(-[WKContentView _mouseGestureRecognizerChanged:]):
In r178980, a mechanism was introduced to ensure that synthetic clicks are
only dispatched to the page that the user originally touched.
macCatalyst's WKMouseGestureRecognizer unintentionally entirely bypassed
this mechanism, never setting _layerTreeTransactionIdAtLastTouchStart,
because the touch event gesture recognizer is disabled. This was generally
fine because in this case, we don't need to send synthetic clicks,
instead sending proper mouse events.
However, the "Open" context menu item works by sending a synthetic click
at the original interaction location. Since we did not set
_layerTreeTransactionIdAtLastTouchStart, the Web Content process will
ignore the click, and perform no action.
Fix this by also setting _layerTreeTransactionIdAtLastTouchStart
on mouseDown.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-609-branch/Source/WebKit/ChangeLog (258154 => 258155)
--- branches/safari-609-branch/Source/WebKit/ChangeLog 2020-03-09 20:03:03 UTC (rev 258154)
+++ branches/safari-609-branch/Source/WebKit/ChangeLog 2020-03-09 20:03:06 UTC (rev 258155)
@@ -1,5 +1,76 @@
2020-03-09 Alan Coon <[email protected]>
+ Cherry-pick r257659. rdar://problem/60183766
+
+ macCatalyst: 'Open' context menu item doesn't work
+ https://bugs.webkit.org/show_bug.cgi?id=208388
+ <rdar://problem/59820273>
+
+ Reviewed by Wenson Hsieh.
+
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView cleanupInteraction]):
+ (-[WKContentView _webTouchEventsRecognized:]):
+ (-[WKContentView _doubleTapRecognizedForDoubleClick:]):
+ (-[WKContentView _singleTapRecognized:]):
+ (-[WKContentView _attemptClickAtLocation:modifierFlags:]):
+ (-[WKContentView _mouseGestureRecognizerChanged:]):
+ In r178980, a mechanism was introduced to ensure that synthetic clicks are
+ only dispatched to the page that the user originally touched.
+
+ macCatalyst's WKMouseGestureRecognizer unintentionally entirely bypassed
+ this mechanism, never setting _layerTreeTransactionIdAtLastTouchStart,
+ because the touch event gesture recognizer is disabled. This was generally
+ fine because in this case, we don't need to send synthetic clicks,
+ instead sending proper mouse events.
+
+ However, the "Open" context menu item works by sending a synthetic click
+ at the original interaction location. Since we did not set
+ _layerTreeTransactionIdAtLastTouchStart, the Web Content process will
+ ignore the click, and perform no action.
+
+ Fix this by also setting _layerTreeTransactionIdAtLastTouchStart
+ on mouseDown.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-02-28 Tim Horton <[email protected]>
+
+ macCatalyst: 'Open' context menu item doesn't work
+ https://bugs.webkit.org/show_bug.cgi?id=208388
+ <rdar://problem/59820273>
+
+ Reviewed by Wenson Hsieh.
+
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView cleanupInteraction]):
+ (-[WKContentView _webTouchEventsRecognized:]):
+ (-[WKContentView _doubleTapRecognizedForDoubleClick:]):
+ (-[WKContentView _singleTapRecognized:]):
+ (-[WKContentView _attemptClickAtLocation:modifierFlags:]):
+ (-[WKContentView _mouseGestureRecognizerChanged:]):
+ In r178980, a mechanism was introduced to ensure that synthetic clicks are
+ only dispatched to the page that the user originally touched.
+
+ macCatalyst's WKMouseGestureRecognizer unintentionally entirely bypassed
+ this mechanism, never setting _layerTreeTransactionIdAtLastTouchStart,
+ because the touch event gesture recognizer is disabled. This was generally
+ fine because in this case, we don't need to send synthetic clicks,
+ instead sending proper mouse events.
+
+ However, the "Open" context menu item works by sending a synthetic click
+ at the original interaction location. Since we did not set
+ _layerTreeTransactionIdAtLastTouchStart, the Web Content process will
+ ignore the click, and perform no action.
+
+ Fix this by also setting _layerTreeTransactionIdAtLastTouchStart
+ on mouseDown.
+
+2020-03-09 Alan Coon <[email protected]>
+
Cherry-pick r256789. rdar://problem/60183772
macCatalyst: I-beam is still too aggressive in non-editable content, shows up beyond the end of text
Modified: branches/safari-609-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (258154 => 258155)
--- branches/safari-609-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2020-03-09 20:03:03 UTC (rev 258154)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2020-03-09 20:03:06 UTC (rev 258155)
@@ -305,7 +305,7 @@
BlockPtr<void(::WebEvent *, BOOL)> _keyWebEventHandler;
CGPoint _lastInteractionLocation;
- WebKit::TransactionID _layerTreeTransactionIdAtLastTouchStart;
+ WebKit::TransactionID _layerTreeTransactionIdAtLastInteractionStart;
WebKit::WKSelectionDrawingInfo _lastSelectionDrawingInfo;
Modified: branches/safari-609-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (258154 => 258155)
--- branches/safari-609-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-03-09 20:03:03 UTC (rev 258154)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-03-09 20:03:06 UTC (rev 258155)
@@ -998,7 +998,7 @@
[self removeGestureRecognizer:_touchActionDownSwipeGestureRecognizer.get()];
#endif
- _layerTreeTransactionIdAtLastTouchStart = { };
+ _layerTreeTransactionIdAtLastInteractionStart = { };
#if ENABLE(DATA_INTERACTION)
[existingLocalDragSessionContext(_dragDropInteractionState.dragSession()) cleanUpTemporaryDirectories];
@@ -1448,7 +1448,7 @@
_lastInteractionLocation = lastTouchEvent->locationInDocumentCoordinates;
if (lastTouchEvent->type == UIWebTouchEventTouchBegin) {
[self _handleDOMPasteRequestWithResult:WebCore::DOMPasteAccessResponse::DeniedForGesture];
- _layerTreeTransactionIdAtLastTouchStart = downcast<WebKit::RemoteLayerTreeDrawingAreaProxy>(*_page->drawingArea()).lastCommittedLayerTreeTransactionID();
+ _layerTreeTransactionIdAtLastInteractionStart = downcast<WebKit::RemoteLayerTreeDrawingAreaProxy>(*_page->drawingArea()).lastCommittedLayerTreeTransactionID();
#if ENABLE(TOUCH_EVENTS)
_page->resetPotentialTapSecurityOrigin();
@@ -2612,7 +2612,7 @@
- (void)_doubleTapRecognizedForDoubleClick:(UITapGestureRecognizer *)gestureRecognizer
{
- _page->handleDoubleTapForDoubleClickAtPoint(WebCore::IntPoint(gestureRecognizer.location), WebKit::webEventModifierFlags(gestureRecognizerModifierFlags(gestureRecognizer)), _layerTreeTransactionIdAtLastTouchStart);
+ _page->handleDoubleTapForDoubleClickAtPoint(WebCore::IntPoint(gestureRecognizer.location), WebKit::webEventModifierFlags(gestureRecognizerModifierFlags(gestureRecognizer)), _layerTreeTransactionIdAtLastInteractionStart);
}
- (void)_twoFingerSingleTapGestureRecognized:(UITapGestureRecognizer *)gestureRecognizer
@@ -2779,7 +2779,7 @@
m_commitPotentialTapPointerId = pointerId;
}
#endif
- _page->commitPotentialTap(WebKit::webEventModifierFlags(gestureRecognizerModifierFlags(gestureRecognizer)), _layerTreeTransactionIdAtLastTouchStart, pointerId);
+ _page->commitPotentialTap(WebKit::webEventModifierFlags(gestureRecognizerModifierFlags(gestureRecognizer)), _layerTreeTransactionIdAtLastInteractionStart, pointerId);
if (!_isExpectingFastSingleTapCommit)
[self _finishInteraction];
@@ -2820,7 +2820,7 @@
[self becomeFirstResponder];
[_inputPeripheral endEditing];
- _page->handleTap(location, WebKit::webEventModifierFlags(modifierFlags), _layerTreeTransactionIdAtLastTouchStart);
+ _page->handleTap(location, WebKit::webEventModifierFlags(modifierFlags), _layerTreeTransactionIdAtLastInteractionStart);
}
- (void)setUpTextSelectionAssistant
@@ -8012,8 +8012,12 @@
if (!_page->hasRunningProcess())
return;
- if (auto event = gestureRecognizer.lastMouseEvent)
+ if (auto event = gestureRecognizer.lastMouseEvent) {
+ if (event->type() == WebKit::WebEvent::MouseDown)
+ _layerTreeTransactionIdAtLastInteractionStart = downcast<WebKit::RemoteLayerTreeDrawingAreaProxy>(*_page->drawingArea()).lastCommittedLayerTreeTransactionID();
+
_page->handleMouseEvent(*event);
+ }
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes