Title: [188349] trunk/Source/WebKit2
Revision
188349
Author
[email protected]
Date
2015-08-12 12:29:29 -0700 (Wed, 12 Aug 2015)

Log Message

Element interaction should not be canceled when the menu is already being shown.
https://bugs.webkit.org/show_bug.cgi?id=147945
rdar://problem/22206433

Reviewed by Beth Dakin.

When preview is canceled by the action menu gesture, we should not stop interacting
with the element, since the information about the element is used for the menu actions.
We now expose a new method in the action sheet assistant to know if the action sheed is
being shown and we use this as an indication that we should not stop the interaction
with the element.

* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant isShowingSheet]): Added.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionStoppedFromPreviewItemController:]): Do not stop
the interaction if the sheet is being shown.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (188348 => 188349)


--- trunk/Source/WebKit2/ChangeLog	2015-08-12 19:23:03 UTC (rev 188348)
+++ trunk/Source/WebKit2/ChangeLog	2015-08-12 19:29:29 UTC (rev 188349)
@@ -1,3 +1,24 @@
+2015-08-12  Enrica Casucci  <[email protected]>
+
+        Element interaction should not be canceled when the menu is already being shown.
+        https://bugs.webkit.org/show_bug.cgi?id=147945
+        rdar://problem/22206433
+
+        Reviewed by Beth Dakin.
+
+        When preview is canceled by the action menu gesture, we should not stop interacting
+        with the element, since the information about the element is used for the menu actions.
+        We now expose a new method in the action sheet assistant to know if the action sheed is
+        being shown and we use this as an indication that we should not stop the interaction
+        with the element.
+
+        * UIProcess/ios/WKActionSheetAssistant.h:
+        * UIProcess/ios/WKActionSheetAssistant.mm:
+        (-[WKActionSheetAssistant isShowingSheet]): Added.
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _interactionStoppedFromPreviewItemController:]): Do not stop
+        the interaction if the sheet is being shown.
+
 2015-08-12  Matt Rajca  <[email protected]>
 
         Fixed the Release build when MEDIA_SESSION is enabled.

Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h (188348 => 188349)


--- trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h	2015-08-12 19:23:03 UTC (rev 188348)
+++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.h	2015-08-12 19:29:29 UTC (rev 188349)
@@ -67,6 +67,7 @@
 - (void)updateSheetPosition;
 - (RetainPtr<NSArray>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo;
 - (RetainPtr<NSArray>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo;
+- (BOOL)isShowingSheet;
 @end
 
 #endif // PLATFORM(IOS)

Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm (188348 => 188349)


--- trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm	2015-08-12 19:23:03 UTC (rev 188348)
+++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm	2015-08-12 19:29:29 UTC (rev 188349)
@@ -204,6 +204,11 @@
     [_interactionSheet updateSheetPosition];
 }
 
+- (BOOL)isShowingSheet
+{
+    return _interactionSheet != nil;
+}
+
 - (void)_createSheetWithElementActions:(NSArray *)actions showLinkTitle:(BOOL)showLinkTitle
 {
     auto delegate = _delegate.get();

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (188348 => 188349)


--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2015-08-12 19:23:03 UTC (rev 188348)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2015-08-12 19:29:29 UTC (rev 188349)
@@ -3382,7 +3382,8 @@
 {
     [self _addDefaultGestureRecognizers];
 
-    _page->stopInteraction();
+    if (![_actionSheetAssistant isShowingSheet])
+        _page->stopInteraction();
 }
 
 - (void)_previewItemController:(UIPreviewItemController *)controller didDismissPreview:(UIViewController *)viewController committing:(BOOL)committing
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to