Changeset 200677 in webkit
- Timestamp:
- May 11, 2016, 12:14:31 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 20 edited
- 1 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r200674 r200677 1 2016-05-11 Joanmarie Diggs <jdiggs@igalia.com> 2 3 [GTK] accessibility/aria-readonly.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=98357 5 6 Reviewed by Chris Fleizach. 7 8 As part of this change, a new AtkObject attribute and state are being exposed. 9 Update two tests accordingly. Also unskip the previously-failing test. Lastly, 10 move the Mac form-control-value-settable.html test to the shared test set, 11 with a minor tweak to check the platform for several elements' expectations. 12 13 * accessibility/form-control-value-settable.html: Moved to shared tests. 14 * accessibility/gtk/xml-roles-exposed-expected.txt: Updated. 15 * platform/gtk/TestExpectations: Unskipped previously-failing test. 16 * platform/gtk/accessibility/form-control-value-settable-expected.txt: Added. 17 * platform/gtk/accessibility/table-detection-expected.txt: Updated. 18 * platform/mac/accessibility/form-control-value-settable-expected.txt: Moved. 19 1 20 2016-05-10 Myles C. Maxfield <mmaxfield@apple.com> 2 21 -
trunk/LayoutTests/accessibility/form-control-value-settable.html
r200675 r200677 2 2 <html> 3 3 <body> 4 <script src="../ ../resources/js-test-pre.js"></script>4 <script src="../resources/js-test-pre.js"></script> 5 5 6 6 <div> … … 62 62 check("slider1", "slider2", true); 63 63 64 // Other form controls, even toggleable ones, should have a read-only AXValue - 65 // unless they're inside contentEditable, then everything should have writable AXValue. 66 check("checkbox1", "checkbox2", false); 67 check("radio1", "radio2", false); 64 // Other controls whose contents or state can be user modified should have a read-only 65 // AXValue for non-ATK-based platforms, unless those controls are inside contentEditable, 66 // then everything should have a writable AXValue. 67 isATK = accessibilityController.platformName == "atk"; 68 check("checkbox1", "checkbox2", isATK ? true : false); 69 check("radio1", "radio2", isATK ? true : false); 68 70 check("submit1", "submit2", false); 69 check("combobox1", "combobox2", false);70 check("listbox1", "listbox2", false);71 check("combobox1", "combobox2", isATK ? true : false); 72 check("listbox1", "listbox2", isATK ? true : false); 71 73 } 72 74 73 75 </script> 74 76 75 <script src="../ ../resources/js-test-post.js"></script>77 <script src="../resources/js-test-post.js"></script> 76 78 </body> 77 79 </html> -
trunk/LayoutTests/accessibility/gtk/xml-roles-exposed-expected.txt
r200415 r200677 136 136 AXRequired: 0 137 137 AXChecked: 0 138 AXPlatformAttributes: computed-role:checkbox, xml-roles:checkbox, tag:div, toolkit:WebKitGtk138 AXPlatformAttributes: computed-role:checkbox, xml-roles:checkbox, readonly:false, tag:div, toolkit:WebKitGtk 139 139 ------------ 140 140 AXRole: AXComboBox … … 155 155 AXRequired: 0 156 156 AXChecked: 0 157 AXPlatformAttributes: computed-role:combobox, xml-roles:combobox, tag:div, toolkit:WebKitGtk157 AXPlatformAttributes: computed-role:combobox, xml-roles:combobox, readonly:false, tag:div, toolkit:WebKitGtk 158 158 ------------ 159 159 AXRole: AXLandmarkComplementary … … 593 593 AXRequired: 0 594 594 AXChecked: 0 595 AXPlatformAttributes: computed-role:searchbox, xml-roles:searchbox, tag:div, toolkit:WebKitGtk595 AXPlatformAttributes: computed-role:searchbox, xml-roles:searchbox, readonly:false, tag:div, toolkit:WebKitGtk 596 596 ------------ 597 597 AXRole: AXSeparator … … 631 631 AXRequired: 0 632 632 AXChecked: 0 633 AXPlatformAttributes: computed-role:slider, xml-roles:slider, tag:div, toolkit:WebKitGtk633 AXPlatformAttributes: computed-role:slider, xml-roles:slider, readonly:false, tag:div, toolkit:WebKitGtk 634 634 ------------ 635 635 AXRole: AXSpinButton … … 650 650 AXRequired: 0 651 651 AXChecked: 0 652 AXPlatformAttributes: computed-role:spinbutton, xml-roles:spinbutton, tag:div, toolkit:WebKitGtk652 AXPlatformAttributes: computed-role:spinbutton, xml-roles:spinbutton, readonly:false, tag:div, toolkit:WebKitGtk 653 653 ------------ 654 654 AXRole: AXStatusBar … … 688 688 AXRequired: 0 689 689 AXChecked: 0 690 AXPlatformAttributes: computed-role:switch, xml-roles:switch, tag:div, toolkit:WebKitGtk690 AXPlatformAttributes: computed-role:switch, xml-roles:switch, readonly:false, tag:div, toolkit:WebKitGtk 691 691 ------------ 692 692 AXRole: AXTextField … … 707 707 AXRequired: 0 708 708 AXChecked: 0 709 AXPlatformAttributes: tag:div, toolkit:WebKitGtk709 AXPlatformAttributes: readonly:false, tag:div, toolkit:WebKitGtk 710 710 ------------ 711 711 AXRole: AXTimer -
trunk/LayoutTests/platform/gtk/TestExpectations
r200542 r200677 1851 1851 # Need platform specific update to test to make it run. 1852 1852 1853 webkit.org/b/98357 accessibility/aria-readonly.html [ Failure ]1854 1853 webkit.org/b/98363 accessibility/canvas-fallback-content-2.html [ Failure ] 1855 1854 webkit.org/b/98372 accessibility/onclick-handlers.html [ Failure ] -
trunk/LayoutTests/platform/gtk/accessibility/form-control-value-settable-expected.txt
r200675 r200677 1 2 1 2 3 3 This tests whether AXValue is writable for various form controls. 4 4 … … 38 38 checkbox2 39 39 PASS document.activeElement == element2 is true 40 PASS axElement1.isAttributeSettable('AXValue') is false40 PASS axElement1.isAttributeSettable('AXValue') is true 41 41 PASS axElement2.isAttributeSettable('AXValue') is true 42 42 … … 45 45 radio2 46 46 PASS document.activeElement == element2 is true 47 PASS axElement1.isAttributeSettable('AXValue') is false47 PASS axElement1.isAttributeSettable('AXValue') is true 48 48 PASS axElement2.isAttributeSettable('AXValue') is true 49 49 … … 59 59 combobox2 60 60 PASS document.activeElement == element2 is true 61 PASS axElement1.isAttributeSettable('AXValue') is false61 PASS axElement1.isAttributeSettable('AXValue') is true 62 62 PASS axElement2.isAttributeSettable('AXValue') is true 63 63 … … 66 66 listbox2 67 67 PASS document.activeElement == element2 is true 68 PASS axElement1.isAttributeSettable('AXValue') is false68 PASS axElement1.isAttributeSettable('AXValue') is true 69 69 PASS axElement2.isAttributeSettable('AXValue') is true 70 70 -
trunk/LayoutTests/platform/gtk/accessibility/table-detection-expected.txt
r197448 r200677 286 286 AXTitle: 287 287 AXDescription: 288 AXValue: asdf asdf<\n> 288 289 AXFocusable: 1 289 290 AXFocused: 0 -
trunk/Source/WebCore/ChangeLog
r200675 r200677 1 2016-05-11 Joanmarie Diggs <jdiggs@igalia.com> 2 3 [GTK] accessibility/aria-readonly.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=98357 5 6 Reviewed by Chris Fleizach. 7 8 Add support for ATK_STATE_READ_ONLY and expose the value of aria-readonly 9 as an AtkObject attribute. In order to eliminate duplicate checks, remove 10 isReadOnly() and just use canSetAttributeValue(), moving all the logic into 11 AccessibilityNodeObject. Add AccessibilityObject::supportsARIAReadOnly() so 12 that we can explicitly expose the implicit value for aria-readonly on roles 13 which support this property. Also add support for ATK_STATE_CHECKABLE, both 14 because this state was missing and because it serves a similar function to 15 ATK_STATE_EDITABLE for the purpose of verifying exposure of toggle-able 16 elements that are not read-only. 17 18 Test: accessibility/form-control-value-settable.html 19 20 * accessibility/AccessibilityNodeObject.cpp: 21 (WebCore::AccessibilityNodeObject::canSetValueAttribute): 22 (WebCore::AccessibilityNodeObject::isRequired): Deleted. 23 (WebCore::AccessibilityNodeObject::supportsRequiredAttribute): Deleted. 24 * accessibility/AccessibilityNodeObject.h: 25 * accessibility/AccessibilityObject.cpp: 26 (WebCore::AccessibilityObject::supportsARIAReadOnly): 27 (WebCore::AccessibilityObject::ariaReadOnlyValue): 28 * accessibility/AccessibilityObject.h: 29 (WebCore::AccessibilityObject::isUnvisited): Deleted. 30 * accessibility/AccessibilityRenderObject.cpp: 31 (WebCore::AccessibilityRenderObject::clickPoint): 32 (WebCore::AccessibilityRenderObject::isOffScreen): Deleted. 33 (WebCore::AccessibilityRenderObject::anchorElement): Deleted. 34 (WebCore::AccessibilityRenderObject::internalLinkElement): Deleted. 35 (WebCore::AccessibilityRenderObject::textChanged): Deleted. 36 (WebCore::AccessibilityRenderObject::clearChildren): Deleted. 37 (WebCore::AccessibilityRenderObject::addImageMapChildren): Deleted. 38 * accessibility/AccessibilityRenderObject.h: 39 * accessibility/atk/WebKitAccessibleInterfaceText.cpp: 40 (getAttributeSetForAccessibilityObject): 41 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: 42 (webkitAccessibleGetAttributes): 43 (setAtkStateSetFromCoreObject): 44 (getInterfaceMaskFromObject): 45 * inspector/InspectorDOMAgent.cpp: 46 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): 47 1 48 2016-05-10 Jeremy Jones <jeremyj@apple.com> 2 49 -
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
r200369 r200677 740 740 } 741 741 742 bool AccessibilityNodeObject::isReadOnly() const743 {744 Node* node = this->node();745 if (!node)746 return true;747 748 if (is<HTMLTextAreaElement>(*node))749 return downcast<HTMLTextAreaElement>(*node).isReadOnly();750 751 if (is<HTMLInputElement>(*node)) {752 HTMLInputElement& input = downcast<HTMLInputElement>(*node);753 if (input.isTextField())754 return input.isReadOnly();755 }756 757 return !node->hasEditableStyle();758 }759 760 742 bool AccessibilityNodeObject::isRequired() const 761 743 { … … 1976 1958 } 1977 1959 1960 bool AccessibilityNodeObject::canSetValueAttribute() const 1961 { 1962 Node* node = this->node(); 1963 if (!node) 1964 return false; 1965 1966 // The host-language readonly attribute trumps aria-readonly. 1967 if (is<HTMLTextAreaElement>(*node)) 1968 return !downcast<HTMLTextAreaElement>(*node).isReadOnly(); 1969 if (is<HTMLInputElement>(*node)) { 1970 HTMLInputElement& input = downcast<HTMLInputElement>(*node); 1971 if (input.isTextField()) 1972 return !input.isReadOnly(); 1973 } 1974 1975 String readOnly = ariaReadOnlyValue(); 1976 if (!readOnly.isEmpty()) 1977 return readOnly == "true" ? false : true; 1978 1979 if (isNonNativeTextControl()) 1980 return true; 1981 1982 if (isMeter()) 1983 return false; 1984 1985 if (isProgressIndicator() || isSlider()) 1986 return true; 1987 1988 #if PLATFORM(GTK) || PLATFORM(EFL) 1989 // In ATK, input types which support aria-readonly are treated as having a 1990 // settable value if the user can modify the widget's value or its state. 1991 if (supportsARIAReadOnly() || isRadioButton()) 1992 return true; 1993 #endif 1994 1995 if (isWebArea()) { 1996 Document* document = this->document(); 1997 if (!document) 1998 return false; 1999 2000 if (HTMLElement* body = document->bodyOrFrameset()) { 2001 if (body->hasEditableStyle()) 2002 return true; 2003 } 2004 2005 return document->hasEditableStyle(); 2006 } 2007 2008 return node->hasEditableStyle(); 2009 } 2010 1978 2011 AccessibilityRole AccessibilityNodeObject::determineAriaRoleAttribute() const 1979 2012 { -
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.h
r199588 r200677 98 98 bool isIndeterminate() const override; 99 99 bool isPressed() const override; 100 bool isReadOnly() const override;101 100 bool isRequired() const override; 102 101 bool supportsRequiredAttribute() const override; … … 110 109 bool canSetFocusAttribute() const override; 111 110 int headingLevel() const override; 111 112 bool canSetValueAttribute() const override; 112 113 113 114 String valueDescription() const override; -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r200415 r200677 1560 1560 { 1561 1561 return contentEditableAttributeIsEnabled(element()); 1562 } 1563 1564 bool AccessibilityObject::supportsARIAReadOnly() const 1565 { 1566 AccessibilityRole role = roleValue(); 1567 1568 return role == CheckBoxRole 1569 || role == ColumnHeaderRole 1570 || role == ComboBoxRole 1571 || role == GridRole 1572 || role == GridCellRole 1573 || role == ListBoxRole 1574 || role == MenuItemCheckboxRole 1575 || role == MenuItemRadioRole 1576 || role == RadioGroupRole 1577 || role == RowHeaderRole 1578 || role == SearchFieldRole 1579 || role == SliderRole 1580 || role == SpinButtonRole 1581 || role == SwitchRole 1582 || role == TextFieldRole 1583 || role == TreeGridRole 1584 || isPasswordField(); 1585 } 1586 1587 String AccessibilityObject::ariaReadOnlyValue() const 1588 { 1589 if (!hasAttribute(aria_readonlyAttr)) 1590 return ariaRoleAttribute() != UnknownRole && supportsARIAReadOnly() ? "false" : String(); 1591 1592 return String(getAttribute(aria_readonlyAttr)).convertToASCIILowercase(); 1562 1593 } 1563 1594 -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r200415 r200677 570 570 virtual bool isOffScreen() const { return false; } 571 571 virtual bool isPressed() const { return false; } 572 virtual bool isReadOnly() const { return false; }573 572 virtual bool isUnvisited() const { return false; } 574 573 virtual bool isVisited() const { return false; } … … 924 923 static bool contentEditableAttributeIsEnabled(Element*); 925 924 bool hasContentEditableAttributeSet() const; 925 926 bool supportsARIAReadOnly() const; 927 String ariaReadOnlyValue() const; 926 928 927 929 bool supportsARIAAttributes() const; -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r200415 r200677 523 523 return false; 524 524 } 525 526 bool AccessibilityRenderObject::isReadOnly() const527 {528 ASSERT(m_renderer);529 530 if (isWebArea()) {531 if (HTMLElement* body = m_renderer->document().bodyOrFrameset()) {532 if (body->hasEditableStyle())533 return false;534 }535 536 return !m_renderer->document().hasEditableStyle();537 }538 539 return AccessibilityNodeObject::isReadOnly();540 }541 525 542 526 bool AccessibilityRenderObject::isOffScreen() const … … 923 907 924 908 // use the default position unless this is an editable web area, in which case we use the selection bounds. 925 if (!isWebArea() || isReadOnly())909 if (!isWebArea() || !canSetValueAttribute()) 926 910 return AccessibilityObject::clickPoint(); 927 911 … … 2877 2861 } 2878 2862 2879 bool AccessibilityRenderObject::canSetValueAttribute() const2880 {2881 // In the event of a (Boolean)@readonly and (True/False/Undefined)@aria-readonly2882 // value mismatch, the host language native attribute value wins.2883 if (isNativeTextControl())2884 return !isReadOnly();2885 2886 if (isMeter())2887 return false;2888 2889 auto& readOnly = getAttribute(aria_readonlyAttr);2890 if (equalLettersIgnoringASCIICase(readOnly, "true"))2891 return false;2892 if (equalLettersIgnoringASCIICase(readOnly, "false"))2893 return true;2894 2895 if (isProgressIndicator() || isSlider())2896 return true;2897 2898 if (isTextControl() && !isNativeTextControl())2899 return true;2900 2901 // Any node could be contenteditable, so isReadOnly should be relied upon2902 // for this information for all elements.2903 return !isReadOnly();2904 }2905 2906 2863 bool AccessibilityRenderObject::canSetTextRangeAttributes() const 2907 2864 { -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h
r199229 r200677 71 71 bool isLoaded() const override; 72 72 bool isOffScreen() const override; 73 bool isReadOnly() const override;74 73 bool isUnvisited() const override; 75 74 bool isVisited() const override; … … 84 83 85 84 bool canSetTextRangeAttributes() const override; 86 bool canSetValueAttribute() const override;87 85 bool canSetExpandedAttribute() const override; 88 86 -
trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp
r200098 r200677 199 199 result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_INVISIBLE), (style->visibility() == HIDDEN) ? "true" : "false"); 200 200 201 result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_EDITABLE), object-> isReadOnly() ? "false" : "true");201 result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_EDITABLE), object->canSetValueAttribute() ? "true" : "false"); 202 202 203 203 String language = object->language(); -
trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
r200415 r200677 474 474 if (coreObject->supportsARIASetSize()) 475 475 attributeSet = addToAtkAttributeSet(attributeSet, "setsize", String::number(coreObject->ariaSetSize()).utf8().data()); 476 477 String isReadOnly = coreObject->ariaReadOnlyValue(); 478 if (!isReadOnly.isEmpty()) 479 attributeSet = addToAtkAttributeSet(attributeSet, "readonly", isReadOnly.utf8().data()); 476 480 477 481 // According to the W3C Core Accessibility API Mappings 1.1, section 5.4.1 General Rules: … … 802 806 atk_state_set_add_state(stateSet, ATK_STATE_ACTIVE); 803 807 808 #if ATK_CHECK_VERSION(2,11,2) 809 if (coreObject->supportsChecked() && coreObject->canSetValueAttribute()) 810 atk_state_set_add_state(stateSet, ATK_STATE_CHECKABLE); 811 #endif 812 804 813 if (coreObject->isChecked()) 805 814 atk_state_set_add_state(stateSet, ATK_STATE_CHECKED); 806 815 807 // FIXME: isReadOnly does not seem to do the right thing for 808 // controls, so check explicitly for them. In addition, because 809 // isReadOnly is false for listBoxOptions, we need to add one 810 // more check so that we do not present them as being "editable". 811 if ((!coreObject->isReadOnly() 812 || (coreObject->isControl() && coreObject->canSetValueAttribute())) 813 && !isListBoxOption) 816 if ((coreObject->isTextControl() || coreObject->isNonNativeTextControl()) && coreObject->canSetValueAttribute()) 814 817 atk_state_set_add_state(stateSet, ATK_STATE_EDITABLE); 815 818 … … 855 858 if (coreObject->isPressed()) 856 859 atk_state_set_add_state(stateSet, ATK_STATE_PRESSED); 860 861 #if ATK_CHECK_VERSION(2,15,3) 862 if (!coreObject->canSetValueAttribute() && (coreObject->supportsARIAReadOnly())) 863 atk_state_set_add_state(stateSet, ATK_STATE_READ_ONLY); 864 #endif 857 865 858 866 if (coreObject->isRequired()) … … 1145 1153 if (role == StaticTextRole || coreObject->isMenuListOption()) 1146 1154 interfaceMask |= 1 << WAIText; 1147 else if (coreObject->isTextControl() ) {1155 else if (coreObject->isTextControl() || coreObject->isNonNativeTextControl()) { 1148 1156 interfaceMask |= 1 << WAIText; 1149 if ( !coreObject->isReadOnly())1157 if (coreObject->canSetValueAttribute()) 1150 1158 interfaceMask |= 1 << WAIEditableText; 1151 1159 } else if (!coreObject->isWebArea()) { -
trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp
r200539 r200677 1727 1727 1728 1728 if (axObject->isTextControl()) 1729 readonly = axObject->isReadOnly();1729 readonly = !axObject->canSetValueAttribute(); 1730 1730 1731 1731 supportsRequired = axObject->supportsRequiredAttribute(); -
trunk/Source/WebKit/win/AccessibleBase.cpp
r200415 r200677 489 489 state |= STATE_SYSTEM_UNAVAILABLE; 490 490 491 if ( m_object->isReadOnly())491 if (!m_object->canSetValueAttribute()) 492 492 state |= STATE_SYSTEM_READONLY; 493 493 -
trunk/Source/WebKit/win/AccessibleTextImpl.cpp
r188703 r200677 564 564 HRESULT AccessibleText::deleteText(long startOffset, long endOffset) 565 565 { 566 if ( m_object->isReadOnly())566 if (!m_object->canSetValueAttribute()) 567 567 return S_FALSE; 568 568 … … 582 582 HRESULT AccessibleText::insertText(long offset, BSTR* text) 583 583 { 584 if ( m_object->isReadOnly())584 if (!m_object->canSetValueAttribute()) 585 585 return S_FALSE; 586 586 … … 602 602 HRESULT AccessibleText::cutText(long startOffset, long endOffset) 603 603 { 604 if ( m_object->isReadOnly())604 if (!m_object->canSetValueAttribute()) 605 605 return S_FALSE; 606 606 … … 623 623 HRESULT AccessibleText::pasteText(long offset) 624 624 { 625 if ( m_object->isReadOnly())625 if (!m_object->canSetValueAttribute()) 626 626 return S_FALSE; 627 627 … … 643 643 HRESULT AccessibleText::replaceText(long startOffset, long endOffset, BSTR* text) 644 644 { 645 if ( m_object->isReadOnly())645 if (!m_object->canSetValueAttribute()) 646 646 return S_FALSE; 647 647 -
trunk/Source/WebKit/win/ChangeLog
r200577 r200677 1 2016-05-11 Joanmarie Diggs <jdiggs@igalia.com> 2 3 [GTK] accessibility/aria-readonly.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=98357 5 6 Reviewed by Chris Fleizach. 7 8 Call AccessibilityNode::canSetValueAttribute() to determine if STATE_SYSTEM_READONLY 9 should be added and if editable text should be supported. 10 11 * AccessibleBase.cpp: 12 (AccessibleBase::state): 13 * AccessibleTextImpl.cpp: 14 (AccessibleText::deleteText): 15 (AccessibleText::insertText): 16 (AccessibleText::cutText): 17 (AccessibleText::pasteText): 18 (AccessibleText::replaceText): 19 1 20 2016-05-09 Fujii Hironori <Hironori.Fujii@sony.com> 2 21 -
trunk/Tools/ChangeLog
r200670 r200677 1 2016-05-11 Joanmarie Diggs <jdiggs@igalia.com> 2 3 [GTK] accessibility/aria-readonly.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=98357 5 6 Reviewed by Chris Fleizach. 7 8 Add checks to isAttributeSettable() for ATK_STATE_READ_ONLY and the 'readonly' 9 AtkObject attribute along with ATK_STATE_CHECKABLE for toggle-able elements, 10 ATK_STATE_SELECTABLE for select elements, and ATK_STATE_FOCUSABLE combined 11 with range verification for inputs which implement AtkValue. The latter two 12 additions are admittedly a heuristic workaround for platform accessibility 13 API differences. But they should be sufficient to facilitate cross-platform 14 testing of isAttributeSettable() for form elements which lack ARIA attributes. 15 16 Bump the minimum version of at-spi2-core and at-spi2-atk 17 to 2.15.4 (earliest version that supports STATE_READ_ONLY). 18 19 * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: 20 (WTR::AccessibilityUIElement::isAttributeSettable): 21 * gtk/jhbuild.modules: 22 1 23 2016-05-10 Ryan Haddad <ryanhaddad@apple.com> 2 24 -
trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
r200415 r200677 1045 1045 1046 1046 String attributeString = jsStringToWTFString(attribute); 1047 if (attributeString == "AXValue") 1048 return checkElementState(m_element.get(), ATK_STATE_EDITABLE); 1047 if (attributeString != "AXValue") 1048 return false; 1049 1050 // ATK does not have a single state or property to indicate whether or not the value 1051 // of an accessible object can be set. ATs look at several states and properties based 1052 // on the type of object. If nothing explicitly indicates the value can or cannot be 1053 // set, ATs make role- and interface-based decisions. We'll do something similar here. 1054 1055 // This state is expected to be present only for text widgets and contenteditable elements. 1056 if (checkElementState(m_element.get(), ATK_STATE_EDITABLE)) 1057 return true; 1058 1059 #if ATK_CHECK_VERSION(2,11,2) 1060 // This state is applicable to checkboxes, radiobuttons, switches, etc. 1061 if (checkElementState(m_element.get(), ATK_STATE_CHECKABLE)) 1062 return true; 1063 #endif 1064 1065 #if ATK_CHECK_VERSION(2,15,3) 1066 // This state is expected to be present only for controls and only if explicitly set. 1067 if (checkElementState(m_element.get(), ATK_STATE_READ_ONLY)) 1068 return false; 1069 #endif 1070 1071 // We expose an object attribute to ATs when there is an author-provided ARIA property 1072 // and also when there is a supported ARIA role but no author-provided value. 1073 String isReadOnly = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), ObjectAttributeType, "readonly"); 1074 if (!isReadOnly.isEmpty()) 1075 return isReadOnly == "true" ? false : true; 1076 1077 // If we have a native listbox or combobox and the value can be set, the options should 1078 // have ATK_STATE_SELECTABLE. 1079 AtkRole role = atk_object_get_role(ATK_OBJECT(m_element.get())); 1080 if (role == ATK_ROLE_LIST_BOX || role == ATK_ROLE_COMBO_BOX) { 1081 if (GRefPtr<AtkObject> child = adoptGRef(atk_object_ref_accessible_child(ATK_OBJECT(m_element.get()), 0))) { 1082 if (atk_object_get_role(ATK_OBJECT(child.get())) == ATK_ROLE_MENU) 1083 child = adoptGRef(atk_object_ref_accessible_child(ATK_OBJECT(child.get()), 0)); 1084 return child && checkElementState(child.get(), ATK_STATE_SELECTABLE); 1085 } 1086 } 1087 1088 // If we have a native element which exposes a range whose value can be set, it should 1089 // be focusable and have a true range. 1090 if (ATK_IS_VALUE(m_element.get()) && checkElementState(m_element.get(), ATK_STATE_FOCUSABLE)) 1091 return minValue() != maxValue(); 1049 1092 1050 1093 return false; -
trunk/Tools/gtk/jhbuild.modules
r200621 r200677 286 286 <autotools id="at-spi2-core" 287 287 autogenargs="--disable-introspection"> 288 <branch module="pub/GNOME/sources/at-spi2-core/2.1 0/at-spi2-core-2.10.0.tar.xz" version="2.10.0"289 repo="ftp.gnome.org" 290 hash="sha256: 964155c7574220a00e11e1c0d91f2d3017ed603920eb1333ff9cbdb6a22744db">288 <branch module="pub/GNOME/sources/at-spi2-core/2.15/at-spi2-core-2.15.4.tar.xz" version="2.15.4" 289 repo="ftp.gnome.org" 290 hash="sha256:0e3b01af6ba06d98faf7b85891ece394897fe145b0760b7846e810b57f1b809f"> 291 291 </branch> 292 292 <dependencies> … … 296 296 297 297 <autotools id="at-spi2-atk"> 298 <branch module="pub/GNOME/sources/at-spi2-atk/2.1 0/at-spi2-atk-2.10.0.tar.xz" version="2.10.0"299 repo="ftp.gnome.org" 300 hash="sha256: dea7ff2f9bc9bbdb0351112616d738de718b55739cd2511afecac51604c31a94">298 <branch module="pub/GNOME/sources/at-spi2-atk/2.15/at-spi2-atk-2.15.4.tar.xz" version="2.15.4" 299 repo="ftp.gnome.org" 300 hash="sha256:3283aa5207b81e4c77d24c4e8b1c0abe6c850b11a2e62cd873cc07af0b403501"> 301 301 </branch> 302 302 <dependencies>
Note:
See TracChangeset
for help on using the changeset viewer.