Chromium Code Reviews| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 virtual AccessibilityOptionalBool isAriaGrabbed() const override final; | 161 virtual AccessibilityOptionalBool isAriaGrabbed() const override final; |
| 161 | 162 |
| 162 // Accessibility Text. | 163 // Accessibility Text. |
| 163 virtual String deprecatedTextUnderElement(TextUnderElementMode) const overri de; | 164 virtual String deprecatedTextUnderElement(TextUnderElementMode) const overri de; |
| 164 virtual String deprecatedAccessibilityDescription() const override; | 165 virtual String deprecatedAccessibilityDescription() const override; |
| 165 virtual String deprecatedTitle(TextUnderElementMode) const override; | 166 virtual String deprecatedTitle(TextUnderElementMode) const override; |
| 166 virtual String deprecatedHelpText() const override; | 167 virtual String deprecatedHelpText() const override; |
| 167 virtual String computedName() const override; | 168 virtual String computedName() const override; |
| 168 | 169 |
| 169 // New AX name calculation. | 170 // New AX name calculation. |
| 170 virtual String textAlternative(bool recursive, bool inAriaLabelledByTraversa l, HashSet<AXObject*>& visited, AXNameFrom*, Vector<AXObject*>* nameObjects) ove rride; | 171 virtual String textAlternative(bool recursive, bool inAriaLabelledByTraversa l, WillBeHeapHashSet<RawPtrWillBeMember<AXObject>>& visited, AXNameFrom*, WillBe HeapVector<RawPtrWillBeMember<AXObject>>* nameObjects) override; |
| 171 | 172 |
| 172 // Location and click point in frame-relative coordinates. | 173 // Location and click point in frame-relative coordinates. |
| 173 virtual LayoutRect elementRect() const override; | 174 virtual LayoutRect elementRect() const override; |
| 174 | 175 |
| 175 // High-level accessibility tree access. | 176 // High-level accessibility tree access. |
| 176 virtual AXObject* computeParent() const override; | 177 virtual AXObject* computeParent() const override; |
| 177 virtual AXObject* computeParentIfExists() const override; | 178 virtual AXObject* computeParentIfExists() const override; |
| 178 | 179 |
| 179 // Low-level accessibility tree exploration. | 180 // Low-level accessibility tree exploration. |
| 180 virtual AXObject* firstChild() const override; | 181 virtual AXObject* firstChild() const override; |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 199 virtual void childrenChanged() override; | 200 virtual void childrenChanged() override; |
| 200 virtual void selectionChanged() override final; | 201 virtual void selectionChanged() override final; |
| 201 virtual void textChanged() override; | 202 virtual void textChanged() override; |
| 202 virtual void updateAccessibilityRole() override final; | 203 virtual void updateAccessibilityRole() override final; |
| 203 | 204 |
| 204 // Position in set and Size of set | 205 // Position in set and Size of set |
| 205 virtual int posInSet() const override; | 206 virtual int posInSet() const override; |
| 206 virtual int setSize() const override; | 207 virtual int setSize() const override; |
| 207 | 208 |
| 208 private: | 209 private: |
| 209 Node* m_node; | 210 RawPtrWillBeWeakMember<Node> m_node; |
|
haraken
2015/05/28 10:48:40
Why does this need to be weak?
What confuses me i
| |
| 210 | 211 |
| 211 String alternativeTextForWebArea() const; | 212 String alternativeTextForWebArea() const; |
| 212 void alternativeText(Vector<AccessibilityText>&) const; | 213 void alternativeText(WillBeHeapVector<OwnPtrWillBeMember<AccessibilityText>> &) const; |
| 213 void ariaLabeledByText(Vector<AccessibilityText>&) const; | 214 void ariaLabeledByText(WillBeHeapVector<OwnPtrWillBeMember<AccessibilityText >>&) const; |
| 214 float stepValueForRange() const; | 215 float stepValueForRange() const; |
| 215 AXObject* findChildWithTagName(const HTMLQualifiedName&) const; | 216 AXObject* findChildWithTagName(const HTMLQualifiedName&) const; |
| 216 bool isDescendantOfElementType(const HTMLQualifiedName& tagName) const; | 217 bool isDescendantOfElementType(const HTMLQualifiedName& tagName) const; |
| 217 }; | 218 }; |
| 218 | 219 |
| 219 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); | 220 DEFINE_AX_OBJECT_TYPE_CASTS(AXNodeObject, isAXNodeObject()); |
| 220 | 221 |
| 221 } // namespace blink | 222 } // namespace blink |
| 222 | 223 |
| 223 #endif // AXNodeObject_h | 224 #endif // AXNodeObject_h |
| OLD | NEW |