| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nuanti Ltd. | 3 * Copyright (C) 2008 Nuanti Ltd. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #ifndef AXObject_h | 30 #ifndef AXObject_h |
| 31 #define AXObject_h | 31 #define AXObject_h |
| 32 | 32 |
| 33 #include "core/editing/VisiblePosition.h" | 33 #include "core/editing/VisiblePosition.h" |
| 34 #include "core/editing/markers/DocumentMarker.h" | 34 #include "core/editing/markers/DocumentMarker.h" |
| 35 #include "core/inspector/protocol/Accessibility.h" | 35 #include "core/inspector/protocol/Accessibility.h" |
| 36 #include "modules/ModulesExport.h" | 36 #include "modules/ModulesExport.h" |
| 37 #include "modules/accessibility/AccessibleNode.h" |
| 37 #include "platform/geometry/FloatQuad.h" | 38 #include "platform/geometry/FloatQuad.h" |
| 38 #include "platform/geometry/LayoutRect.h" | 39 #include "platform/geometry/LayoutRect.h" |
| 39 #include "platform/graphics/Color.h" | 40 #include "platform/graphics/Color.h" |
| 40 #include "wtf/Forward.h" | 41 #include "wtf/Forward.h" |
| 41 #include "wtf/Vector.h" | 42 #include "wtf/Vector.h" |
| 42 | 43 |
| 43 class SkMatrix44; | 44 class SkMatrix44; |
| 44 | 45 |
| 45 namespace blink { | 46 namespace blink { |
| 46 | 47 |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 | 593 |
| 593 // The AXObjectCacheImpl that owns this object, and its unique ID within this | 594 // The AXObjectCacheImpl that owns this object, and its unique ID within this |
| 594 // cache. | 595 // cache. |
| 595 AXObjectCacheImpl& axObjectCache() const { | 596 AXObjectCacheImpl& axObjectCache() const { |
| 596 ASSERT(m_axObjectCache); | 597 ASSERT(m_axObjectCache); |
| 597 return *m_axObjectCache; | 598 return *m_axObjectCache; |
| 598 } | 599 } |
| 599 | 600 |
| 600 AXID axObjectID() const { return m_id; } | 601 AXID axObjectID() const { return m_id; } |
| 601 | 602 |
| 603 // Accessibility Object Model AccessibleNode interface |
| 604 AccessibleNode* getAccessibleNode() const { return m_accessibleNode; } |
| 605 void setAccessibleNode(AccessibleNode* wrapper) { |
| 606 m_accessibleNode = wrapper; |
| 607 } |
| 608 // Wrappers that retrieve either an Accessibility Object Model property |
| 609 // or an ARIA attribute, checking in that order. |
| 610 const AtomicString& getAomPropertyOrAriaAttribute(AomStringProperty) const; |
| 611 |
| 602 virtual void getSparseAXAttributes(AXSparseAttributeClient&) const {} | 612 virtual void getSparseAXAttributes(AXSparseAttributeClient&) const {} |
| 603 | 613 |
| 604 // Determine subclass type. | 614 // Determine subclass type. |
| 605 virtual bool isAXNodeObject() const { return false; } | 615 virtual bool isAXNodeObject() const { return false; } |
| 606 virtual bool isAXLayoutObject() const { return false; } | 616 virtual bool isAXLayoutObject() const { return false; } |
| 607 virtual bool isAXListBox() const { return false; } | 617 virtual bool isAXListBox() const { return false; } |
| 608 virtual bool isAXListBoxOption() const { return false; } | 618 virtual bool isAXListBoxOption() const { return false; } |
| 609 virtual bool isAXRadioInput() const { return false; } | 619 virtual bool isAXRadioInput() const { return false; } |
| 610 virtual bool isAXSVGRoot() const { return false; } | 620 virtual bool isAXSVGRoot() const { return false; } |
| 611 | 621 |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 virtual bool nameFromContents() const; | 1081 virtual bool nameFromContents() const; |
| 1072 | 1082 |
| 1073 AccessibilityRole buttonRoleType() const; | 1083 AccessibilityRole buttonRoleType() const; |
| 1074 | 1084 |
| 1075 virtual LayoutObject* layoutObjectForRelativeBounds() const { | 1085 virtual LayoutObject* layoutObjectForRelativeBounds() const { |
| 1076 return nullptr; | 1086 return nullptr; |
| 1077 } | 1087 } |
| 1078 | 1088 |
| 1079 mutable Member<AXObject> m_parent; | 1089 mutable Member<AXObject> m_parent; |
| 1080 | 1090 |
| 1091 Member<AccessibleNode> m_accessibleNode; |
| 1092 |
| 1081 // The following cached attribute values (the ones starting with m_cached*) | 1093 // The following cached attribute values (the ones starting with m_cached*) |
| 1082 // are only valid if m_lastModificationCount matches | 1094 // are only valid if m_lastModificationCount matches |
| 1083 // AXObjectCacheImpl::modificationCount(). | 1095 // AXObjectCacheImpl::modificationCount(). |
| 1084 mutable int m_lastModificationCount; | 1096 mutable int m_lastModificationCount; |
| 1085 mutable RGBA32 m_cachedBackgroundColor; | 1097 mutable RGBA32 m_cachedBackgroundColor; |
| 1086 mutable bool m_cachedIsIgnored : 1; | 1098 mutable bool m_cachedIsIgnored : 1; |
| 1087 mutable bool m_cachedIsInertOrAriaHidden : 1; | 1099 mutable bool m_cachedIsInertOrAriaHidden : 1; |
| 1088 mutable bool m_cachedIsDescendantOfLeafNode : 1; | 1100 mutable bool m_cachedIsDescendantOfLeafNode : 1; |
| 1089 mutable bool m_cachedIsDescendantOfDisabledNode : 1; | 1101 mutable bool m_cachedIsDescendantOfDisabledNode : 1; |
| 1090 mutable bool m_cachedHasInheritedPresentationalRole : 1; | 1102 mutable bool m_cachedHasInheritedPresentationalRole : 1; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1106 static unsigned s_numberOfLiveAXObjects; | 1118 static unsigned s_numberOfLiveAXObjects; |
| 1107 }; | 1119 }; |
| 1108 | 1120 |
| 1109 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 1121 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 1110 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ | 1122 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ |
| 1111 object.predicate) | 1123 object.predicate) |
| 1112 | 1124 |
| 1113 } // namespace blink | 1125 } // namespace blink |
| 1114 | 1126 |
| 1115 #endif // AXObject_h | 1127 #endif // AXObject_h |
| OLD | NEW |