Make sure early cancellation of immediate action actually does that in WK1
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jan 2015 22:51:30 +0000 (22:51 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jan 2015 22:51:30 +0000 (22:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140566
-and corresponding-
rdar://problem/19490114

Reviewed by Tim Horton.

Work around an AppKit bug by dispatching the call to _cancelImmediateAction
asynchronously.
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController immediateActionRecognizerWillPrepare:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178605 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebImmediateActionController.mm

index 2dd14cd..59ffe46 100644 (file)
@@ -1,3 +1,17 @@
+2015-01-16  Beth Dakin  <bdakin@apple.com>
+
+        Make sure early cancellation of immediate action actually does that in WK1
+        https://bugs.webkit.org/show_bug.cgi?id=140566
+        -and corresponding-
+        rdar://problem/19490114
+
+        Reviewed by Tim Horton.
+
+        Work around an AppKit bug by dispatching the call to _cancelImmediateAction 
+        asynchronously.
+        * WebView/WebImmediateActionController.mm:
+        (-[WebImmediateActionController immediateActionRecognizerWillPrepare:]):
+
 2015-01-16  Daniel Bates  <dabates@apple.com>
 
         Fix the public iOS SDK build after <http://trac.webkit.org/changeset/178285>
index 6d75a9c..f770768 100644 (file)
@@ -133,8 +133,12 @@ using namespace WebCore;
     [self performHitTestAtPoint:locationInDocumentView];
     [self _updateImmediateActionItem];
 
-    if (!_immediateActionRecognizer.animationController)
-        [self _cancelImmediateAction];
+    if (!_immediateActionRecognizer.animationController) {
+        // FIXME: We should be able to remove the dispatch_async when rdar://problem/19502927 is resolved.
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [self _cancelImmediateAction];
+        });
+    }
 }
 
 - (void)immediateActionRecognizerWillBeginAnimation:(NSImmediateActionGestureRecognizer *)immediateActionRecognizer