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

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

Issue 2805493002: Boolean properties for Accessibility Object Model Phase 1 (Closed)
Patch Set: Back to previous patchset, ready to land 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 class AXObjectImpl; 48 class AXObjectImpl;
49 class AXObjectCacheImpl; 49 class AXObjectCacheImpl;
50 class Element; 50 class Element;
51 class FrameView; 51 class FrameView;
52 class IntPoint; 52 class IntPoint;
53 class Node; 53 class Node;
54 class LayoutObject; 54 class LayoutObject;
55 class ScrollableArea; 55 class ScrollableArea;
56 56
57 enum class AOMBooleanProperty;
57 enum class AOMStringProperty; 58 enum class AOMStringProperty;
58 59
59 typedef unsigned AXID; 60 typedef unsigned AXID;
60 61
61 enum AccessibilityRole { 62 enum AccessibilityRole {
62 kUnknownRole = 0, 63 kUnknownRole = 0,
63 kAbbrRole, // No mapping to ARIA role. 64 kAbbrRole, // No mapping to ARIA role.
64 kAlertDialogRole, 65 kAlertDialogRole,
65 kAlertRole, 66 kAlertRole,
66 kAnchorRole, // No mapping to ARIA role. 67 kAnchorRole, // No mapping to ARIA role.
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 // cache. 602 // cache.
602 AXObjectCacheImpl& AxObjectCache() const { 603 AXObjectCacheImpl& AxObjectCache() const {
603 DCHECK(ax_object_cache_); 604 DCHECK(ax_object_cache_);
604 return *ax_object_cache_; 605 return *ax_object_cache_;
605 } 606 }
606 607
607 AXID AxObjectID() const { return id_; } 608 AXID AxObjectID() const { return id_; }
608 609
609 // Wrappers that retrieve either an Accessibility Object Model property, 610 // Wrappers that retrieve either an Accessibility Object Model property,
610 // or the equivalent ARIA attribute, in that order. 611 // or the equivalent ARIA attribute, in that order.
611 // TODO(dmazzoni): Add equivalents for other types of properties besides
612 // just strings.
613 const AtomicString& GetAOMPropertyOrARIAAttribute(AOMStringProperty) const; 612 const AtomicString& GetAOMPropertyOrARIAAttribute(AOMStringProperty) const;
613 bool HasAOMPropertyOrARIAAttribute(AOMBooleanProperty, bool& result) const;
614 bool AOMPropertyOrARIAAttributeIsTrue(AOMBooleanProperty) const;
615 bool AOMPropertyOrARIAAttributeIsFalse(AOMBooleanProperty) const;
614 616
615 virtual void GetSparseAXAttributes(AXSparseAttributeClient&) const {} 617 virtual void GetSparseAXAttributes(AXSparseAttributeClient&) const {}
616 618
617 // Determine subclass type. 619 // Determine subclass type.
618 virtual bool IsAXNodeObject() const { return false; } 620 virtual bool IsAXNodeObject() const { return false; }
619 virtual bool IsAXLayoutObject() const { return false; } 621 virtual bool IsAXLayoutObject() const { return false; }
620 virtual bool IsAXInlineTextBox() const { return false; } 622 virtual bool IsAXInlineTextBox() const { return false; }
621 virtual bool IsAXListBox() const { return false; } 623 virtual bool IsAXListBox() const { return false; }
622 virtual bool IsAXListBoxOption() const { return false; } 624 virtual bool IsAXListBoxOption() const { return false; }
623 virtual bool IsAXRadioInput() const { return false; } 625 virtual bool IsAXRadioInput() const { return false; }
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 virtual bool NeedsToUpdateChildren() const { return false; } 979 virtual bool NeedsToUpdateChildren() const { return false; }
978 virtual void SetNeedsToUpdateChildren() {} 980 virtual void SetNeedsToUpdateChildren() {}
979 virtual void ClearChildren(); 981 virtual void ClearChildren();
980 virtual void DetachFromParent() { parent_ = 0; } 982 virtual void DetachFromParent() { parent_ = 0; }
981 virtual AXObjectImpl* ScrollBar(AccessibilityOrientation) { return 0; } 983 virtual AXObjectImpl* ScrollBar(AccessibilityOrientation) { return 0; }
982 984
983 // Properties of the object's owning document or page. 985 // Properties of the object's owning document or page.
984 virtual double EstimatedLoadingProgress() const { return 0; } 986 virtual double EstimatedLoadingProgress() const { return 0; }
985 987
986 // DOM and layout tree access. 988 // DOM and layout tree access.
987 virtual Node* GetNode() const { return 0; } 989 virtual Node* GetNode() const { return nullptr; }
988 virtual LayoutObject* GetLayoutObject() const { return 0; } 990 virtual Element* GetElement() const; // Same as GetNode, if it's an Element.
991 virtual LayoutObject* GetLayoutObject() const { return nullptr; }
989 virtual Document* GetDocument() const; 992 virtual Document* GetDocument() const;
990 virtual FrameView* DocumentFrameView() const; 993 virtual FrameView* DocumentFrameView() const;
991 virtual Element* AnchorElement() const { return 0; } 994 virtual Element* AnchorElement() const { return nullptr; }
992 virtual Element* ActionElement() const { return 0; } 995 virtual Element* ActionElement() const { return nullptr; }
993 String Language() const; 996 String Language() const;
994 bool HasAttribute(const QualifiedName&) const; 997 bool HasAttribute(const QualifiedName&) const;
995 const AtomicString& GetAttribute(const QualifiedName&) const; 998 const AtomicString& GetAttribute(const QualifiedName&) const;
996 999
997 // Methods that retrieve or manipulate the current selection. 1000 // Methods that retrieve or manipulate the current selection.
998 1001
999 // Get the current selection from anywhere in the accessibility tree. 1002 // Get the current selection from anywhere in the accessibility tree.
1000 virtual AXRange Selection() const { return AXRange(); } 1003 virtual AXRange Selection() const { return AXRange(); }
1001 // Gets only the start and end offsets of the selection computed using the 1004 // Gets only the start and end offsets of the selection computed using the
1002 // current object as the starting point. Returns a null selection if there is 1005 // current object as the starting point. Returns a null selection if there is
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 1141
1139 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true); 1142 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true);
1140 1143
1141 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 1144 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
1142 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \ 1145 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \
1143 object.predicate) 1146 object.predicate)
1144 1147
1145 } // namespace blink 1148 } // namespace blink
1146 1149
1147 #endif // AXObjectImpl_h 1150 #endif // AXObjectImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698