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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 AXObject* correspondingControlForLabelElement() const; | 95 AXObject* correspondingControlForLabelElement() const; |
96 HTMLLabelElement* labelElementContainer() const; | 96 HTMLLabelElement* labelElementContainer() const; |
97 | 97 |
98 // | 98 // |
99 // Overridden from AXObject. | 99 // Overridden from AXObject. |
100 // | 100 // |
101 | 101 |
102 virtual void init() OVERRIDE; | 102 virtual void init() OVERRIDE; |
103 virtual void detach() OVERRIDE; | 103 virtual void detach() OVERRIDE; |
104 virtual bool isDetached() const OVERRIDE { return !m_node; } | 104 virtual bool isDetached() const OVERRIDE { return !m_node; } |
105 virtual bool isAXNodeObject() const OVERRIDE { return true; } | 105 virtual bool isAXNodeObject() const OVERRIDE FINAL { return true; } |
106 | 106 |
107 // Check object role or purpose. | 107 // Check object role or purpose. |
108 virtual bool isAnchor() const OVERRIDE; | 108 virtual bool isAnchor() const OVERRIDE FINAL; |
109 virtual bool isControl() const OVERRIDE; | 109 virtual bool isControl() const OVERRIDE; |
110 virtual bool isFieldset() const OVERRIDE; | 110 virtual bool isFieldset() const OVERRIDE FINAL; |
111 virtual bool isHeading() const OVERRIDE; | 111 virtual bool isHeading() const OVERRIDE FINAL; |
112 virtual bool isHovered() const OVERRIDE; | 112 virtual bool isHovered() const OVERRIDE FINAL; |
113 virtual bool isImage() const OVERRIDE; | 113 virtual bool isImage() const OVERRIDE FINAL; |
114 bool isImageButton() const; | 114 bool isImageButton() const; |
115 virtual bool isInputImage() const OVERRIDE; | 115 virtual bool isInputImage() const OVERRIDE FINAL; |
116 virtual bool isLink() const; | 116 virtual bool isLink() const OVERRIDE FINAL; |
117 virtual bool isMenu() const OVERRIDE; | 117 virtual bool isMenu() const OVERRIDE FINAL; |
118 virtual bool isMenuButton() const OVERRIDE; | 118 virtual bool isMenuButton() const OVERRIDE FINAL; |
119 virtual bool isMultiSelectable() const OVERRIDE; | 119 virtual bool isMultiSelectable() const OVERRIDE; |
120 bool isNativeImage() const; | 120 bool isNativeImage() const; |
121 virtual bool isNativeTextControl() const OVERRIDE; | 121 virtual bool isNativeTextControl() const OVERRIDE FINAL; |
122 virtual bool isNonNativeTextControl() const OVERRIDE; | 122 virtual bool isNonNativeTextControl() const OVERRIDE FINAL; |
123 virtual bool isPasswordField() const OVERRIDE; | 123 virtual bool isPasswordField() const OVERRIDE FINAL; |
124 virtual bool isProgressIndicator() const OVERRIDE; | 124 virtual bool isProgressIndicator() const OVERRIDE; |
125 virtual bool isSlider() const OVERRIDE; | 125 virtual bool isSlider() const OVERRIDE; |
126 | 126 |
127 // Check object state. | 127 // Check object state. |
128 virtual bool isChecked() const OVERRIDE; | 128 virtual bool isChecked() const OVERRIDE FINAL; |
129 virtual bool isClickable() const OVERRIDE; | 129 virtual bool isClickable() const OVERRIDE FINAL; |
130 virtual bool isEnabled() const OVERRIDE; | 130 virtual bool isEnabled() const OVERRIDE; |
131 virtual bool isIndeterminate() const OVERRIDE; | 131 virtual bool isIndeterminate() const OVERRIDE FINAL; |
132 virtual bool isPressed() const OVERRIDE; | 132 virtual bool isPressed() const OVERRIDE FINAL; |
133 virtual bool isReadOnly() const OVERRIDE; | 133 virtual bool isReadOnly() const OVERRIDE; |
134 virtual bool isRequired() const OVERRIDE; | 134 virtual bool isRequired() const OVERRIDE FINAL; |
135 | 135 |
136 // Check whether certain properties can be modified. | 136 // Check whether certain properties can be modified. |
137 virtual bool canSetFocusAttribute() const OVERRIDE; | 137 virtual bool canSetFocusAttribute() const OVERRIDE; |
138 virtual bool canSetValueAttribute() const OVERRIDE; | 138 virtual bool canSetValueAttribute() const OVERRIDE; |
139 | 139 |
140 // Properties of static elements. | 140 // Properties of static elements. |
141 virtual bool canvasHasFallbackContent() const OVERRIDE; | 141 virtual bool canvasHasFallbackContent() const OVERRIDE FINAL; |
142 virtual bool exposesTitleUIElement() const OVERRIDE; | 142 virtual bool exposesTitleUIElement() const OVERRIDE; |
143 virtual int headingLevel() const OVERRIDE; | 143 virtual int headingLevel() const OVERRIDE FINAL; |
144 virtual unsigned hierarchicalLevel() const OVERRIDE; | 144 virtual unsigned hierarchicalLevel() const OVERRIDE FINAL; |
145 virtual String text() const OVERRIDE; | 145 virtual String text() const OVERRIDE; |
146 virtual AXObject* titleUIElement() const OVERRIDE; | 146 virtual AXObject* titleUIElement() const OVERRIDE; |
147 | 147 |
148 // Properties of interactive elements. | 148 // Properties of interactive elements. |
149 virtual AccessibilityButtonState checkboxOrRadioValue() const OVERRIDE; | 149 virtual AccessibilityButtonState checkboxOrRadioValue() const OVERRIDE FINAL
; |
150 virtual void colorValue(int& r, int& g, int& b) const OVERRIDE; | 150 virtual void colorValue(int& r, int& g, int& b) const OVERRIDE FINAL; |
151 virtual String valueDescription() const OVERRIDE; | 151 virtual String valueDescription() const OVERRIDE; |
152 virtual float valueForRange() const OVERRIDE; | 152 virtual float valueForRange() const OVERRIDE; |
153 virtual float maxValueForRange() const OVERRIDE; | 153 virtual float maxValueForRange() const OVERRIDE; |
154 virtual float minValueForRange() const OVERRIDE; | 154 virtual float minValueForRange() const OVERRIDE; |
155 virtual String stringValue() const OVERRIDE; | 155 virtual String stringValue() const OVERRIDE; |
156 | 156 |
157 // ARIA attributes. | 157 // ARIA attributes. |
158 virtual String ariaDescribedByAttribute() const; | 158 virtual String ariaDescribedByAttribute() const OVERRIDE FINAL; |
159 virtual String ariaLabeledByAttribute() const OVERRIDE; | 159 virtual String ariaLabeledByAttribute() const OVERRIDE FINAL; |
160 virtual AccessibilityRole ariaRoleAttribute() const OVERRIDE; | 160 virtual AccessibilityRole ariaRoleAttribute() const OVERRIDE FINAL; |
161 | 161 |
162 // Accessibility Text. | 162 // Accessibility Text. |
163 virtual void accessibilityText(Vector<AccessibilityText>&) OVERRIDE; | 163 virtual void accessibilityText(Vector<AccessibilityText>&) OVERRIDE; |
164 virtual String textUnderElement() const OVERRIDE; | 164 virtual String textUnderElement() const OVERRIDE; |
165 | 165 |
166 // Accessibility Text - (To be deprecated). | 166 // Accessibility Text - (To be deprecated). |
167 virtual String accessibilityDescription() const OVERRIDE; | 167 virtual String accessibilityDescription() const OVERRIDE; |
168 virtual String title() const OVERRIDE; | 168 virtual String title() const OVERRIDE; |
169 virtual String helpText() const OVERRIDE; | 169 virtual String helpText() const OVERRIDE; |
170 | 170 |
171 // Location and click point in frame-relative coordinates. | 171 // Location and click point in frame-relative coordinates. |
172 virtual LayoutRect elementRect() const OVERRIDE; | 172 virtual LayoutRect elementRect() const OVERRIDE; |
173 | 173 |
174 // High-level accessibility tree access. | 174 // High-level accessibility tree access. |
175 virtual AXObject* parentObject() const OVERRIDE; | 175 virtual AXObject* parentObject() const OVERRIDE; |
176 virtual AXObject* parentObjectIfExists() const OVERRIDE; | 176 virtual AXObject* parentObjectIfExists() const OVERRIDE; |
177 | 177 |
178 // Low-level accessibility tree exploration. | 178 // Low-level accessibility tree exploration. |
179 virtual AXObject* firstChild() const OVERRIDE; | 179 virtual AXObject* firstChild() const OVERRIDE; |
180 virtual AXObject* nextSibling() const OVERRIDE; | 180 virtual AXObject* nextSibling() const OVERRIDE; |
181 virtual void addChildren() OVERRIDE; | 181 virtual void addChildren() OVERRIDE; |
182 virtual bool canHaveChildren() const OVERRIDE; | 182 virtual bool canHaveChildren() const OVERRIDE; |
183 void addChild(AXObject*); | 183 void addChild(AXObject*); |
184 void insertChild(AXObject*, unsigned index); | 184 void insertChild(AXObject*, unsigned index); |
185 | 185 |
186 // DOM and Render tree access. | 186 // DOM and Render tree access. |
187 virtual Element* actionElement() const OVERRIDE; | 187 virtual Element* actionElement() const OVERRIDE FINAL; |
188 virtual Element* anchorElement() const OVERRIDE; | 188 virtual Element* anchorElement() const OVERRIDE; |
189 virtual Document* document() const OVERRIDE; | 189 virtual Document* document() const OVERRIDE; |
190 virtual Node* node() const OVERRIDE { return m_node; } | 190 virtual Node* node() const OVERRIDE { return m_node; } |
191 | 191 |
192 // Modify or take an action on an object. | 192 // Modify or take an action on an object. |
193 virtual void setFocused(bool) OVERRIDE; | 193 virtual void setFocused(bool) OVERRIDE FINAL; |
194 virtual void increment() OVERRIDE; | 194 virtual void increment() OVERRIDE FINAL; |
195 virtual void decrement() OVERRIDE; | 195 virtual void decrement() OVERRIDE FINAL; |
196 | 196 |
197 // Notifications that this object may have changed. | 197 // Notifications that this object may have changed. |
198 virtual void childrenChanged() OVERRIDE; | 198 virtual void childrenChanged() OVERRIDE; |
199 virtual void selectionChanged() OVERRIDE; | 199 virtual void selectionChanged() OVERRIDE FINAL; |
200 virtual void textChanged() OVERRIDE; | 200 virtual void textChanged() OVERRIDE; |
201 virtual void updateAccessibilityRole() OVERRIDE; | 201 virtual void updateAccessibilityRole() OVERRIDE FINAL; |
202 | 202 |
203 private: | 203 private: |
204 Node* m_node; | 204 Node* m_node; |
205 | 205 |
206 String alternativeTextForWebArea() const; | 206 String alternativeTextForWebArea() const; |
207 void alternativeText(Vector<AccessibilityText>&) const; | 207 void alternativeText(Vector<AccessibilityText>&) const; |
208 void ariaLabeledByText(Vector<AccessibilityText>&) const; | 208 void ariaLabeledByText(Vector<AccessibilityText>&) const; |
209 void changeValueByPercent(float percentChange); | 209 void changeValueByPercent(float percentChange); |
210 void helpText(Vector<AccessibilityText>&) const; | 210 void helpText(Vector<AccessibilityText>&) const; |
211 void titleElementText(Vector<AccessibilityText>&); | 211 void titleElementText(Vector<AccessibilityText>&); |
212 void visibleText(Vector<AccessibilityText>&) const; | 212 void visibleText(Vector<AccessibilityText>&) const; |
213 float stepValueForRange() const; | 213 float stepValueForRange() const; |
214 }; | 214 }; |
215 | 215 |
216 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); | 216 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); |
217 | 217 |
218 } // namespace WebCore | 218 } // namespace WebCore |
219 | 219 |
220 #endif // AXNodeObject_h | 220 #endif // AXNodeObject_h |
OLD | NEW |