Changeset 179820 in webkit
- Timestamp:
- Feb 8, 2015, 11:09:50 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/accessibility/textarea-selected-text-range-expected.txt (modified) (1 diff)
-
LayoutTests/accessibility/textarea-selected-text-range.html (modified) (3 diffs)
-
LayoutTests/platform/mac/accessibility/select-element-selection-with-optgroups.html (modified) (2 diffs)
-
LayoutTests/platform/mac/accessibility/setting-attributes-is-asynchronous-expected.txt (added)
-
LayoutTests/platform/mac/accessibility/setting-attributes-is-asynchronous.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (modified) (1 diff)
-
Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (modified) (1 diff)
-
Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r179819 r179820 1 2015-02-08 Chris Fleizach <cfleizach@apple.com> 2 3 AX: VoiceOver appears unresponsive when JavaScript alerts are triggered via focus or blur events 4 https://bugs.webkit.org/show_bug.cgi?id=140485 5 6 Reviewed by Anders Carlsson. 7 8 Modify tests that relied on setting behavior and immediately checking results. Those 9 tests now need to retrieve results after a short timeout. 10 11 * accessibility/textarea-selected-text-range-expected.txt: 12 * accessibility/textarea-selected-text-range.html: 13 * platform/mac/accessibility/select-element-selection-with-optgroups.html: 14 * platform/mac/accessibility/setting-attributes-is-asynchronous-expected.txt: Added. 15 * platform/mac/accessibility/setting-attributes-is-asynchronous.html: Added. 16 1 17 2015-02-08 Benjamin Poulain <benjamin@webkit.org> 2 18 -
trunk/LayoutTests/accessibility/textarea-selected-text-range-expected.txt
r36772 r179820 1 (4,0) = {4, 0} 1 PASS textArea.selectedTextRange is '{4, 0}' 2 PASS textArea.selectedTextRange is '{8, 2}' 3 PASS textArea.selectedTextRange is '{25, 0}' 4 PASS successfullyParsed is true 2 5 3 (8,2) = {8, 2} 6 TEST COMPLETE 4 7 5 (100,0) = {25, 0}6 7 -
trunk/LayoutTests/accessibility/textarea-selected-text-range.html
r120111 r179820 1 1 <html> 2 <script> 3 if (window.testRunner) 4 testRunner.dumpAsText(); 5 </script> 2 <script src="../resources/js-test-pre.js"></script> 6 3 <body> 7 4 … … 16 13 <script> 17 14 if (window.accessibilityController) { 18 var result = document.getElementById("result"); 19 15 window.jsTestIsAsync = true; 20 16 var area1 = document.getElementById("area1"); 21 17 area1.focus(); … … 24 20 25 21 textArea.setSelectedTextRange(4,0); 26 result.innerText += "(4,0) = " + textArea.selectedTextRange + "\n\n";27 22 28 textArea.setSelectedTextRange(8,2); 29 result.innerText += "(8,2) = " + textArea.selectedTextRange + "\n\n"; 30 31 textArea.setSelectedTextRange(100,0); 32 result.innerText += "(100,0) = " + textArea.selectedTextRange + "\n\n"; 23 // After setting a property through accessibility, the value won't be updated immediately, so we 24 // must check after a timeout to re-verify the value. 25 setTimeout(function() { 26 shouldBe("textArea.selectedTextRange", "'{4, 0}'"); 27 textArea.setSelectedTextRange(8,2); 28 setTimeout(function() { 29 shouldBe("textArea.selectedTextRange", "'{8, 2}'"); 30 textArea.setSelectedTextRange(100,0); 31 setTimeout(function() { 32 shouldBe("textArea.selectedTextRange", "'{25, 0}'"); 33 finishJSTest(); 34 }, 1); 35 }, 1); 36 }, 1); 33 37 34 38 } 35 39 </script> 40 <script src="../resources/js-test-post.js"></script> 36 41 </body> 37 42 </html> -
trunk/LayoutTests/platform/mac/accessibility/select-element-selection-with-optgroups.html
r155282 r179820 27 27 28 28 if (window.accessibilityController) { 29 window.jsTestIsAsync = true; 29 30 30 31 document.getElementById("suite").focus(); … … 37 38 var option3 = selectElement.childAtIndex(4); 38 39 40 // Selection operations happen after a delay so they don't hang. Check the result on a timeout. 39 41 selectElement.setSelectedChild(option1); 40 shouldBe("selectElement.selectedChildrenCount", "1"); 41 shouldBeTrue("selectElement.selectedChildAtIndex(0).isEqual(option1)"); 42 setTimeout(function() { 43 shouldBe("selectElement.selectedChildrenCount", "1"); 44 shouldBeTrue("selectElement.selectedChildAtIndex(0).isEqual(option1)"); 42 45 43 selectElement.setSelectedChild(option2); 44 shouldBe("selectElement.selectedChildrenCount", "1"); 45 shouldBeTrue("selectElement.selectedChildAtIndex(0).isEqual(option2)"); 46 selectElement.setSelectedChild(option2); 47 setTimeout(function() { 48 shouldBe("selectElement.selectedChildrenCount", "1"); 49 shouldBeTrue("selectElement.selectedChildAtIndex(0).isEqual(option2)"); 46 50 47 selectElement.setSelectedChild(option3); 48 shouldBe("selectElement.selectedChildrenCount", "1"); 49 shouldBeTrue("selectElement.selectedChildAtIndex(0).isEqual(option3)"); 51 selectElement.setSelectedChild(option3); 52 setTimeout(function() { 53 shouldBe("selectElement.selectedChildrenCount", "1"); 54 shouldBeTrue("selectElement.selectedChildAtIndex(0).isEqual(option3)"); 55 finishJSTest(); 56 }, 1); 57 }, 1); 58 }, 1); 59 50 60 } 51 61 -
trunk/Source/WebCore/ChangeLog
r179819 r179820 1 2015-02-08 Chris Fleizach <cfleizach@apple.com> 2 3 AX: VoiceOver appears unresponsive when JavaScript alerts are triggered via focus or blur events 4 https://bugs.webkit.org/show_bug.cgi?id=140485 5 6 Reviewed by Anders Carlsson. 7 8 If setting an accessibility attribute results in a modal alert being displayed, it can cause VoiceOver 9 to hang. A simple solution is perform the actual work after a short delay, which will ensure the call 10 returns without hanging. 11 12 Test: platform/mac/accessibility/setting-attributes-is-asynchronous.html 13 14 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 15 (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]): 16 (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]): 17 1 18 2015-02-08 Benjamin Poulain <benjamin@webkit.org> 2 19 -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r179450 r179820 3247 3247 - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attributeName 3248 3248 { 3249 // In case anything we do by changing values causes an alert or other modal 3250 // behaviors, we need to return now, so that VoiceOver doesn't hang indefinitely. 3251 dispatch_async(dispatch_get_main_queue(), ^{ 3252 [self _accessibilitySetValue:value forAttribute:attributeName]; 3253 }); 3254 } 3255 3256 - (void)_accessibilitySetValue:(id)value forAttribute:(NSString*)attributeName 3257 { 3249 3258 if (![self updateObjectBackingStore]) 3250 3259 return; -
trunk/Tools/ChangeLog
r179810 r179820 1 2015-02-08 Chris Fleizach <cfleizach@apple.com> 2 3 AX: VoiceOver appears unresponsive when JavaScript alerts are triggered via focus or blur events 4 https://bugs.webkit.org/show_bug.cgi?id=140485 5 6 Reviewed by Anders Carlsson. 7 8 Implement takeFocus() as a way to set focus through accessibility wrappers. 9 10 * DumpRenderTree/mac/AccessibilityUIElementMac.mm: 11 (AccessibilityUIElement::takeFocus): 12 * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: 13 (WTR::AccessibilityUIElement::takeFocus): 14 1 15 2015-02-08 Darin Adler <darin@apple.com> 2 16 -
trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
r179450 r179820 1518 1518 void AccessibilityUIElement::takeFocus() 1519 1519 { 1520 // FIXME: implement 1520 BEGIN_AX_OBJC_EXCEPTIONS 1521 [m_element accessibilitySetValue:@YES forAttribute:NSAccessibilityFocusedAttribute]; 1522 END_AX_OBJC_EXCEPTIONS 1521 1523 } 1522 1524 -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
r169483 r179820 169 169 170 170 void scrollToMakeVisible(); 171 void takeFocus(); 171 172 172 173 // Text markers. -
trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
r179450 r179820 1533 1533 void AccessibilityUIElement::takeFocus() 1534 1534 { 1535 // FIXME: implement 1535 BEGIN_AX_OBJC_EXCEPTIONS 1536 [m_element accessibilitySetValue:@YES forAttribute:NSAccessibilityFocusedAttribute]; 1537 END_AX_OBJC_EXCEPTIONS 1536 1538 } 1537 1539
Note:
See TracChangeset
for help on using the changeset viewer.