Changeset 247019 in webkit
- Timestamp:
- Jul 1, 2019 2:07:31 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r247018 r247019 1 2019-07-01 Truitt Savell <tsavell@apple.com> 2 3 Unreviewed, rolling out r246958. 4 5 Broke inspector/dom/getAccessibilityPropertiesForNode.html 6 7 Reverted changeset: 8 9 "Enhance support of aria-haspopup per ARIA 1.1 specification." 10 https://bugs.webkit.org/show_bug.cgi?id=199216 11 https://trac.webkit.org/changeset/246958 12 1 13 2019-07-01 Eric Carlson <eric.carlson@apple.com> 2 14 -
trunk/LayoutTests/accessibility/button-with-aria-haspopup-role-expected.txt
r246958 r247019 4 4 5 5 6 test1 AXRole: AXButton for aria-haspopup = (null) 7 AX popupValue = 'false' 8 test2 AXRole: AXPopUpButton for aria-haspopup = 'true' 9 AX popupValue = 'menu' 10 test3 AXRole: AXButton for aria-haspopup = 'false' 11 AX popupValue = 'false' 12 test4 AXRole: AXPopUpButton for aria-haspopup = 'dialog' 13 AX popupValue = 'dialog' 14 test5 AXRole: AXPopUpButton for aria-haspopup = 'grid' 15 AX popupValue = 'grid' 16 test6 AXRole: AXPopUpButton for aria-haspopup = 'listbox' 17 AX popupValue = 'listbox' 18 test7 AXRole: AXPopUpButton for aria-haspopup = 'menu' 19 AX popupValue = 'menu' 20 test8 AXRole: AXPopUpButton for aria-haspopup = 'tree' 21 AX popupValue = 'tree' 22 test9 AXRole: AXButton for aria-haspopup = 'foo' 23 AX popupValue = 'false' 24 test10 AXRole: AXButton for aria-haspopup = '' 25 AX popupValue = 'false' 6 test1 AXRole: AXButton for aria-haspopup=(null) 7 test2 AXRole: AXPopUpButton for aria-haspopup='true' 8 test3 AXRole: AXButton for aria-haspopup='false' 9 test4 AXRole: AXPopUpButton for aria-haspopup='dialog' 10 test5 AXRole: AXPopUpButton for aria-haspopup='grid' 11 test6 AXRole: AXPopUpButton for aria-haspopup='listbox' 12 test7 AXRole: AXPopUpButton for aria-haspopup='menu' 13 test8 AXRole: AXPopUpButton for aria-haspopup='tree' 14 test9 AXRole: AXButton for aria-haspopup='foo' 15 test10 AXRole: AXButton for aria-haspopup='' 26 16 PASS successfullyParsed is true 27 17 -
trunk/LayoutTests/accessibility/button-with-aria-haspopup-role.html
r246958 r247019 23 23 if (window.accessibilityController) { 24 24 for (var i = 1; i <= 10; i++) { 25 25 var element = document.getElementById("test" + i) 26 26 var popup = element.hasAttribute("aria-haspopup") ? "'" + element.getAttribute("aria-haspopup") + "'" : "(null)"; 27 27 var axElement = accessibilityController.accessibleElementById("test" + i); 28 debug("test" + i + " " + axElement.role + " for aria-haspopup = " + popup) 29 // Check that accessibilityHasPopupValue returns the right value in each case. 30 debug("AX popupValue = " + "'" + axElement.popupValue + "'"); 28 debug("test" + i + " " + axElement.role + " for aria-haspopup=" + popup) 31 29 } 32 30 -
trunk/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role-expected.txt
r246958 r247019 5 5 6 6 PASS element.hasAttribute('aria-haspopup') is true 7 AX popupValue = 'menu'8 7 test1 has trait haspopup = true with aria-haspopup attribute = dialog 9 AX popupValue = 'dialog'10 8 test2 has trait haspopup = true with aria-haspopup attribute = grid 11 AX popupValue = 'grid'12 9 test3 has trait haspopup = true with aria-haspopup attribute = listbox 13 AX popupValue = 'listbox'14 10 test4 has trait haspopup = true with aria-haspopup attribute = menu 15 AX popupValue = 'menu'16 11 test5 has trait haspopup = true with aria-haspopup attribute = tree 17 AX popupValue = 'tree'18 12 test6 has trait haspopup = false with aria-haspopup attribute = null 19 AX popupValue = 'false'20 13 test7 has trait haspopup = false with aria-haspopup attribute = false 21 AX popupValue = 'false'22 14 test8 has trait haspopup = false with aria-haspopup attribute = foo 23 AX popupValue = 'false'24 15 test9 has trait haspopup = false with aria-haspopup attribute = 25 AX popupValue = 'false'26 16 PASS successfullyParsed is true 27 17 -
trunk/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role.html
r246958 r247019 22 22 description("This tests the platform attributes exposed for buttons with aria-haspopup"); 23 23 if (window.accessibilityController) { 24 // Get the document and accessibility elements for test0 to be used as reference to check traits against.24 // Get the document and accessibility elements for test0 to be used as reference. 25 25 var element = document.getElementById("test0"); 26 26 shouldBe("element.hasAttribute('aria-haspopup')", "true"); 27 27 var axElement = accessibilityController.accessibleElementById("test0"); 28 28 var haspopupTraits = axElement.traits; 29 // Check that accessibilityHasPopupValue returns the right value in each case.30 debug("AX popupValue = " + "'" + axElement.popupValue + "'");31 29 32 30 for (var i = 1; i <= 9; i++) { … … 36 34 var sameTraits = axElement.traits == haspopupTraits; 37 35 debug("test" + i + " has trait haspopup = " + sameTraits + " with aria-haspopup attribute = " + popup); 38 // Check that accessibilityHasPopupValue returns the right value in each case.39 debug("AX popupValue = " + "'" + axElement.popupValue + "'");40 36 } 41 37 -
trunk/Source/WebCore/ChangeLog
r247017 r247019 1 2019-07-01 Truitt Savell <tsavell@apple.com> 2 3 Unreviewed, rolling out r246958. 4 5 Broke inspector/dom/getAccessibilityPropertiesForNode.html 6 7 Reverted changeset: 8 9 "Enhance support of aria-haspopup per ARIA 1.1 specification." 10 https://bugs.webkit.org/show_bug.cgi?id=199216 11 https://trac.webkit.org/changeset/246958 12 1 13 2019-07-01 Brady Eidson <beidson@apple.com> 2 14 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r246958 r247019 2759 2759 } 2760 2760 2761 String AccessibilityObject::popupValue() const 2762 { 2763 static const NeverDestroyed<HashSet<String>> allowedPopupValues(std::initializer_list<String> { 2764 "menu", "listbox", "tree", "grid", "dialog" 2765 }); 2766 2767 auto hasPopup = getAttribute(aria_haspopupAttr).convertToASCIILowercase(); 2768 if (hasPopup.isNull()) 2769 return "false"; 2770 2771 if (allowedPopupValues->contains(hasPopup)) 2761 String AccessibilityObject::hasPopupValue() const 2762 { 2763 const AtomString& hasPopup = getAttribute(aria_haspopupAttr); 2764 if (equalLettersIgnoringASCIICase(hasPopup, "true") 2765 || equalLettersIgnoringASCIICase(hasPopup, "dialog") 2766 || equalLettersIgnoringASCIICase(hasPopup, "grid") 2767 || equalLettersIgnoringASCIICase(hasPopup, "listbox") 2768 || equalLettersIgnoringASCIICase(hasPopup, "menu") 2769 || equalLettersIgnoringASCIICase(hasPopup, "tree")) 2772 2770 return hasPopup; 2773 2774 // aria-haspopup specification states that true must be treated as menu.2775 if (hasPopup == "true")2776 return "menu";2777 2771 2778 2772 // In ARIA 1.1, the implicit value for combobox became "listbox." -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r246958 r247019 553 553 554 554 virtual bool hasPopup() const { return false; } 555 String popupValue() const;555 String hasPopupValue() const; 556 556 bool supportsHasPopup() const; 557 557 bool pressedIsPresent() const; -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r246958 r247019 1035 1035 // Return true if this has the aria-haspopup attribute, or if it has an ancestor of type link with the aria-haspopup attribute. 1036 1036 return AccessibilityObject::matchedParent(*this, true, [this] (const AccessibilityObject& object) { 1037 return (this == &object) ? !equalLettersIgnoringASCIICase(object. popupValue(), "false")1038 : object.isLink() && !equalLettersIgnoringASCIICase(object. popupValue(), "false");1037 return (this == &object) ? !equalLettersIgnoringASCIICase(object.hasPopupValue(), "false") 1038 : object.isLink() && !equalLettersIgnoringASCIICase(object.hasPopupValue(), "false"); 1039 1039 }); 1040 1040 } -
trunk/Source/WebCore/accessibility/atk/WebKitAccessible.cpp
r246958 r247019 468 468 469 469 if (coreObject->supportsHasPopup()) 470 attributeSet = addToAtkAttributeSet(attributeSet, "haspopup", coreObject-> popupValue().utf8().data());470 attributeSet = addToAtkAttributeSet(attributeSet, "haspopup", coreObject->hasPopupValue().utf8().data()); 471 471 472 472 if (coreObject->supportsCurrent()) -
trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
r246958 r247019 502 502 503 503 return m_object->hasPopup(); 504 }505 506 - (NSString *)accessibilityPopupValue507 {508 if (![self _prepareAccessibilityCall])509 return nil;510 511 return m_object->popupValue();512 504 } 513 505 -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r246958 r247019 236 236 #ifndef NSAccessibilityHasPopupAttribute 237 237 #define NSAccessibilityHasPopupAttribute @"AXHasPopup" 238 #endif239 240 #ifndef NSAccessibilityPopupValueAttribute241 #define NSAccessibilityPopupValueAttribute @"AXPopupValue"242 238 #endif 243 239 … … 3384 3380 if ([attributeName isEqualToString:@"AXAutocompleteValue"]) 3385 3381 return m_object->autoCompleteValue(); 3386 3387 if ([attributeName isEqualToString: NSAccessibilityPopupValueAttribute])3388 return m_object-> popupValue();3389 3382 3383 if ([attributeName isEqualToString:@"AXHasPopUpValue"]) 3384 return m_object->hasPopupValue(); 3385 3390 3386 if ([attributeName isEqualToString:@"AXKeyShortcutsValue"]) 3391 3387 return m_object->keyShortcutsValue(); -
trunk/Tools/ChangeLog
r246965 r247019 1 2019-07-01 Truitt Savell <tsavell@apple.com> 2 3 Unreviewed, rolling out r246958. 4 5 Broke inspector/dom/getAccessibilityPropertiesForNode.html 6 7 Reverted changeset: 8 9 "Enhance support of aria-haspopup per ARIA 1.1 specification." 10 https://bugs.webkit.org/show_bug.cgi?id=199216 11 https://trac.webkit.org/changeset/246958 12 1 13 2019-07-01 Philippe Normand <pnormand@igalia.com> 2 14 -
trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp
r246958 r247019 1402 1402 { 1403 1403 return JSValueMakeBoolean(context, toAXElement(thisObject)->hasPopup()); 1404 }1405 1406 static JSValueRef getPopupValueCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)1407 {1408 return JSValueMakeString(context, toAXElement(thisObject)->popupValue().get());1409 1404 } 1410 1405 … … 1869 1864 { "isCollapsed", getIsCollapsedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1870 1865 { "hasPopup", getHasPopupCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1871 { "popupValue", getPopupValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },1872 1866 { "valueDescription", getValueDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1873 1867 { "hierarchicalLevel", hierarchicalLevelCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/AccessibilityUIElement.h
r246958 r247019 165 165 bool isIndeterminate() const; 166 166 bool hasPopup() const; 167 JSRetainPtr<JSStringRef> popupValue() const;168 167 int hierarchicalLevel() const; 169 168 double clickPointX(); -
trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
r246958 r247019 104 104 - (BOOL)_accessibilityIsStrongPasswordField; 105 105 - (NSString *)accessibilityTextualContext; 106 - (BOOL)accessibilityHasPopup;107 - (NSString *)accessibilityPopupValue;108 106 109 107 // TextMarker related … … 1139 1137 bool AccessibilityUIElement::hasPopup() const 1140 1138 { 1141 return [m_element accessibilityHasPopup]; 1142 } 1143 1144 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const 1145 { 1146 return [[m_element accessibilityPopupValue] createJSStringRef]; 1139 // FIXME: implement 1140 return false; 1147 1141 } 1148 1142 -
trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
r246958 r247019 1627 1627 } 1628 1628 1629 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const1630 {1631 BEGIN_AX_OBJC_EXCEPTIONS1632 id value = [m_element accessibilityAttributeValue:@"AXPopupValue"];1633 if ([value isKindOfClass:[NSString class]])1634 return [value createJSStringRef];1635 END_AX_OBJC_EXCEPTIONS1636 1637 return [@"false" createJSStringRef];1638 }1639 1640 1629 void AccessibilityUIElement::takeFocus() 1641 1630 { -
trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
r246958 r247019 908 908 } 909 909 910 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const911 {912 return createEmptyJSString();913 }914 915 910 void AccessibilityUIElement::takeFocus() 916 911 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
r246958 r247019 171 171 bool isMultiLine() const; 172 172 bool hasPopup() const; 173 JSRetainPtr<JSStringRef> popupValue() const;174 173 int hierarchicalLevel() const; 175 174 double clickPointX(); -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
r246958 r247019 92 92 readonly attribute boolean isCollapsed; 93 93 readonly attribute boolean hasPopup; 94 readonly attribute DOMString popupValue;95 94 readonly attribute boolean isIgnored; 96 95 readonly attribute boolean isSingleLine; -
trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm
r246958 r247019 88 88 - (NSString *)accessibilityRoleDescription; 89 89 - (BOOL)accessibilityHasPopup; 90 - (NSString *)accessibilityPopupValue;91 90 - (NSString *)accessibilityColorStringValue; 92 91 … … 1058 1057 { 1059 1058 return [m_element accessibilityHasPopup]; 1060 }1061 1062 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const1063 {1064 return [[m_element accessibilityPopupValue] createJSStringRef];1065 1059 } 1066 1060 -
trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
r246958 r247019 1709 1709 } 1710 1710 1711 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const1712 {1713 BEGIN_AX_OBJC_EXCEPTIONS1714 id value = [m_element accessibilityAttributeValue:@"AXPopupValue"];1715 if ([value isKindOfClass:[NSString class]])1716 return [value createJSStringRef];1717 END_AX_OBJC_EXCEPTIONS1718 1719 return [@"false" createJSStringRef];1720 }1721 1722 1711 void AccessibilityUIElement::takeFocus() 1723 1712 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp
r246958 r247019 759 759 } 760 760 761 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const762 {763 notImplemented();764 return nullptr;765 }766 767 761 void AccessibilityUIElement::takeFocus() 768 762 {
Note: See TracChangeset
for help on using the changeset viewer.