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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 class AXObject; | 47 class AXObject; |
48 class AXObjectCacheImpl; | 48 class AXObjectCacheImpl; |
49 class Element; | 49 class Element; |
50 class FrameView; | 50 class FrameView; |
51 class IntPoint; | 51 class IntPoint; |
52 class Node; | 52 class Node; |
53 class LayoutObject; | 53 class LayoutObject; |
54 class ScrollableArea; | 54 class ScrollableArea; |
55 | 55 |
| 56 enum class AOMBooleanProperty; |
56 enum class AOMStringProperty; | 57 enum class AOMStringProperty; |
57 | 58 |
58 typedef unsigned AXID; | 59 typedef unsigned AXID; |
59 | 60 |
60 enum AccessibilityRole { | 61 enum AccessibilityRole { |
61 UnknownRole = 0, | 62 UnknownRole = 0, |
62 AbbrRole, // No mapping to ARIA role. | 63 AbbrRole, // No mapping to ARIA role. |
63 AlertDialogRole, | 64 AlertDialogRole, |
64 AlertRole, | 65 AlertRole, |
65 AnchorRole, // No mapping to ARIA role. | 66 AnchorRole, // No mapping to ARIA role. |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 // cache. | 598 // cache. |
598 AXObjectCacheImpl& axObjectCache() const { | 599 AXObjectCacheImpl& axObjectCache() const { |
599 ASSERT(m_axObjectCache); | 600 ASSERT(m_axObjectCache); |
600 return *m_axObjectCache; | 601 return *m_axObjectCache; |
601 } | 602 } |
602 | 603 |
603 AXID axObjectID() const { return m_id; } | 604 AXID axObjectID() const { return m_id; } |
604 | 605 |
605 // Wrappers that retrieve either an Accessibility Object Model property, | 606 // Wrappers that retrieve either an Accessibility Object Model property, |
606 // or the equivalent ARIA attribute, in that order. | 607 // or the equivalent ARIA attribute, in that order. |
607 // TODO(dmazzoni): Add equivalents for other types of properties besides | |
608 // just strings. | |
609 const AtomicString& getAOMPropertyOrARIAAttribute(AOMStringProperty) const; | 608 const AtomicString& getAOMPropertyOrARIAAttribute(AOMStringProperty) const; |
| 609 bool getAOMPropertyOrARIAAttribute(AOMBooleanProperty, bool& result) const; |
| 610 bool hasAOMPropertyOrARIAAttribute(AOMBooleanProperty) const; |
| 611 bool AOMPropertyOrARIAAttributeIsTrue(AOMBooleanProperty) const; |
| 612 bool AOMPropertyOrARIAAttributeIsFalse(AOMBooleanProperty) const; |
610 | 613 |
611 virtual void getSparseAXAttributes(AXSparseAttributeClient&) const {} | 614 virtual void getSparseAXAttributes(AXSparseAttributeClient&) const {} |
612 | 615 |
613 // Determine subclass type. | 616 // Determine subclass type. |
614 virtual bool isAXNodeObject() const { return false; } | 617 virtual bool isAXNodeObject() const { return false; } |
615 virtual bool isAXLayoutObject() const { return false; } | 618 virtual bool isAXLayoutObject() const { return false; } |
616 virtual bool isAXListBox() const { return false; } | 619 virtual bool isAXListBox() const { return false; } |
617 virtual bool isAXListBoxOption() const { return false; } | 620 virtual bool isAXListBoxOption() const { return false; } |
618 virtual bool isAXRadioInput() const { return false; } | 621 virtual bool isAXRadioInput() const { return false; } |
619 virtual bool isAXSVGRoot() const { return false; } | 622 virtual bool isAXSVGRoot() const { return false; } |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 static unsigned s_numberOfLiveAXObjects; | 1123 static unsigned s_numberOfLiveAXObjects; |
1121 }; | 1124 }; |
1122 | 1125 |
1123 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 1126 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
1124 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ | 1127 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ |
1125 object.predicate) | 1128 object.predicate) |
1126 | 1129 |
1127 } // namespace blink | 1130 } // namespace blink |
1128 | 1131 |
1129 #endif // AXObject_h | 1132 #endif // AXObject_h |
OLD | NEW |