Title: [220021] branches/safari-604-branch

Diff

Modified: branches/safari-604-branch/LayoutTests/ChangeLog (220020 => 220021)


--- branches/safari-604-branch/LayoutTests/ChangeLog	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/LayoutTests/ChangeLog	2017-07-28 22:19:44 UTC (rev 220021)
@@ -1,3 +1,21 @@
+2017-07-28  Jason Marcell  <jmarc...@apple.com>
+
+        Cherry-pick r219906. rdar://problem/33595387
+
+    2017-07-26  Nan Wang  <n_w...@apple.com>
+
+            AX: should dispatch accessibilityPerformPressAction async on MacOS
+            https://bugs.webkit.org/show_bug.cgi?id=174849
+
+            Reviewed by Chris Fleizach.
+
+            * accessibility/file-upload-button-with-axpress.html:
+            * accessibility/mac/html5-input-number.html:
+            * accessibility/mac/search-field-cancel-button.html:
+            * accessibility/press-target-uses-text-descendant-node.html:
+            * accessibility/press-targets-center-point.html:
+            * accessibility/press-works-on-control-types.html:
+
 2017-07-26  Jason Marcell  <jmarc...@apple.com>
 
         Cherry-pick r219877. rdar://problem/33523803

Modified: branches/safari-604-branch/LayoutTests/accessibility/file-upload-button-with-axpress.html (220020 => 220021)


--- branches/safari-604-branch/LayoutTests/accessibility/file-upload-button-with-axpress.html	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/LayoutTests/accessibility/file-upload-button-with-axpress.html	2017-07-28 22:19:44 UTC (rev 220021)
@@ -19,7 +19,9 @@
 
     inputFile.addEventListener("DOMActivate", function() { 
         debug("DOMActivate was called"); 
-        finishJSTest();
+        setTimeout(function() {
+            finishJSTest();
+        }, 10);
     });
 
     accessibilityController.accessibleElementById("filetype").press();

Modified: branches/safari-604-branch/LayoutTests/accessibility/mac/html5-input-number.html (220020 => 220021)


--- branches/safari-604-branch/LayoutTests/accessibility/mac/html5-input-number.html	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/LayoutTests/accessibility/mac/html5-input-number.html	2017-07-28 22:19:44 UTC (rev 220021)
@@ -17,9 +17,10 @@
     description("This tests that input type='number' exposes the accessibility of it's stepper correctly");
 
     if (window.accessibilityController) {
-
+        window.jsTestIsAsync = true;
+        
         document.getElementById("number").focus();
-        var textfield = accessibilityController.focusedElement;
+        var textfield = accessibilityController.accessibleElementById("number");
 
         // Verify that the click point is the same as the child.
         shouldBe("textfield.childrenCount", "1");
@@ -39,17 +40,21 @@
 
         // Increment.
         incrementor.childAtIndex(0).press();
-        shouldBe("textfield.stringValue", "'AXValue: 1'");
-
-        shouldBe("incrementor.childAtIndex(1).role", "'AXRole: AXButton'");
-        shouldBe("incrementor.childAtIndex(1).subrole", "'AXSubrole: AXDecrementArrow'");
-        shouldBeTrue("incrementor.childAtIndex(1).width > 0");
-        shouldBeTrue("incrementor.childAtIndex(1).height > 0");
-        shouldBeTrue("incrementor.childAtIndex(1).isEnabled");
-
-        // Decrement.
-        incrementor.childAtIndex(1).press();
-        shouldBe("textfield.stringValue", "'AXValue: 0'");
+        setTimeout(function() {
+            shouldBe("textfield.stringValue", "'AXValue: 1'");
+            shouldBe("incrementor.childAtIndex(1).role", "'AXRole: AXButton'");
+            shouldBe("incrementor.childAtIndex(1).subrole", "'AXSubrole: AXDecrementArrow'");
+            shouldBeTrue("incrementor.childAtIndex(1).width > 0");
+            shouldBeTrue("incrementor.childAtIndex(1).height > 0");
+            shouldBeTrue("incrementor.childAtIndex(1).isEnabled");
+            
+            // Decrement.
+            incrementor.childAtIndex(1).press();
+            setTimeout(function() {
+                shouldBe("textfield.stringValue", "'AXValue: 0'");
+                finishJSTest();
+            }, 10);
+        }, 10);
     }
 
 </script>

Modified: branches/safari-604-branch/LayoutTests/accessibility/mac/search-field-cancel-button.html (220020 => 220021)


--- branches/safari-604-branch/LayoutTests/accessibility/mac/search-field-cancel-button.html	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/LayoutTests/accessibility/mac/search-field-cancel-button.html	2017-07-28 22:19:44 UTC (rev 220021)
@@ -15,6 +15,8 @@
     description("This tests that the search field cancel button is exposed correctly.");
     
     if (window.accessibilityController) {
+        window.jsTestIsAsync = true;
+    
         var button = accessibilityController.accessibleElementById("search").childAtIndex(1);
         
         shouldBe("button.description", "'AXDescription: cancel'");
@@ -25,9 +27,11 @@
         shouldBe("document.getElementById('search').value", "'X'");
         
         button.press();
-        
-        // Search field has no value after press.
-        shouldBe("document.getElementById('search').value", "''");
+        setTimeout(function() {
+            // Search field has no value after press.
+            shouldBe("document.getElementById('search').value", "''");
+            finishJSTest();
+        }, 10);
     }
 </script>
 

Modified: branches/safari-604-branch/LayoutTests/accessibility/mac/search-predicate.html (220020 => 220021)


--- branches/safari-604-branch/LayoutTests/accessibility/mac/search-predicate.html	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/LayoutTests/accessibility/mac/search-predicate.html	2017-07-28 22:19:44 UTC (rev 220021)
@@ -61,6 +61,7 @@
     description("This tests the ability to search for accessible elements by key or text.");
     
     if (window.accessibilityController) {
+        jsTestIsAsync = true;
         window.testRunner.keepWebHistory();
         
         document.getElementById("body").focus();
@@ -277,102 +278,106 @@
         
         // Visited link.
         accessibilityController.focusedElement.childAtIndex(14).childAtIndex(0).press();
-        startElement = accessibilityController.focusedElement.childAtIndex(0);
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXVisitedLinkSearchKey", "", false);
-        shouldBe("resultElement.boolAttributeValue('AXVisited')", "true");
-        shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: link'");
+        setTimeout(function() {
+            
+            startElement = accessibilityController.focusedElement.childAtIndex(0);
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXVisitedLinkSearchKey", "", false);
+            shouldBe("resultElement.boolAttributeValue('AXVisited')", "true");
+            shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: link'");
         
-        // Previous text search.
-        startElement = accessibilityController.focusedElement.childAtIndex(10);
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, false, "", "sans-serif black bold text with underline", false);
-        shouldBe("resultElement.role", "'AXRole: AXStaticText'");
-        shouldBe("resultElement.stringValue", "'AXValue: sans-serif black bold text with underline'");
+            // Previous text search.
+            startElement = accessibilityController.focusedElement.childAtIndex(10);
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, false, "", "sans-serif black bold text with underline", false);
+            shouldBe("resultElement.role", "'AXRole: AXStaticText'");
+            shouldBe("resultElement.stringValue", "'AXValue: sans-serif black bold text with underline'");
         
-        // Execute a search for the next heading level 2 or the next link.
-        startElement = accessibilityController.focusedElement.childAtIndex(0);
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
-        shouldBe("resultElement.role", "'AXRole: AXHeading'");
-        shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: heading level 2'");
+            // Execute a search for the next heading level 2 or the next link.
+            startElement = accessibilityController.focusedElement.childAtIndex(0);
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
+            shouldBe("resultElement.role", "'AXRole: AXHeading'");
+            shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: heading level 2'");
         
-        // After finding the heading, execute the search again and we should find the link.
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
-        shouldBe("resultElement.role", "'AXRole: AXLink'");
-        shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: link'");
+            // After finding the heading, execute the search again and we should find the link.
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
+            shouldBe("resultElement.role", "'AXRole: AXLink'");
+            shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: link'");
 
-        // From the link, execute the search in reverse and we should land back on the heading.
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, false, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
-        shouldBe("resultElement.role", "'AXRole: AXHeading'");
-        shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: heading level 2'");
+            // From the link, execute the search in reverse and we should land back on the heading.
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, false, ["AXHeadingLevel2SearchKey", "AXLinkSearchKey"], "", false);
+            shouldBe("resultElement.role", "'AXRole: AXHeading'");
+            shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: heading level 2'");
                
-        // Now, we need to test isVisible. Save off the first object
-        startElement = accessibilityController.focusedElement.childAtIndex(0);
+            // Now, we need to test isVisible. Save off the first object
+            startElement = accessibilityController.focusedElement.childAtIndex(0);
         
-        // Scroll all the way to the bottom of the content
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "", "test button 3", false);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 3'");
-        resultElement.scrollToMakeVisible();
+            // Scroll all the way to the bottom of the content
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "", "test button 3", false);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 3'");
+            resultElement.scrollToMakeVisible();
         
-        // find the start of the isVisible test section
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "", "isVisible test start", false);
-        shouldBe("resultElement.role", "'AXRole: AXHeading'");
-        shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: isVisible test start'");       
+            // find the start of the isVisible test section
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "", "isVisible test start", false);
+            shouldBe("resultElement.role", "'AXRole: AXHeading'");
+            shouldBe("resultElement.childAtIndex(0).stringValue", "'AXValue: isVisible test start'");       
         
-        // save away the "isVisible test start" heading as the start element
-        startElement = resultElement;
+            // save away the "isVisible test start" heading as the start element
+            startElement = resultElement;
         
-        // If we don't care about visible only, then we should easily find 3 buttons
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 1'");
+            // If we don't care about visible only, then we should easily find 3 buttons
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 1'");
         
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", false);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 2'");
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", false);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 2'");
         
-        // save away testButton2 so we can make it visible later
-        testButton2 = resultElement;
+            // save away testButton2 so we can make it visible later
+            testButton2 = resultElement;
 
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", false);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 3'");
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", false);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 3'");
 
-        // if we care about visible only, then we should not find "test button 2"
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 1'");
+            // if we care about visible only, then we should not find "test button 2"
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 1'");
         
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 3'");
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 3'");
         
-        // now, scroll to the second button, and confirm that we don't see the first button
-        testButton2.scrollToMakeVisible();
+            // now, scroll to the second button, and confirm that we don't see the first button
+            testButton2.scrollToMakeVisible();
 
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 2'");
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 2'");
         
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 3'");
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 3'");
         
-        // Now since the page is scrolled to the bottom, the first visible button should be #2
-        startElement = accessibilityController.focusedElement.childAtIndex(0);
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: test button 2'");
+            // Now since the page is scrolled to the bottom, the first visible button should be #2
+            startElement = accessibilityController.focusedElement.childAtIndex(0);
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: test button 2'");
         
-        // lets scroll to the top of the page and ensure that the submit button is visible
-        startElement.scrollToMakeVisible();
-        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
-        shouldBe("resultElement.role", "'AXRole: AXButton'");
-        shouldBe("resultElement.title", "'AXTitle: Submit'");
+            // lets scroll to the top of the page and ensure that the submit button is visible
+            startElement.scrollToMakeVisible();
+            resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXButtonSearchKey", "", true);
+            shouldBe("resultElement.role", "'AXRole: AXButton'");
+            shouldBe("resultElement.title", "'AXTitle: Submit'");
         
-        // there should be no more visible buttons
-        resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
-        shouldBeUndefined("resultElement");
+            // there should be no more visible buttons
+            resultElement = containerElement.uiElementForSearchPredicate(resultElement, true, "AXButtonSearchKey", "", true);
+            shouldBeUndefined("resultElement");
         
+            finishJSTest();
+        }, 50);
     }
     
 </script>

Modified: branches/safari-604-branch/LayoutTests/accessibility/press-target-uses-text-descendant-node.html (220020 => 220021)


--- branches/safari-604-branch/LayoutTests/accessibility/press-target-uses-text-descendant-node.html	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/LayoutTests/accessibility/press-target-uses-text-descendant-node.html	2017-07-28 22:19:44 UTC (rev 220021)
@@ -40,9 +40,13 @@
 
     function startTest() {
        accessibilityController.accessibleElementById("link").press();
-       debug("\nNow pressing on button\n");
-       accessibilityController.accessibleElementById("button").press();
-       finishJSTest();
+       setTimeout(function() {
+           debug("\nNow pressing on button\n");
+           accessibilityController.accessibleElementById("button").press();
+           setTimeout(function() {
+               finishJSTest();
+           }, 10);
+       }, 10);
     }
 
     if (window.accessibilityController) {

Modified: branches/safari-604-branch/LayoutTests/accessibility/press-targets-center-point.html (220020 => 220021)


--- branches/safari-604-branch/LayoutTests/accessibility/press-targets-center-point.html	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/LayoutTests/accessibility/press-targets-center-point.html	2017-07-28 22:19:44 UTC (rev 220021)
@@ -50,10 +50,21 @@
     }
     
     if (window.accessibilityController) {
+        window.jsTestIsAsync = true;
+        
         // Press all targets.
-        for (var i = 0; i < targetCount; ++i)
-            accessibilityController.accessibleElementById("t" + i).press();
+        accessibilityPress(0);
     }
+    
+    function accessibilityPress(i) {
+        if (i == targetCount)
+            finishJSTest();
+        
+        accessibilityController.accessibleElementById("t" + i).press();
+        setTimeout(function() {
+            accessibilityPress(i+1);
+        }, 10);
+    }
 </script>
 
 <script src=""

Modified: branches/safari-604-branch/LayoutTests/accessibility/press-works-on-control-types.html (220020 => 220021)


--- branches/safari-604-branch/LayoutTests/accessibility/press-works-on-control-types.html	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/LayoutTests/accessibility/press-works-on-control-types.html	2017-07-28 22:19:44 UTC (rev 220021)
@@ -54,14 +54,24 @@
 
     description("This tests that when certain control type elements are pressed, a valid event is sent that references the right element.");
 
+    var items = new Array("group", "button", "tab", "radio", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "listitem", "button2");
+    var length = items.length;
+    
     if (window.accessibilityController) {
-
-        var items = new Array("group", "button", "tab", "radio", "checkbox", "menuitem", "menuitemcheckbox", "menuitemradio", "listitem", "button2");
-        for (var k = 0; k < items.length; k++) {
-           document.getElementById(items[k]).focus();
-           accessibilityController.focusedElement.press();
-        }
+        jsTestIsAsync = true;
+        // AXPress on Mac is async, let's give it some delay and do it recursively.
+        accessibilityPress(0);
     }
+    
+    function accessibilityPress(k) {
+        if (k == length)
+            finishJSTest();
+        
+        accessibilityController.accessibleElementById(items[k]).press();
+        setTimeout(function() {
+            accessibilityPress(k+1);
+        }, 10);
+    }
 
 </script>
 

Modified: branches/safari-604-branch/LayoutTests/media/media-controls-accessibility.html (220020 => 220021)


--- branches/safari-604-branch/LayoutTests/media/media-controls-accessibility.html	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/LayoutTests/media/media-controls-accessibility.html	2017-07-28 22:19:44 UTC (rev 220021)
@@ -37,10 +37,12 @@
         debug("muteButton.stringValue: " + muteButton.stringValue);
         debug("press muteButton");
         muteButton.press();
-        debug("muteButton.stringValue: " + muteButton.stringValue + "\n");
+        setTimeout(function() {
+            debug("muteButton.stringValue: " + muteButton.stringValue + "\n");
               
-        // Left/Right arrow key should have 0.5 second step on timeline. 
-        checkTimeLineValue(rightArrow);
+            // Left/Right arrow key should have 0.5 second step on timeline. 
+            checkTimeLineValue(rightArrow);
+        }, 10);
     }); 
     
     waitForEvent("seeked", function () {

Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (220020 => 220021)


--- branches/safari-604-branch/Source/WebCore/ChangeLog	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog	2017-07-28 22:19:44 UTC (rev 220021)
@@ -1,5 +1,25 @@
 2017-07-28  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r219906. rdar://problem/33595387
+
+    2017-07-26  Nan Wang  <n_w...@apple.com>
+
+            AX: should dispatch accessibilityPerformPressAction async on MacOS
+            https://bugs.webkit.org/show_bug.cgi?id=174849
+
+            Reviewed by Chris Fleizach.
+
+            If performing the accessibility press action results in a modal alert being displayed,
+            it can cause VoiceOver to hang. To fix it, we should dispatch the action asynchronously.
+
+            Updated tests to adapt to this change.
+
+            * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+            (-[WebAccessibilityObjectWrapper accessibilityPerformPressAction]):
+            (-[WebAccessibilityObjectWrapper _accessibilityPerformPressAction]):
+
+2017-07-28  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r219891. rdar://problem/33595436
 
     2017-07-25  Per Arne Vollan  <pvol...@apple.com>

Modified: branches/safari-604-branch/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (220020 => 220021)


--- branches/safari-604-branch/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2017-07-28 22:19:40 UTC (rev 220020)
+++ branches/safari-604-branch/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2017-07-28 22:19:44 UTC (rev 220021)
@@ -3415,6 +3415,15 @@
 
 - (void)accessibilityPerformPressAction
 {
+    // In case anything we do by performing the press action causes an alert or other modal
+    // behaviors, we need to return now, so that VoiceOver doesn't hang indefinitely.
+    dispatch_async(dispatch_get_main_queue(), ^ {
+        [self _accessibilityPerformPressAction];
+    });
+}
+
+- (void)_accessibilityPerformPressAction
+{
     if (![self updateObjectBackingStore])
         return;
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to