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

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

Issue 2088453002: Implement the inert attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update generic test expectations 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 * 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 kAXDescriptionFromUninitialized = -1, 392 kAXDescriptionFromUninitialized = -1,
393 kAXDescriptionFromAttribute = 0, 393 kAXDescriptionFromAttribute = 0,
394 kAXDescriptionFromContents, 394 kAXDescriptionFromContents,
395 kAXDescriptionFromRelatedElement, 395 kAXDescriptionFromRelatedElement,
396 }; 396 };
397 397
398 enum AXIgnoredReason { 398 enum AXIgnoredReason {
399 kAXActiveModalDialog, 399 kAXActiveModalDialog,
400 kAXAncestorDisallowsChild, 400 kAXAncestorDisallowsChild,
401 kAXAncestorIsLeafNode, 401 kAXAncestorIsLeafNode,
402 kAXAriaHidden, 402 kAXAriaHiddenElement,
403 kAXAriaHiddenRoot, 403 kAXAriaHiddenSubtree,
404 kAXEmptyAlt, 404 kAXEmptyAlt,
405 kAXEmptyText, 405 kAXEmptyText,
406 kAXInert, 406 kAXInertElement,
407 kAXInertSubtree,
407 kAXInheritsPresentation, 408 kAXInheritsPresentation,
408 kAXLabelContainer, 409 kAXLabelContainer,
409 kAXLabelFor, 410 kAXLabelFor,
410 kAXNotRendered, 411 kAXNotRendered,
411 kAXNotVisible, 412 kAXNotVisible,
412 kAXPresentationalRole, 413 kAXPresentationalRole,
413 kAXProbablyPresentational, 414 kAXProbablyPresentational,
414 kAXStaticTextUsedAsNameFor, 415 kAXStaticTextUsedAsNameFor,
415 kAXUninteresting 416 kAXUninteresting
416 }; 417 };
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 virtual bool IsSelectedOptionActive() const { return false; } 706 virtual bool IsSelectedOptionActive() const { return false; }
706 virtual bool IsVisible() const { return true; } 707 virtual bool IsVisible() const { return true; }
707 virtual bool IsVisited() const { return false; } 708 virtual bool IsVisited() const { return false; }
708 709
709 // Check whether certain properties can be modified. 710 // Check whether certain properties can be modified.
710 virtual bool CanSetFocusAttribute() const { return false; } 711 virtual bool CanSetFocusAttribute() const { return false; }
711 virtual bool CanSetValueAttribute() const { return false; } 712 virtual bool CanSetValueAttribute() const { return false; }
712 virtual bool CanSetSelectedAttribute() const { return false; } 713 virtual bool CanSetSelectedAttribute() const { return false; }
713 714
714 // Whether objects are ignored, i.e. not included in the tree. 715 // Whether objects are ignored, i.e. not included in the tree.
715 bool AccessibilityIsIgnored() const; 716 bool AccessibilityIsIgnored();
716 typedef HeapVector<IgnoredReason> IgnoredReasons; 717 typedef HeapVector<IgnoredReason> IgnoredReasons;
717 virtual bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const { 718 virtual bool ComputeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const {
718 return true; 719 return true;
719 } 720 }
720 bool AccessibilityIsIgnoredByDefault(IgnoredReasons* = nullptr) const; 721 bool AccessibilityIsIgnoredByDefault(IgnoredReasons* = nullptr) const;
721 AXObjectInclusion AccessibilityPlatformIncludesObject() const; 722 AXObjectInclusion AccessibilityPlatformIncludesObject() const;
722 virtual AXObjectInclusion DefaultObjectInclusion( 723 virtual AXObjectInclusion DefaultObjectInclusion(
723 IgnoredReasons* = nullptr) const; 724 IgnoredReasons* = nullptr) const;
724 bool IsInertOrAriaHidden() const; 725 bool IsInertOrAriaHidden() const;
725 const AXObject* AriaHiddenRoot() const; 726 const AXObject* AriaHiddenRoot() const;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 virtual const AXObject* InheritsPresentationalRoleFrom() const { return 0; } 1091 virtual const AXObject* InheritsPresentationalRoleFrom() const { return 0; }
1091 1092
1092 virtual bool NameFromContents() const; 1093 virtual bool NameFromContents() const;
1093 1094
1094 AccessibilityRole ButtonRoleType() const; 1095 AccessibilityRole ButtonRoleType() const;
1095 1096
1096 virtual LayoutObject* LayoutObjectForRelativeBounds() const { 1097 virtual LayoutObject* LayoutObjectForRelativeBounds() const {
1097 return nullptr; 1098 return nullptr;
1098 } 1099 }
1099 1100
1101 const AXObject* InertRoot() const;
1102
1100 mutable Member<AXObject> parent_; 1103 mutable Member<AXObject> parent_;
1101 1104
1102 // The following cached attribute values (the ones starting with m_cached*) 1105 // The following cached attribute values (the ones starting with m_cached*)
1103 // are only valid if m_lastModificationCount matches 1106 // are only valid if m_lastModificationCount matches
1104 // AXObjectCacheImpl::modificationCount(). 1107 // AXObjectCacheImpl::modificationCount().
1105 mutable int last_modification_count_; 1108 mutable int last_modification_count_;
1106 mutable RGBA32 cached_background_color_; 1109 mutable RGBA32 cached_background_color_;
1107 mutable bool cached_is_ignored_ : 1; 1110 mutable bool cached_is_ignored_ : 1;
1108 mutable bool cached_is_inert_or_aria_hidden_ : 1; 1111 mutable bool cached_is_inert_or_aria_hidden_ : 1;
1109 mutable bool cached_is_descendant_of_leaf_node_ : 1; 1112 mutable bool cached_is_descendant_of_leaf_node_ : 1;
(...skipping 18 matching lines...) Expand all
1128 static unsigned number_of_live_ax_objects_; 1131 static unsigned number_of_live_ax_objects_;
1129 }; 1132 };
1130 1133
1131 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 1134 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
1132 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ 1135 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \
1133 object.predicate) 1136 object.predicate)
1134 1137
1135 } // namespace blink 1138 } // namespace blink
1136 1139
1137 #endif // AXObject_h 1140 #endif // AXObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698