| 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; | 69 void ariaLabelledbyElementVector(WillBeHeapVector<RawPtrWillBeMember<Element
>>& elements) const; |
| 70 AccessibilityRole determineAriaRoleAttribute() const; | 70 AccessibilityRole determineAriaRoleAttribute() const; |
| 71 void tokenVectorFromAttribute(Vector<String>&, const QualifiedName&) const; | 71 void tokenVectorFromAttribute(Vector<String>&, const QualifiedName&) const; |
| 72 void elementsFromAttribute(WillBeHeapVector<RawPtrWillBeMember<Element>>& el
ements, const QualifiedName&) const; | 72 void elementsFromAttribute(WillBeHeapVector<RawPtrWillBeMember<Element>>& el
ements, const QualifiedName&) const; |
| 73 void accessibilityChildrenFromAttribute(QualifiedName attr, AXObject::AXObje
ctVector&) const; | 73 void accessibilityChildrenFromAttribute(QualifiedName attr, AXObject::AXObje
ctVector&) const; |
| 74 | 74 |
| 75 bool hasContentEditableAttributeSet() const; | 75 bool hasContentEditableAttributeSet() const; |
| 76 bool isTextControl() const override; | 76 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. | 77 // 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; | 78 bool isGenericFocusableElement() const; |
| 79 HTMLLabelElement* labelForElement(const Element*) const; | 79 HTMLLabelElement* labelForElement(const Element*) const; |
| 80 AXObject* menuButtonForMenu() const; | 80 AXObject* menuButtonForMenu() const; |
| 81 Element* menuItemElementForMenu() const; | 81 Element* menuItemElementForMenu() const; |
| 82 Element* mouseButtonListener() const; | 82 Element* mouseButtonListener() const; |
| 83 String deprecatedPlaceholder() const; | |
| 84 AccessibilityRole remapAriaRoleDueToParent(AccessibilityRole) const; | 83 AccessibilityRole remapAriaRoleDueToParent(AccessibilityRole) const; |
| 85 bool isNativeCheckboxOrRadio() const; | 84 bool isNativeCheckboxOrRadio() const; |
| 86 void setNode(Node*); | 85 void setNode(Node*); |
| 87 AXObject* correspondingControlForLabelElement() const; | 86 AXObject* correspondingControlForLabelElement() const; |
| 88 HTMLLabelElement* labelElementContainer() const; | 87 HTMLLabelElement* labelElementContainer() const; |
| 89 | 88 |
| 90 // | 89 // |
| 91 // Overridden from AXObject. | 90 // Overridden from AXObject. |
| 92 // | 91 // |
| 93 | 92 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 bool isReadOnly() const override; | 131 bool isReadOnly() const override; |
| 133 bool isRequired() const final; | 132 bool isRequired() const final; |
| 134 | 133 |
| 135 // Check whether certain properties can be modified. | 134 // Check whether certain properties can be modified. |
| 136 bool canSetFocusAttribute() const override; | 135 bool canSetFocusAttribute() const override; |
| 137 bool canSetValueAttribute() const override; | 136 bool canSetValueAttribute() const override; |
| 138 | 137 |
| 139 // Properties of static elements. | 138 // Properties of static elements. |
| 140 RGBA32 colorValue() const final; | 139 RGBA32 colorValue() const final; |
| 141 bool canvasHasFallbackContent() const final; | 140 bool canvasHasFallbackContent() const final; |
| 142 bool deprecatedExposesTitleUIElement() const override; | |
| 143 int headingLevel() const final; | 141 int headingLevel() const final; |
| 144 unsigned hierarchicalLevel() const final; | 142 unsigned hierarchicalLevel() const final; |
| 145 AccessibilityOrientation orientation() const override; | 143 AccessibilityOrientation orientation() const override; |
| 146 String text() const override; | 144 String text() const override; |
| 147 AXObject* deprecatedTitleUIElement() const override; | |
| 148 | 145 |
| 149 // Properties of interactive elements. | 146 // Properties of interactive elements. |
| 150 AccessibilityButtonState checkboxOrRadioValue() const final; | 147 AccessibilityButtonState checkboxOrRadioValue() const final; |
| 151 InvalidState invalidState() const final; | 148 InvalidState invalidState() const final; |
| 152 // Only used when invalidState() returns InvalidStateOther. | 149 // Only used when invalidState() returns InvalidStateOther. |
| 153 String ariaInvalidValue() const final; | 150 String ariaInvalidValue() const final; |
| 154 String valueDescription() const override; | 151 String valueDescription() const override; |
| 155 float valueForRange() const override; | 152 float valueForRange() const override; |
| 156 float maxValueForRange() const override; | 153 float maxValueForRange() const override; |
| 157 float minValueForRange() const override; | 154 float minValueForRange() const override; |
| 158 String stringValue() const override; | 155 String stringValue() const override; |
| 159 | 156 |
| 160 // ARIA attributes. | 157 // ARIA attributes. |
| 161 String ariaDescribedByAttribute() const final; | 158 String ariaDescribedByAttribute() const final; |
| 162 String ariaLabelledbyAttribute() const final; | 159 String ariaLabelledbyAttribute() const final; |
| 163 AccessibilityRole ariaRoleAttribute() const final; | 160 AccessibilityRole ariaRoleAttribute() const final; |
| 164 | 161 |
| 165 // Accessibility Text. | 162 // 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; | 163 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; | 164 String description(AXNameFrom, AXDescriptionFrom&, AXObjectVector* descripti
onObjects) const override; |
| 175 String description(AXNameFrom, AXDescriptionFrom&, DescriptionSources*, AXRe
latedObjectVector*) const override; | 165 String description(AXNameFrom, AXDescriptionFrom&, DescriptionSources*, AXRe
latedObjectVector*) const override; |
| 166 String placeholder(AXNameFrom, AXDescriptionFrom) const override; |
| 176 | 167 |
| 177 // Location and click point in frame-relative coordinates. | 168 // Location and click point in frame-relative coordinates. |
| 178 LayoutRect elementRect() const override; | 169 LayoutRect elementRect() const override; |
| 179 | 170 |
| 180 // High-level accessibility tree access. | 171 // High-level accessibility tree access. |
| 181 AXObject* computeParent() const override; | 172 AXObject* computeParent() const override; |
| 182 AXObject* computeParentIfExists() const override; | 173 AXObject* computeParentIfExists() const override; |
| 183 | 174 |
| 184 // Low-level accessibility tree exploration. | 175 // Low-level accessibility tree exploration. |
| 185 AXObject* firstChild() const override; | 176 AXObject* firstChild() const override; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 209 // Position in set and Size of set | 200 // Position in set and Size of set |
| 210 int posInSet() const override; | 201 int posInSet() const override; |
| 211 int setSize() const override; | 202 int setSize() const override; |
| 212 | 203 |
| 213 // Aria-owns. | 204 // Aria-owns. |
| 214 void computeAriaOwnsChildren(HeapVector<Member<AXObject>>& ownedChildren); | 205 void computeAriaOwnsChildren(HeapVector<Member<AXObject>>& ownedChildren); |
| 215 | 206 |
| 216 private: | 207 private: |
| 217 RawPtrWillBeMember<Node> m_node; | 208 RawPtrWillBeMember<Node> m_node; |
| 218 | 209 |
| 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; | 210 String textFromDescendants(AXObjectSet& visited) const; |
| 224 String textFromElements(bool inAriaLabelledByTraversal, AXObjectSet& visited
, WillBeHeapVector<RawPtrWillBeMember<Element>>& elements, AXRelatedObjectVector
* relatedObjects) const; | 211 String textFromElements(bool inAriaLabelledByTraversal, AXObjectSet& visited
, WillBeHeapVector<RawPtrWillBeMember<Element>>& elements, AXRelatedObjectVector
* relatedObjects) const; |
| 225 String textFromAriaLabelledby(AXObjectSet& visited, AXRelatedObjectVector* r
elatedObjects) const; | 212 String textFromAriaLabelledby(AXObjectSet& visited, AXRelatedObjectVector* r
elatedObjects) const; |
| 226 String textFromAriaDescribedby(AXRelatedObjectVector* relatedObjects) const; | 213 String textFromAriaDescribedby(AXRelatedObjectVector* relatedObjects) const; |
| 227 String nativeTextAlternative(AXObjectSet& visited, AXNameFrom&, AXRelatedObj
ectVector*, NameSources*, bool* foundTextAlternative) const; | 214 String nativeTextAlternative(AXObjectSet& visited, AXNameFrom&, AXRelatedObj
ectVector*, NameSources*, bool* foundTextAlternative) const; |
| 228 float stepValueForRange() const; | 215 float stepValueForRange() const; |
| 229 AXObject* findChildWithTagName(const HTMLQualifiedName&) const; | 216 AXObject* findChildWithTagName(const HTMLQualifiedName&) const; |
| 230 bool isDescendantOfElementType(const HTMLQualifiedName& tagName) const; | 217 bool isDescendantOfElementType(const HTMLQualifiedName& tagName) const; |
| 231 String stringValueOfControl() const; | |
| 232 }; | 218 }; |
| 233 | 219 |
| 234 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); | 220 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); |
| 235 | 221 |
| 236 } // namespace blink | 222 } // namespace blink |
| 237 | 223 |
| 238 #endif // AXNodeObject_h | 224 #endif // AXNodeObject_h |
| OLD | NEW |