Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObjectImpl.h

Issue 2088453002: Implement the inert attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert histograms.xml Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 kAXAriaHidden, 147 kAXAriaHiddenElement,
148 kAXAriaHiddenRoot, 148 kAXAriaHiddenSubtree,
149 kAXEmptyAlt, 149 kAXEmptyAlt,
150 kAXEmptyText, 150 kAXEmptyText,
151 kAXInert, 151 kAXInertElement,
152 kAXInertSubtree,
152 kAXInheritsPresentation, 153 kAXInheritsPresentation,
153 kAXLabelContainer, 154 kAXLabelContainer,
154 kAXLabelFor, 155 kAXLabelFor,
155 kAXNotRendered, 156 kAXNotRendered,
156 kAXNotVisible, 157 kAXNotVisible,
157 kAXPresentationalRole, 158 kAXPresentationalRole,
158 kAXProbablyPresentational, 159 kAXProbablyPresentational,
159 kAXStaticTextUsedAsNameFor, 160 kAXStaticTextUsedAsNameFor,
160 kAXUninteresting 161 kAXUninteresting
161 }; 162 };
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 virtual bool IsSelectedOptionActive() const { return false; } 459 virtual bool IsSelectedOptionActive() const { return false; }
459 virtual bool IsVisible() const { return true; } 460 virtual bool IsVisible() const { return true; }
460 virtual bool IsVisited() const { return false; } 461 virtual bool IsVisited() const { return false; }
461 462
462 // Check whether certain properties can be modified. 463 // Check whether certain properties can be modified.
463 virtual bool CanSetFocusAttribute() const { return false; } 464 virtual bool CanSetFocusAttribute() const { return false; }
464 virtual bool CanSetValueAttribute() const { return false; } 465 virtual bool CanSetValueAttribute() const { return false; }
465 virtual bool CanSetSelectedAttribute() const { return false; } 466 virtual bool CanSetSelectedAttribute() const { return false; }
466 467
467 // Whether objects are ignored, i.e. not included in the tree. 468 // Whether objects are ignored, i.e. not included in the tree.
468 bool AccessibilityIsIgnored() const; 469 bool AccessibilityIsIgnored();
469 typedef HeapVector<IgnoredReason> IgnoredReasons; 470 typedef HeapVector<IgnoredReason> IgnoredReasons;
470 virtual bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const { 471 virtual bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const {
471 return true; 472 return true;
472 } 473 }
473 bool AccessibilityIsIgnoredByDefault(IgnoredReasons* = nullptr) const; 474 bool AccessibilityIsIgnoredByDefault(IgnoredReasons* = nullptr) const;
474 AXObjectInclusion AccessibilityPlatformIncludesObject() const; 475 AXObjectInclusion AccessibilityPlatformIncludesObject() const;
475 virtual AXObjectInclusion DefaultObjectInclusion( 476 virtual AXObjectInclusion DefaultObjectInclusion(
476 IgnoredReasons* = nullptr) const; 477 IgnoredReasons* = nullptr) const;
477 bool IsInertOrAriaHidden() const; 478 bool IsInertOrAriaHidden() const;
478 const AXObjectImpl* AriaHiddenRoot() const; 479 const AXObjectImpl* AriaHiddenRoot() const;
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 852
852 bool CanReceiveAccessibilityFocus() const; 853 bool CanReceiveAccessibilityFocus() const;
853 bool NameFromContents(bool recursive) const; 854 bool NameFromContents(bool recursive) const;
854 855
855 AccessibilityRole ButtonRoleType() const; 856 AccessibilityRole ButtonRoleType() const;
856 857
857 virtual LayoutObject* LayoutObjectForRelativeBounds() const { 858 virtual LayoutObject* LayoutObjectForRelativeBounds() const {
858 return nullptr; 859 return nullptr;
859 } 860 }
860 861
862 const AXObjectImpl* InertRoot() const;
863
861 mutable Member<AXObjectImpl> parent_; 864 mutable Member<AXObjectImpl> parent_;
862 865
863 // The following cached attribute values (the ones starting with m_cached*) 866 // The following cached attribute values (the ones starting with m_cached*)
864 // are only valid if m_lastModificationCount matches 867 // are only valid if m_lastModificationCount matches
865 // AXObjectCacheImpl::modificationCount(). 868 // AXObjectCacheImpl::modificationCount().
866 mutable int last_modification_count_; 869 mutable int last_modification_count_;
867 mutable RGBA32 cached_background_color_; 870 mutable RGBA32 cached_background_color_;
868 mutable bool cached_is_ignored_ : 1; 871 mutable bool cached_is_ignored_ : 1;
869 mutable bool cached_is_inert_or_aria_hidden_ : 1; 872 mutable bool cached_is_inert_or_aria_hidden_ : 1;
870 mutable bool cached_is_descendant_of_leaf_node_ : 1; 873 mutable bool cached_is_descendant_of_leaf_node_ : 1;
(...skipping 20 matching lines...) Expand all
891 894
892 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true); 895 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true);
893 896
894 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 897 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
895 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \ 898 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \
896 object.predicate) 899 object.predicate)
897 900
898 } // namespace blink 901 } // namespace blink
899 902
900 #endif // AXObjectImpl_h 903 #endif // AXObjectImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698