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

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: esprehn comments round 2 Created 3 years, 10 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 AXDescriptionFromUninitialized = -1, 388 AXDescriptionFromUninitialized = -1,
389 AXDescriptionFromAttribute = 0, 389 AXDescriptionFromAttribute = 0,
390 AXDescriptionFromContents, 390 AXDescriptionFromContents,
391 AXDescriptionFromRelatedElement, 391 AXDescriptionFromRelatedElement,
392 }; 392 };
393 393
394 enum AXIgnoredReason { 394 enum AXIgnoredReason {
395 AXActiveModalDialog, 395 AXActiveModalDialog,
396 AXAncestorDisallowsChild, 396 AXAncestorDisallowsChild,
397 AXAncestorIsLeafNode, 397 AXAncestorIsLeafNode,
398 AXAriaHidden, 398 AXAriaHiddenElement,
399 AXAriaHiddenRoot, 399 AXAriaHiddenSubtree,
esprehn 2017/02/15 02:15:01 I assume reordering this enum is safe?
aboxhall 2017/02/15 04:01:32 Yes - only used by devtools, serialized to a strin
400 AXEmptyAlt, 400 AXEmptyAlt,
401 AXEmptyText, 401 AXEmptyText,
402 AXInert, 402 AXInertElement,
403 AXInertSubtree,
403 AXInheritsPresentation, 404 AXInheritsPresentation,
404 AXLabelContainer, 405 AXLabelContainer,
405 AXLabelFor, 406 AXLabelFor,
406 AXNotRendered, 407 AXNotRendered,
407 AXNotVisible, 408 AXNotVisible,
408 AXPresentationalRole, 409 AXPresentationalRole,
409 AXProbablyPresentational, 410 AXProbablyPresentational,
410 AXStaticTextUsedAsNameFor, 411 AXStaticTextUsedAsNameFor,
411 AXUninteresting 412 AXUninteresting
412 }; 413 };
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 virtual const AXObject* inheritsPresentationalRoleFrom() const { return 0; } 1070 virtual const AXObject* inheritsPresentationalRoleFrom() const { return 0; }
1070 1071
1071 virtual bool nameFromContents() const; 1072 virtual bool nameFromContents() const;
1072 1073
1073 AccessibilityRole buttonRoleType() const; 1074 AccessibilityRole buttonRoleType() const;
1074 1075
1075 virtual LayoutObject* layoutObjectForRelativeBounds() const { 1076 virtual LayoutObject* layoutObjectForRelativeBounds() const {
1076 return nullptr; 1077 return nullptr;
1077 } 1078 }
1078 1079
1080 const AXObject* inertRoot() const;
1081
1079 mutable Member<AXObject> m_parent; 1082 mutable Member<AXObject> m_parent;
1080 1083
1081 // The following cached attribute values (the ones starting with m_cached*) 1084 // The following cached attribute values (the ones starting with m_cached*)
1082 // are only valid if m_lastModificationCount matches 1085 // are only valid if m_lastModificationCount matches
1083 // AXObjectCacheImpl::modificationCount(). 1086 // AXObjectCacheImpl::modificationCount().
1084 mutable int m_lastModificationCount; 1087 mutable int m_lastModificationCount;
1085 mutable RGBA32 m_cachedBackgroundColor; 1088 mutable RGBA32 m_cachedBackgroundColor;
1086 mutable bool m_cachedIsIgnored : 1; 1089 mutable bool m_cachedIsIgnored : 1;
1087 mutable bool m_cachedIsInertOrAriaHidden : 1; 1090 mutable bool m_cachedIsInertOrAriaHidden : 1;
1088 mutable bool m_cachedIsDescendantOfLeafNode : 1; 1091 mutable bool m_cachedIsDescendantOfLeafNode : 1;
(...skipping 17 matching lines...) Expand all
1106 static unsigned s_numberOfLiveAXObjects; 1109 static unsigned s_numberOfLiveAXObjects;
1107 }; 1110 };
1108 1111
1109 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 1112 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
1110 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ 1113 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \
1111 object.predicate) 1114 object.predicate)
1112 1115
1113 } // namespace blink 1116 } // namespace blink
1114 1117
1115 #endif // AXObject_h 1118 #endif // AXObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698