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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 kAXDescriptionFromUninitialized = -1, | 394 kAXDescriptionFromUninitialized = -1, |
395 kAXDescriptionFromAttribute = 0, | 395 kAXDescriptionFromAttribute = 0, |
396 kAXDescriptionFromContents, | 396 kAXDescriptionFromContents, |
397 kAXDescriptionFromRelatedElement, | 397 kAXDescriptionFromRelatedElement, |
398 }; | 398 }; |
399 | 399 |
400 enum AXIgnoredReason { | 400 enum AXIgnoredReason { |
401 kAXActiveModalDialog, | 401 kAXActiveModalDialog, |
402 kAXAncestorDisallowsChild, | 402 kAXAncestorDisallowsChild, |
403 kAXAncestorIsLeafNode, | 403 kAXAncestorIsLeafNode, |
404 kAXAriaHidden, | 404 kAXAriaHiddenElement, |
405 kAXAriaHiddenRoot, | 405 kAXAriaHiddenSubtree, |
406 kAXEmptyAlt, | 406 kAXEmptyAlt, |
407 kAXEmptyText, | 407 kAXEmptyText, |
408 kAXInert, | 408 kAXInertElement, |
| 409 kAXInertSubtree, |
409 kAXInheritsPresentation, | 410 kAXInheritsPresentation, |
410 kAXLabelContainer, | 411 kAXLabelContainer, |
411 kAXLabelFor, | 412 kAXLabelFor, |
412 kAXNotRendered, | 413 kAXNotRendered, |
413 kAXNotVisible, | 414 kAXNotVisible, |
414 kAXPresentationalRole, | 415 kAXPresentationalRole, |
415 kAXProbablyPresentational, | 416 kAXProbablyPresentational, |
416 kAXStaticTextUsedAsNameFor, | 417 kAXStaticTextUsedAsNameFor, |
417 kAXUninteresting | 418 kAXUninteresting |
418 }; | 419 }; |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 virtual bool IsSelectedOptionActive() const { return false; } | 712 virtual bool IsSelectedOptionActive() const { return false; } |
712 virtual bool IsVisible() const { return true; } | 713 virtual bool IsVisible() const { return true; } |
713 virtual bool IsVisited() const { return false; } | 714 virtual bool IsVisited() const { return false; } |
714 | 715 |
715 // Check whether certain properties can be modified. | 716 // Check whether certain properties can be modified. |
716 virtual bool CanSetFocusAttribute() const { return false; } | 717 virtual bool CanSetFocusAttribute() const { return false; } |
717 virtual bool CanSetValueAttribute() const { return false; } | 718 virtual bool CanSetValueAttribute() const { return false; } |
718 virtual bool CanSetSelectedAttribute() const { return false; } | 719 virtual bool CanSetSelectedAttribute() const { return false; } |
719 | 720 |
720 // Whether objects are ignored, i.e. not included in the tree. | 721 // Whether objects are ignored, i.e. not included in the tree. |
721 bool AccessibilityIsIgnored() const; | 722 bool AccessibilityIsIgnored(); |
722 typedef HeapVector<IgnoredReason> IgnoredReasons; | 723 typedef HeapVector<IgnoredReason> IgnoredReasons; |
723 virtual bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const { | 724 virtual bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const { |
724 return true; | 725 return true; |
725 } | 726 } |
726 bool AccessibilityIsIgnoredByDefault(IgnoredReasons* = nullptr) const; | 727 bool AccessibilityIsIgnoredByDefault(IgnoredReasons* = nullptr) const; |
727 AXObjectInclusion AccessibilityPlatformIncludesObject() const; | 728 AXObjectInclusion AccessibilityPlatformIncludesObject() const; |
728 virtual AXObjectInclusion DefaultObjectInclusion( | 729 virtual AXObjectInclusion DefaultObjectInclusion( |
729 IgnoredReasons* = nullptr) const; | 730 IgnoredReasons* = nullptr) const; |
730 bool IsInertOrAriaHidden() const; | 731 bool IsInertOrAriaHidden() const; |
731 const AXObjectImpl* AriaHiddenRoot() const; | 732 const AXObjectImpl* AriaHiddenRoot() const; |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 | 1103 |
1103 bool CanReceiveAccessibilityFocus() const; | 1104 bool CanReceiveAccessibilityFocus() const; |
1104 bool NameFromContents(bool recursive) const; | 1105 bool NameFromContents(bool recursive) const; |
1105 | 1106 |
1106 AccessibilityRole ButtonRoleType() const; | 1107 AccessibilityRole ButtonRoleType() const; |
1107 | 1108 |
1108 virtual LayoutObject* LayoutObjectForRelativeBounds() const { | 1109 virtual LayoutObject* LayoutObjectForRelativeBounds() const { |
1109 return nullptr; | 1110 return nullptr; |
1110 } | 1111 } |
1111 | 1112 |
| 1113 const AXObjectImpl* InertRoot() const; |
| 1114 |
1112 mutable Member<AXObjectImpl> parent_; | 1115 mutable Member<AXObjectImpl> parent_; |
1113 | 1116 |
1114 // The following cached attribute values (the ones starting with m_cached*) | 1117 // The following cached attribute values (the ones starting with m_cached*) |
1115 // are only valid if m_lastModificationCount matches | 1118 // are only valid if m_lastModificationCount matches |
1116 // AXObjectCacheImpl::modificationCount(). | 1119 // AXObjectCacheImpl::modificationCount(). |
1117 mutable int last_modification_count_; | 1120 mutable int last_modification_count_; |
1118 mutable RGBA32 cached_background_color_; | 1121 mutable RGBA32 cached_background_color_; |
1119 mutable bool cached_is_ignored_ : 1; | 1122 mutable bool cached_is_ignored_ : 1; |
1120 mutable bool cached_is_inert_or_aria_hidden_ : 1; | 1123 mutable bool cached_is_inert_or_aria_hidden_ : 1; |
1121 mutable bool cached_is_descendant_of_leaf_node_ : 1; | 1124 mutable bool cached_is_descendant_of_leaf_node_ : 1; |
(...skipping 20 matching lines...) Expand all Loading... |
1142 | 1145 |
1143 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true); | 1146 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true); |
1144 | 1147 |
1145 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 1148 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
1146 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \ | 1149 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \ |
1147 object.predicate) | 1150 object.predicate) |
1148 | 1151 |
1149 } // namespace blink | 1152 } // namespace blink |
1150 | 1153 |
1151 #endif // AXObjectImpl_h | 1154 #endif // AXObjectImpl_h |
OLD | NEW |