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

Side by Side Diff: Source/core/accessibility/AXObject.h

Issue 679623002: Check whether aria-expanded attribute is defined (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add COMPILE ASSERT for new enum type Created 6 years, 1 month 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 HelpText, 187 HelpText,
188 VisibleText, 188 VisibleText,
189 TitleTagText, 189 TitleTagText,
190 PlaceholderText, 190 PlaceholderText,
191 LabelByElementText, 191 LabelByElementText,
192 }; 192 };
193 193
194 enum AccessibilityState { 194 enum AccessibilityState {
195 AXBusyState, 195 AXBusyState,
196 AXCheckedState, 196 AXCheckedState,
197 AXCollapsedState,
198 AXEnabledState, 197 AXEnabledState,
199 AXExpandedState, 198 AXExpandedState,
200 AXFocusableState, 199 AXFocusableState,
201 AXFocusedState, 200 AXFocusedState,
202 AXHaspopupState, 201 AXHaspopupState,
203 AXHoveredState, 202 AXHoveredState,
204 AXIndeterminateState, 203 AXIndeterminateState,
205 AXInvisibleState, 204 AXInvisibleState,
206 AXLinkedState, 205 AXLinkedState,
207 AXMultiselectableState, 206 AXMultiselectableState,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 ButtonStateMixed, 249 ButtonStateMixed,
251 }; 250 };
252 251
253 enum AccessibilityTextDirection { 252 enum AccessibilityTextDirection {
254 AccessibilityTextDirectionLeftToRight, 253 AccessibilityTextDirectionLeftToRight,
255 AccessibilityTextDirectionRightToLeft, 254 AccessibilityTextDirectionRightToLeft,
256 AccessibilityTextDirectionTopToBottom, 255 AccessibilityTextDirectionTopToBottom,
257 AccessibilityTextDirectionBottomToTop 256 AccessibilityTextDirectionBottomToTop
258 }; 257 };
259 258
259 enum AccessibilityExpanded {
260 ExpandedUndefined = 0,
261 ExpandedCollapsed,
262 ExpandedExpanded,
263 };
264
260 class AXObject : public RefCounted<AXObject> { 265 class AXObject : public RefCounted<AXObject> {
261 public: 266 public:
262 typedef Vector<RefPtr<AXObject> > AccessibilityChildrenVector; 267 typedef Vector<RefPtr<AXObject> > AccessibilityChildrenVector;
263 268
264 struct PlainTextRange { 269 struct PlainTextRange {
265 270
266 unsigned start; 271 unsigned start;
267 unsigned length; 272 unsigned length;
268 273
269 PlainTextRange() 274 PlainTextRange()
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 bool isTextControl() const; 363 bool isTextControl() const;
359 bool isTree() const { return roleValue() == TreeRole; } 364 bool isTree() const { return roleValue() == TreeRole; }
360 bool isTreeItem() const { return roleValue() == TreeItemRole; } 365 bool isTreeItem() const { return roleValue() == TreeItemRole; }
361 bool isWebArea() const { return roleValue() == WebAreaRole; } 366 bool isWebArea() const { return roleValue() == WebAreaRole; }
362 367
363 // Check object state. 368 // Check object state.
364 virtual bool isChecked() const { return false; } 369 virtual bool isChecked() const { return false; }
365 virtual bool isClickable() const; 370 virtual bool isClickable() const;
366 virtual bool isCollapsed() const { return false; } 371 virtual bool isCollapsed() const { return false; }
367 virtual bool isEnabled() const { return false; } 372 virtual bool isEnabled() const { return false; }
368 virtual bool isExpanded() const { return false; } 373 virtual AccessibilityExpanded isExpanded() const { return ExpandedUndefined; }
369 virtual bool isFocused() const { return false; } 374 virtual bool isFocused() const { return false; }
370 virtual bool isHovered() const { return false; } 375 virtual bool isHovered() const { return false; }
371 virtual bool isIndeterminate() const { return false; } 376 virtual bool isIndeterminate() const { return false; }
372 virtual bool isLinked() const { return false; } 377 virtual bool isLinked() const { return false; }
373 virtual bool isLoaded() const { return false; } 378 virtual bool isLoaded() const { return false; }
374 virtual bool isMultiSelectable() const { return false; } 379 virtual bool isMultiSelectable() const { return false; }
375 virtual bool isOffScreen() const { return false; } 380 virtual bool isOffScreen() const { return false; }
376 virtual bool isPressed() const { return false; } 381 virtual bool isPressed() const { return false; }
377 virtual bool isReadOnly() const { return false; } 382 virtual bool isReadOnly() const { return false; }
378 virtual bool isRequired() const { return false; } 383 virtual bool isRequired() const { return false; }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 // functions called here may only search up the tree (ancestors), not down. 602 // functions called here may only search up the tree (ancestors), not down.
598 void updateCachedAttributeValuesIfNeeded() const; 603 void updateCachedAttributeValuesIfNeeded() const;
599 }; 604 };
600 605
601 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 606 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
602 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) 607 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate)
603 608
604 } // namespace blink 609 } // namespace blink
605 610
606 #endif // AXObject_h 611 #endif // AXObject_h
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXNodeObject.cpp ('k') | Source/core/accessibility/AXRenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698