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

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

Issue 2791943002: Re-land: Initial skeleton of Accessibility Object Model Phase 1 (Closed)
Patch Set: Fix for crash with test Created 3 years, 8 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 class AXObject; 47 class AXObject;
48 class AXObjectCacheImpl; 48 class AXObjectCacheImpl;
49 class Element; 49 class Element;
50 class FrameView; 50 class FrameView;
51 class IntPoint; 51 class IntPoint;
52 class Node; 52 class Node;
53 class LayoutObject; 53 class LayoutObject;
54 class ScrollableArea; 54 class ScrollableArea;
55 55
56 enum class AOMStringProperty;
57
56 typedef unsigned AXID; 58 typedef unsigned AXID;
57 59
58 enum AccessibilityRole { 60 enum AccessibilityRole {
59 UnknownRole = 0, 61 UnknownRole = 0,
60 AbbrRole, // No mapping to ARIA role. 62 AbbrRole, // No mapping to ARIA role.
61 AlertDialogRole, 63 AlertDialogRole,
62 AlertRole, 64 AlertRole,
63 AnnotationRole, // No mapping to ARIA role. 65 AnnotationRole, // No mapping to ARIA role.
64 ApplicationRole, 66 ApplicationRole,
65 ArticleRole, 67 ArticleRole,
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 594
593 // The AXObjectCacheImpl that owns this object, and its unique ID within this 595 // The AXObjectCacheImpl that owns this object, and its unique ID within this
594 // cache. 596 // cache.
595 AXObjectCacheImpl& axObjectCache() const { 597 AXObjectCacheImpl& axObjectCache() const {
596 ASSERT(m_axObjectCache); 598 ASSERT(m_axObjectCache);
597 return *m_axObjectCache; 599 return *m_axObjectCache;
598 } 600 }
599 601
600 AXID axObjectID() const { return m_id; } 602 AXID axObjectID() const { return m_id; }
601 603
604 // Wrappers that retrieve either an Accessibility Object Model property,
605 // or the equivalent ARIA attribute, in that order.
606 // TODO(dmazzoni): Add equivalents for other types of properties besides
607 // just strings.
608 const AtomicString& getAOMPropertyOrARIAAttribute(AOMStringProperty) const;
609
602 virtual void getSparseAXAttributes(AXSparseAttributeClient&) const {} 610 virtual void getSparseAXAttributes(AXSparseAttributeClient&) const {}
603 611
604 // Determine subclass type. 612 // Determine subclass type.
605 virtual bool isAXNodeObject() const { return false; } 613 virtual bool isAXNodeObject() const { return false; }
606 virtual bool isAXLayoutObject() const { return false; } 614 virtual bool isAXLayoutObject() const { return false; }
607 virtual bool isAXListBox() const { return false; } 615 virtual bool isAXListBox() const { return false; }
608 virtual bool isAXListBoxOption() const { return false; } 616 virtual bool isAXListBoxOption() const { return false; }
609 virtual bool isAXRadioInput() const { return false; } 617 virtual bool isAXRadioInput() const { return false; }
610 virtual bool isAXSVGRoot() const { return false; } 618 virtual bool isAXSVGRoot() const { return false; }
611 619
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 static unsigned s_numberOfLiveAXObjects; 1118 static unsigned s_numberOfLiveAXObjects;
1111 }; 1119 };
1112 1120
1113 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ 1121 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \
1114 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ 1122 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \
1115 object.predicate) 1123 object.predicate)
1116 1124
1117 } // namespace blink 1125 } // namespace blink
1118 1126
1119 #endif // AXObject_h 1127 #endif // AXObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698