| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #endif | 59 #endif |
| 60 | 60 |
| 61 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override
; | 61 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const override
; |
| 62 const AXObject* inheritsPresentationalRoleFrom() const override; | 62 const AXObject* inheritsPresentationalRoleFrom() const override; |
| 63 virtual AccessibilityRole determineAccessibilityRole(); | 63 virtual AccessibilityRole determineAccessibilityRole(); |
| 64 AccessibilityRole determineAccessibilityRoleUtil(); | 64 AccessibilityRole determineAccessibilityRoleUtil(); |
| 65 String accessibilityDescriptionForElements(WillBeHeapVector<RawPtrWillBeMemb
er<Element>> &elements) const; | 65 String accessibilityDescriptionForElements(WillBeHeapVector<RawPtrWillBeMemb
er<Element>> &elements) const; |
| 66 void alterSliderValue(bool increase); | 66 void alterSliderValue(bool increase); |
| 67 String ariaAccessibilityDescription() const; | 67 String ariaAccessibilityDescription() const; |
| 68 String ariaAutoComplete() const; | 68 String ariaAutoComplete() const; |
| 69 void ariaLabelledbyElements(WillBeHeapVector<RawPtrWillBeMember<Element>>& e
lements) const; | |
| 70 AccessibilityRole determineAriaRoleAttribute() const; | 69 AccessibilityRole determineAriaRoleAttribute() const; |
| 71 void tokenVectorFromAttribute(Vector<String>&, const QualifiedName&) const; | |
| 72 void elementsFromAttribute(WillBeHeapVector<RawPtrWillBeMember<Element>>& el
ements, const QualifiedName&) const; | |
| 73 void accessibilityChildrenFromAttribute(QualifiedName attr, AXObject::AXObje
ctVector&) const; | 70 void accessibilityChildrenFromAttribute(QualifiedName attr, AXObject::AXObje
ctVector&) const; |
| 74 | 71 |
| 75 bool hasContentEditableAttributeSet() const; | 72 bool hasContentEditableAttributeSet() const; |
| 76 bool isTextControl() const override; | 73 bool isTextControl() const override; |
| 77 // This returns true if it's focusable but it's not content editable and it'
s not a control or ARIA control. | 74 // This returns true if it's focusable but it's not content editable and it'
s not a control or ARIA control. |
| 78 bool isGenericFocusableElement() const; | 75 bool isGenericFocusableElement() const; |
| 79 HTMLLabelElement* labelForElement(const Element*) const; | 76 HTMLLabelElement* labelForElement(const Element*) const; |
| 80 AXObject* menuButtonForMenu() const; | 77 AXObject* menuButtonForMenu() const; |
| 81 Element* menuItemElementForMenu() const; | 78 Element* menuItemElementForMenu() const; |
| 82 Element* mouseButtonListener() const; | 79 Element* mouseButtonListener() const; |
| 83 String deprecatedPlaceholder() const; | |
| 84 AccessibilityRole remapAriaRoleDueToParent(AccessibilityRole) const; | 80 AccessibilityRole remapAriaRoleDueToParent(AccessibilityRole) const; |
| 85 bool isNativeCheckboxOrRadio() const; | 81 bool isNativeCheckboxOrRadio() const; |
| 86 void setNode(Node*); | 82 void setNode(Node*); |
| 87 AXObject* correspondingControlForLabelElement() const; | 83 AXObject* correspondingControlForLabelElement() const; |
| 88 HTMLLabelElement* labelElementContainer() const; | 84 HTMLLabelElement* labelElementContainer() const; |
| 89 | 85 |
| 90 // | 86 // |
| 91 // Overridden from AXObject. | 87 // Overridden from AXObject. |
| 92 // | 88 // |
| 93 | 89 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 bool isReadOnly() const override; | 128 bool isReadOnly() const override; |
| 133 bool isRequired() const final; | 129 bool isRequired() const final; |
| 134 | 130 |
| 135 // Check whether certain properties can be modified. | 131 // Check whether certain properties can be modified. |
| 136 bool canSetFocusAttribute() const override; | 132 bool canSetFocusAttribute() const override; |
| 137 bool canSetValueAttribute() const override; | 133 bool canSetValueAttribute() const override; |
| 138 | 134 |
| 139 // Properties of static elements. | 135 // Properties of static elements. |
| 140 RGBA32 colorValue() const final; | 136 RGBA32 colorValue() const final; |
| 141 bool canvasHasFallbackContent() const final; | 137 bool canvasHasFallbackContent() const final; |
| 142 bool deprecatedExposesTitleUIElement() const override; | |
| 143 int headingLevel() const final; | 138 int headingLevel() const final; |
| 144 unsigned hierarchicalLevel() const final; | 139 unsigned hierarchicalLevel() const final; |
| 145 AccessibilityOrientation orientation() const override; | 140 AccessibilityOrientation orientation() const override; |
| 146 String text() const override; | 141 String text() const override; |
| 147 AXObject* deprecatedTitleUIElement() const override; | |
| 148 | 142 |
| 149 // Properties of interactive elements. | 143 // Properties of interactive elements. |
| 150 AccessibilityButtonState checkboxOrRadioValue() const final; | 144 AccessibilityButtonState checkboxOrRadioValue() const final; |
| 151 InvalidState invalidState() const final; | 145 InvalidState invalidState() const final; |
| 152 // Only used when invalidState() returns InvalidStateOther. | 146 // Only used when invalidState() returns InvalidStateOther. |
| 153 String ariaInvalidValue() const final; | 147 String ariaInvalidValue() const final; |
| 154 String valueDescription() const override; | 148 String valueDescription() const override; |
| 155 float valueForRange() const override; | 149 float valueForRange() const override; |
| 156 float maxValueForRange() const override; | 150 float maxValueForRange() const override; |
| 157 float minValueForRange() const override; | 151 float minValueForRange() const override; |
| 158 String stringValue() const override; | 152 String stringValue() const override; |
| 159 | 153 |
| 160 // ARIA attributes. | 154 // ARIA attributes. |
| 161 String ariaDescribedByAttribute() const final; | 155 String ariaDescribedByAttribute() const final; |
| 162 String ariaLabelledbyAttribute() const final; | 156 String ariaLabelledbyAttribute() const final; |
| 163 AccessibilityRole ariaRoleAttribute() const final; | 157 AccessibilityRole ariaRoleAttribute() const final; |
| 164 | 158 |
| 165 // Accessibility Text. | 159 // AX name calculation. |
| 166 String deprecatedTextUnderElement(TextUnderElementMode) const override; | |
| 167 String deprecatedAccessibilityDescription() const override; | |
| 168 String deprecatedTitle(TextUnderElementMode) const override; | |
| 169 String deprecatedHelpText() const override; | |
| 170 String computedName() const override; | |
| 171 | |
| 172 // New AX name calculation. | |
| 173 String textAlternative(bool recursive, bool inAriaLabelledByTraversal, AXObj
ectSet& visited, AXNameFrom&, AXRelatedObjectVector*, NameSources*) const overri
de; | 160 String textAlternative(bool recursive, bool inAriaLabelledByTraversal, AXObj
ectSet& visited, AXNameFrom&, AXRelatedObjectVector*, NameSources*) const overri
de; |
| 174 String description(AXNameFrom, AXDescriptionFrom&, AXObjectVector* descripti
onObjects) const override; | 161 String description(AXNameFrom, AXDescriptionFrom&, AXObjectVector* descripti
onObjects) const override; |
| 175 String description(AXNameFrom, AXDescriptionFrom&, DescriptionSources*, AXRe
latedObjectVector*) const override; | 162 String description(AXNameFrom, AXDescriptionFrom&, DescriptionSources*, AXRe
latedObjectVector*) const override; |
| 163 String placeholder(AXNameFrom, AXDescriptionFrom) const override; |
| 176 | 164 |
| 177 // Location and click point in frame-relative coordinates. | 165 // Location and click point in frame-relative coordinates. |
| 178 LayoutRect elementRect() const override; | 166 LayoutRect elementRect() const override; |
| 179 | 167 |
| 180 // High-level accessibility tree access. | 168 // High-level accessibility tree access. |
| 181 AXObject* computeParent() const override; | 169 AXObject* computeParent() const override; |
| 182 AXObject* computeParentIfExists() const override; | 170 AXObject* computeParentIfExists() const override; |
| 183 | 171 |
| 184 // Low-level accessibility tree exploration. | 172 // Low-level accessibility tree exploration. |
| 185 AXObject* firstChild() const override; | 173 AXObject* firstChild() const override; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 209 // Position in set and Size of set | 197 // Position in set and Size of set |
| 210 int posInSet() const override; | 198 int posInSet() const override; |
| 211 int setSize() const override; | 199 int setSize() const override; |
| 212 | 200 |
| 213 // Aria-owns. | 201 // Aria-owns. |
| 214 void computeAriaOwnsChildren(HeapVector<Member<AXObject>>& ownedChildren); | 202 void computeAriaOwnsChildren(HeapVector<Member<AXObject>>& ownedChildren); |
| 215 | 203 |
| 216 private: | 204 private: |
| 217 RawPtrWillBeMember<Node> m_node; | 205 RawPtrWillBeMember<Node> m_node; |
| 218 | 206 |
| 219 String deprecatedAlternativeTextForWebArea() const; | |
| 220 void deprecatedAlternativeText(HeapVector<Member<AccessibilityText>>&) const
; | |
| 221 void deprecatedAriaLabelledbyText(HeapVector<Member<AccessibilityText>>&) co
nst; | |
| 222 | |
| 223 String textFromDescendants(AXObjectSet& visited) const; | 207 String textFromDescendants(AXObjectSet& visited) const; |
| 224 String textFromElements(bool inAriaLabelledByTraversal, AXObjectSet& visited
, WillBeHeapVector<RawPtrWillBeMember<Element>>& elements, AXRelatedObjectVector
* relatedObjects) const; | |
| 225 String textFromAriaLabelledby(AXObjectSet& visited, AXRelatedObjectVector* r
elatedObjects) const; | |
| 226 String textFromAriaDescribedby(AXRelatedObjectVector* relatedObjects) const; | |
| 227 String nativeTextAlternative(AXObjectSet& visited, AXNameFrom&, AXRelatedObj
ectVector*, NameSources*, bool* foundTextAlternative) const; | 208 String nativeTextAlternative(AXObjectSet& visited, AXNameFrom&, AXRelatedObj
ectVector*, NameSources*, bool* foundTextAlternative) const; |
| 228 float stepValueForRange() const; | 209 float stepValueForRange() const; |
| 229 AXObject* findChildWithTagName(const HTMLQualifiedName&) const; | 210 AXObject* findChildWithTagName(const HTMLQualifiedName&) const; |
| 230 bool isDescendantOfElementType(const HTMLQualifiedName& tagName) const; | 211 bool isDescendantOfElementType(const HTMLQualifiedName& tagName) const; |
| 231 String stringValueOfControl() const; | |
| 232 }; | 212 }; |
| 233 | 213 |
| 234 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); | 214 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); |
| 235 | 215 |
| 236 } // namespace blink | 216 } // namespace blink |
| 237 | 217 |
| 238 #endif // AXNodeObject_h | 218 #endif // AXNodeObject_h |
| OLD | NEW |