OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. |
4 * Copyright (C) 2008 Nuanti Ltd. | 4 * Copyright (C) 2008 Nuanti Ltd. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 kAXTextFromNativeHTMLLabelWrapped, | 137 kAXTextFromNativeHTMLLabelWrapped, |
138 kAXTextFromNativeHTMLLegend, | 138 kAXTextFromNativeHTMLLegend, |
139 kAXTextFromNativeHTMLTableCaption, | 139 kAXTextFromNativeHTMLTableCaption, |
140 kAXTextFromNativeHTMLTitleElement, | 140 kAXTextFromNativeHTMLTitleElement, |
141 }; | 141 }; |
142 | 142 |
143 enum AXIgnoredReason { | 143 enum AXIgnoredReason { |
144 kAXActiveModalDialog, | 144 kAXActiveModalDialog, |
145 kAXAncestorDisallowsChild, | 145 kAXAncestorDisallowsChild, |
146 kAXAncestorIsLeafNode, | 146 kAXAncestorIsLeafNode, |
147 kAXAriaHiddenElement, | 147 kAXAriaHidden, |
148 kAXAriaHiddenSubtree, | 148 kAXAriaHiddenRoot, |
149 kAXEmptyAlt, | 149 kAXEmptyAlt, |
150 kAXEmptyText, | 150 kAXEmptyText, |
151 kAXInertElement, | 151 kAXInert, |
152 kAXInertSubtree, | |
153 kAXInheritsPresentation, | 152 kAXInheritsPresentation, |
154 kAXLabelContainer, | 153 kAXLabelContainer, |
155 kAXLabelFor, | 154 kAXLabelFor, |
156 kAXNotRendered, | 155 kAXNotRendered, |
157 kAXNotVisible, | 156 kAXNotVisible, |
158 kAXPresentationalRole, | 157 kAXPresentationalRole, |
159 kAXProbablyPresentational, | 158 kAXProbablyPresentational, |
160 kAXStaticTextUsedAsNameFor, | 159 kAXStaticTextUsedAsNameFor, |
161 kAXUninteresting | 160 kAXUninteresting |
162 }; | 161 }; |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 virtual bool IsSelectedOptionActive() const { return false; } | 458 virtual bool IsSelectedOptionActive() const { return false; } |
460 virtual bool IsVisible() const { return true; } | 459 virtual bool IsVisible() const { return true; } |
461 virtual bool IsVisited() const { return false; } | 460 virtual bool IsVisited() const { return false; } |
462 | 461 |
463 // Check whether certain properties can be modified. | 462 // Check whether certain properties can be modified. |
464 virtual bool CanSetFocusAttribute() const { return false; } | 463 virtual bool CanSetFocusAttribute() const { return false; } |
465 virtual bool CanSetValueAttribute() const { return false; } | 464 virtual bool CanSetValueAttribute() const { return false; } |
466 virtual bool CanSetSelectedAttribute() const { return false; } | 465 virtual bool CanSetSelectedAttribute() const { return false; } |
467 | 466 |
468 // Whether objects are ignored, i.e. not included in the tree. | 467 // Whether objects are ignored, i.e. not included in the tree. |
469 bool AccessibilityIsIgnored(); | 468 bool AccessibilityIsIgnored() const; |
470 typedef HeapVector<IgnoredReason> IgnoredReasons; | 469 typedef HeapVector<IgnoredReason> IgnoredReasons; |
471 virtual bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const { | 470 virtual bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const { |
472 return true; | 471 return true; |
473 } | 472 } |
474 bool AccessibilityIsIgnoredByDefault(IgnoredReasons* = nullptr) const; | 473 bool AccessibilityIsIgnoredByDefault(IgnoredReasons* = nullptr) const; |
475 AXObjectInclusion AccessibilityPlatformIncludesObject() const; | 474 AXObjectInclusion AccessibilityPlatformIncludesObject() const; |
476 virtual AXObjectInclusion DefaultObjectInclusion( | 475 virtual AXObjectInclusion DefaultObjectInclusion( |
477 IgnoredReasons* = nullptr) const; | 476 IgnoredReasons* = nullptr) const; |
478 bool IsInertOrAriaHidden() const; | 477 bool IsInertOrAriaHidden() const; |
479 const AXObjectImpl* AriaHiddenRoot() const; | 478 const AXObjectImpl* AriaHiddenRoot() const; |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 | 849 |
851 bool CanReceiveAccessibilityFocus() const; | 850 bool CanReceiveAccessibilityFocus() const; |
852 bool NameFromContents(bool recursive) const; | 851 bool NameFromContents(bool recursive) const; |
853 | 852 |
854 AccessibilityRole ButtonRoleType() const; | 853 AccessibilityRole ButtonRoleType() const; |
855 | 854 |
856 virtual LayoutObject* LayoutObjectForRelativeBounds() const { | 855 virtual LayoutObject* LayoutObjectForRelativeBounds() const { |
857 return nullptr; | 856 return nullptr; |
858 } | 857 } |
859 | 858 |
860 const AXObjectImpl* InertRoot() const; | |
861 | |
862 mutable Member<AXObjectImpl> parent_; | 859 mutable Member<AXObjectImpl> parent_; |
863 | 860 |
864 // The following cached attribute values (the ones starting with m_cached*) | 861 // The following cached attribute values (the ones starting with m_cached*) |
865 // are only valid if m_lastModificationCount matches | 862 // are only valid if m_lastModificationCount matches |
866 // AXObjectCacheImpl::modificationCount(). | 863 // AXObjectCacheImpl::modificationCount(). |
867 mutable int last_modification_count_; | 864 mutable int last_modification_count_; |
868 mutable RGBA32 cached_background_color_; | 865 mutable RGBA32 cached_background_color_; |
869 mutable bool cached_is_ignored_ : 1; | 866 mutable bool cached_is_ignored_ : 1; |
870 mutable bool cached_is_inert_or_aria_hidden_ : 1; | 867 mutable bool cached_is_inert_or_aria_hidden_ : 1; |
871 mutable bool cached_is_descendant_of_leaf_node_ : 1; | 868 mutable bool cached_is_descendant_of_leaf_node_ : 1; |
(...skipping 20 matching lines...) Expand all Loading... |
892 | 889 |
893 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true); | 890 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true); |
894 | 891 |
895 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 892 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
896 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \ | 893 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \ |
897 object.predicate) | 894 object.predicate) |
898 | 895 |
899 } // namespace blink | 896 } // namespace blink |
900 | 897 |
901 #endif // AXObjectImpl_h | 898 #endif // AXObjectImpl_h |
OLD | NEW |