Changeset 247019 in webkit


Ignore:
Timestamp:
Jul 1, 2019 2:07:31 PM (5 years ago)
Author:
Truitt Savell
Message:

Unreviewed, rolling out r246958.

Broke inspector/dom/getAccessibilityPropertiesForNode.html

Reverted changeset:

"Enhance support of aria-haspopup per ARIA 1.1 specification."
https://bugs.webkit.org/show_bug.cgi?id=199216
https://trac.webkit.org/changeset/246958

Location:
trunk
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r247018 r247019  
     12019-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
    1132019-07-01  Eric Carlson  <eric.carlson@apple.com>
    214
  • trunk/LayoutTests/accessibility/button-with-aria-haspopup-role-expected.txt

    r246958 r247019  
    44
    55
    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'
     6test1 AXRole: AXButton for aria-haspopup=(null)
     7test2 AXRole: AXPopUpButton for aria-haspopup='true'
     8test3 AXRole: AXButton for aria-haspopup='false'
     9test4 AXRole: AXPopUpButton for aria-haspopup='dialog'
     10test5 AXRole: AXPopUpButton for aria-haspopup='grid'
     11test6 AXRole: AXPopUpButton for aria-haspopup='listbox'
     12test7 AXRole: AXPopUpButton for aria-haspopup='menu'
     13test8 AXRole: AXPopUpButton for aria-haspopup='tree'
     14test9 AXRole: AXButton for aria-haspopup='foo'
     15test10 AXRole: AXButton for aria-haspopup=''
    2616PASS successfullyParsed is true
    2717
  • trunk/LayoutTests/accessibility/button-with-aria-haspopup-role.html

    r246958 r247019  
    2323    if (window.accessibilityController) {
    2424        for (var i = 1; i <= 10; i++) {
    25             var element = document.getElementById("test" + i)
     25            var element = document.getElementById("test" + i)
    2626            var popup = element.hasAttribute("aria-haspopup") ? "'" + element.getAttribute("aria-haspopup") + "'" : "(null)";
    2727            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)
    3129        }
    3230
  • trunk/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role-expected.txt

    r246958 r247019  
    55
    66PASS element.hasAttribute('aria-haspopup') is true
    7 AX popupValue = 'menu'
    87test1 has trait haspopup = true with aria-haspopup attribute = dialog
    9 AX popupValue = 'dialog'
    108test2 has trait haspopup = true with aria-haspopup attribute = grid
    11 AX popupValue = 'grid'
    129test3 has trait haspopup = true with aria-haspopup attribute = listbox
    13 AX popupValue = 'listbox'
    1410test4 has trait haspopup = true with aria-haspopup attribute = menu
    15 AX popupValue = 'menu'
    1611test5 has trait haspopup = true with aria-haspopup attribute = tree
    17 AX popupValue = 'tree'
    1812test6 has trait haspopup = false with aria-haspopup attribute = null
    19 AX popupValue = 'false'
    2013test7 has trait haspopup = false with aria-haspopup attribute = false
    21 AX popupValue = 'false'
    2214test8 has trait haspopup = false with aria-haspopup attribute = foo
    23 AX popupValue = 'false'
    2415test9 has trait haspopup = false with aria-haspopup attribute =
    25 AX popupValue = 'false'
    2616PASS successfullyParsed is true
    2717
  • trunk/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role.html

    r246958 r247019  
    2222    description("This tests the platform attributes exposed for buttons with aria-haspopup");
    2323    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.
    2525        var element = document.getElementById("test0");
    2626        shouldBe("element.hasAttribute('aria-haspopup')", "true");
    2727        var axElement = accessibilityController.accessibleElementById("test0");
    2828        var haspopupTraits = axElement.traits;
    29         // Check that accessibilityHasPopupValue returns the right value in each case.
    30         debug("AX popupValue = " + "'" + axElement.popupValue + "'");
    3129
    3230        for (var i = 1; i <= 9; i++) {
     
    3634            var sameTraits = axElement.traits == haspopupTraits;
    3735            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 + "'");
    4036        }
    4137
  • trunk/Source/WebCore/ChangeLog

    r247017 r247019  
     12019-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
    1132019-07-01  Brady Eidson  <beidson@apple.com>
    214
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r246958 r247019  
    27592759}
    27602760
    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))
     2761String 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"))
    27722770        return hasPopup;
    2773 
    2774     // aria-haspopup specification states that true must be treated as menu.
    2775     if (hasPopup == "true")
    2776         return "menu";
    27772771
    27782772    // In ARIA 1.1, the implicit value for combobox became "listbox."
  • trunk/Source/WebCore/accessibility/AccessibilityObject.h

    r246958 r247019  
    553553
    554554    virtual bool hasPopup() const { return false; }
    555     String popupValue() const;
     555    String hasPopupValue() const;
    556556    bool supportsHasPopup() const;
    557557    bool pressedIsPresent() const;
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r246958 r247019  
    10351035    // Return true if this has the aria-haspopup attribute, or if it has an ancestor of type link with the aria-haspopup attribute.
    10361036    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");
    10391039    });
    10401040}
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessible.cpp

    r246958 r247019  
    468468
    469469    if (coreObject->supportsHasPopup())
    470         attributeSet = addToAtkAttributeSet(attributeSet, "haspopup", coreObject->popupValue().utf8().data());
     470        attributeSet = addToAtkAttributeSet(attributeSet, "haspopup", coreObject->hasPopupValue().utf8().data());
    471471
    472472    if (coreObject->supportsCurrent())
  • trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

    r246958 r247019  
    502502   
    503503    return m_object->hasPopup();
    504 }
    505 
    506 - (NSString *)accessibilityPopupValue
    507 {
    508     if (![self _prepareAccessibilityCall])
    509         return nil;
    510 
    511     return m_object->popupValue();
    512504}
    513505
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r246958 r247019  
    236236#ifndef NSAccessibilityHasPopupAttribute
    237237#define NSAccessibilityHasPopupAttribute @"AXHasPopup"
    238 #endif
    239 
    240 #ifndef NSAccessibilityPopupValueAttribute
    241 #define NSAccessibilityPopupValueAttribute @"AXPopupValue"
    242238#endif
    243239
     
    33843380    if ([attributeName isEqualToString:@"AXAutocompleteValue"])
    33853381        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   
    33903386    if ([attributeName isEqualToString:@"AXKeyShortcutsValue"])
    33913387        return m_object->keyShortcutsValue();
  • trunk/Tools/ChangeLog

    r246965 r247019  
     12019-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
    1132019-07-01  Philippe Normand  <pnormand@igalia.com>
    214
  • trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp

    r246958 r247019  
    14021402{
    14031403    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());
    14091404}
    14101405
     
    18691864        { "isCollapsed", getIsCollapsedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    18701865        { "hasPopup", getHasPopupCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    1871         { "popupValue", getPopupValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    18721866        { "valueDescription", getValueDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    18731867        { "hierarchicalLevel", hierarchicalLevelCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
  • trunk/Tools/DumpRenderTree/AccessibilityUIElement.h

    r246958 r247019  
    165165    bool isIndeterminate() const;
    166166    bool hasPopup() const;
    167     JSRetainPtr<JSStringRef> popupValue() const;
    168167    int hierarchicalLevel() const;
    169168    double clickPointX();
  • trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm

    r246958 r247019  
    104104- (BOOL)_accessibilityIsStrongPasswordField;
    105105- (NSString *)accessibilityTextualContext;
    106 - (BOOL)accessibilityHasPopup;
    107 - (NSString *)accessibilityPopupValue;
    108106
    109107// TextMarker related
     
    11391137bool AccessibilityUIElement::hasPopup() const
    11401138{
    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;
    11471141}
    11481142
  • trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm

    r246958 r247019  
    16271627}
    16281628
    1629 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const
    1630 {
    1631     BEGIN_AX_OBJC_EXCEPTIONS
    1632     id value = [m_element accessibilityAttributeValue:@"AXPopupValue"];
    1633     if ([value isKindOfClass:[NSString class]])
    1634         return [value createJSStringRef];
    1635     END_AX_OBJC_EXCEPTIONS
    1636 
    1637     return [@"false" createJSStringRef];
    1638 }
    1639 
    16401629void AccessibilityUIElement::takeFocus()
    16411630{
  • trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp

    r246958 r247019  
    908908}
    909909
    910 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const
    911 {
    912     return createEmptyJSString();
    913 }
    914 
    915910void AccessibilityUIElement::takeFocus()
    916911{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h

    r246958 r247019  
    171171    bool isMultiLine() const;
    172172    bool hasPopup() const;
    173     JSRetainPtr<JSStringRef> popupValue() const;
    174173    int hierarchicalLevel() const;
    175174    double clickPointX();
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl

    r246958 r247019  
    9292    readonly attribute boolean isCollapsed;
    9393    readonly attribute boolean hasPopup;
    94     readonly attribute DOMString popupValue;
    9594    readonly attribute boolean isIgnored;
    9695    readonly attribute boolean isSingleLine;
  • trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm

    r246958 r247019  
    8888- (NSString *)accessibilityRoleDescription;
    8989- (BOOL)accessibilityHasPopup;
    90 - (NSString *)accessibilityPopupValue;
    9190- (NSString *)accessibilityColorStringValue;
    9291
     
    10581057{
    10591058    return [m_element accessibilityHasPopup];
    1060 }
    1061 
    1062 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const
    1063 {
    1064     return [[m_element accessibilityPopupValue] createJSStringRef];
    10651059}
    10661060
  • trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

    r246958 r247019  
    17091709}
    17101710
    1711 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const
    1712 {
    1713     BEGIN_AX_OBJC_EXCEPTIONS
    1714     id value = [m_element accessibilityAttributeValue:@"AXPopupValue"];
    1715     if ([value isKindOfClass:[NSString class]])
    1716         return [value createJSStringRef];
    1717     END_AX_OBJC_EXCEPTIONS
    1718 
    1719     return [@"false" createJSStringRef];
    1720 }
    1721 
    17221711void AccessibilityUIElement::takeFocus()
    17231712{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp

    r246958 r247019  
    759759}
    760760
    761 JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const
    762 {
    763     notImplemented();
    764     return nullptr;
    765 }
    766 
    767761void AccessibilityUIElement::takeFocus()
    768762{
Note: See TracChangeset for help on using the changeset viewer.