| 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 28 matching lines...) Expand all Loading... |
| 39 class Element; | 39 class Element; |
| 40 class HTMLLabelElement; | 40 class HTMLLabelElement; |
| 41 class LayoutRect; | 41 class LayoutRect; |
| 42 class Node; | 42 class Node; |
| 43 | 43 |
| 44 class MODULES_EXPORT AXNodeObject : public AXObject { | 44 class MODULES_EXPORT AXNodeObject : public AXObject { |
| 45 protected: | 45 protected: |
| 46 AXNodeObject(Node*, AXObjectCacheImpl*); | 46 AXNodeObject(Node*, AXObjectCacheImpl*); |
| 47 | 47 |
| 48 public: | 48 public: |
| 49 static PassRefPtr<AXNodeObject> create(Node*, AXObjectCacheImpl*); | 49 static PassRefPtrWillBeRawPtr<AXNodeObject> create(Node*, AXObjectCacheImpl*
); |
| 50 virtual ~AXNodeObject(); | 50 virtual ~AXNodeObject(); |
| 51 DECLARE_VIRTUAL_TRACE(); |
| 51 | 52 |
| 52 protected: | 53 protected: |
| 53 // Protected data. | 54 // Protected data. |
| 54 AccessibilityRole m_ariaRole; | 55 AccessibilityRole m_ariaRole; |
| 55 bool m_childrenDirty; | 56 bool m_childrenDirty; |
| 56 #if ENABLE(ASSERT) | 57 #if ENABLE(ASSERT) |
| 57 bool m_initialized; | 58 bool m_initialized; |
| 58 #endif | 59 #endif |
| 59 | 60 |
| 60 virtual bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const
override; | 61 virtual bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const
override; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 virtual AccessibilityOptionalBool isAriaGrabbed() const override final; | 164 virtual AccessibilityOptionalBool isAriaGrabbed() const override final; |
| 164 | 165 |
| 165 // Accessibility Text. | 166 // Accessibility Text. |
| 166 virtual String deprecatedTextUnderElement(TextUnderElementMode) const overri
de; | 167 virtual String deprecatedTextUnderElement(TextUnderElementMode) const overri
de; |
| 167 virtual String deprecatedAccessibilityDescription() const override; | 168 virtual String deprecatedAccessibilityDescription() const override; |
| 168 virtual String deprecatedTitle(TextUnderElementMode) const override; | 169 virtual String deprecatedTitle(TextUnderElementMode) const override; |
| 169 virtual String deprecatedHelpText() const override; | 170 virtual String deprecatedHelpText() const override; |
| 170 virtual String computedName() const override; | 171 virtual String computedName() const override; |
| 171 | 172 |
| 172 // New AX name calculation. | 173 // New AX name calculation. |
| 173 virtual String textAlternative(bool recursive, bool inAriaLabelledByTraversa
l, HashSet<AXObject*>& visited, AXNameFrom*, Vector<AXObject*>* nameObjects) ove
rride; | 174 virtual String textAlternative(bool recursive, bool inAriaLabelledByTraversa
l, WillBeHeapHashSet<RawPtrWillBeMember<AXObject>>& visited, AXNameFrom*, WillBe
HeapVector<RawPtrWillBeMember<AXObject>>* nameObjects) override; |
| 174 | 175 |
| 175 // Location and click point in frame-relative coordinates. | 176 // Location and click point in frame-relative coordinates. |
| 176 virtual LayoutRect elementRect() const override; | 177 virtual LayoutRect elementRect() const override; |
| 177 | 178 |
| 178 // High-level accessibility tree access. | 179 // High-level accessibility tree access. |
| 179 virtual AXObject* computeParent() const override; | 180 virtual AXObject* computeParent() const override; |
| 180 virtual AXObject* computeParentIfExists() const override; | 181 virtual AXObject* computeParentIfExists() const override; |
| 181 | 182 |
| 182 // Low-level accessibility tree exploration. | 183 // Low-level accessibility tree exploration. |
| 183 virtual AXObject* firstChild() const override; | 184 virtual AXObject* firstChild() const override; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 205 virtual void updateAccessibilityRole() override final; | 206 virtual void updateAccessibilityRole() override final; |
| 206 | 207 |
| 207 // Position in set and Size of set | 208 // Position in set and Size of set |
| 208 virtual int posInSet() const override; | 209 virtual int posInSet() const override; |
| 209 virtual int setSize() const override; | 210 virtual int setSize() const override; |
| 210 | 211 |
| 211 // Aria-owns. | 212 // Aria-owns. |
| 212 void computeAriaOwnsChildren(Vector<AXObject*>& ownedChildren); | 213 void computeAriaOwnsChildren(Vector<AXObject*>& ownedChildren); |
| 213 | 214 |
| 214 private: | 215 private: |
| 215 Node* m_node; | 216 RawPtrWillBeMember<Node> m_node; |
| 216 | 217 |
| 217 String alternativeTextForWebArea() const; | 218 String alternativeTextForWebArea() const; |
| 218 void alternativeText(Vector<AccessibilityText>&) const; | 219 void alternativeText(WillBeHeapVector<OwnPtrWillBeMember<AccessibilityText>>
&) const; |
| 219 void ariaLabeledByText(Vector<AccessibilityText>&) const; | 220 void ariaLabeledByText(WillBeHeapVector<OwnPtrWillBeMember<AccessibilityText
>>&) const; |
| 220 float stepValueForRange() const; | 221 float stepValueForRange() const; |
| 221 AXObject* findChildWithTagName(const HTMLQualifiedName&) const; | 222 AXObject* findChildWithTagName(const HTMLQualifiedName&) const; |
| 222 bool isDescendantOfElementType(const HTMLQualifiedName& tagName) const; | 223 bool isDescendantOfElementType(const HTMLQualifiedName& tagName) const; |
| 223 }; | 224 }; |
| 224 | 225 |
| 225 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); | 226 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); |
| 226 | 227 |
| 227 } // namespace blink | 228 } // namespace blink |
| 228 | 229 |
| 229 #endif // AXNodeObject_h | 230 #endif // AXNodeObject_h |
| OLD | NEW |