OLD | NEW |
---|---|
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 22 matching lines...) Expand all Loading... | |
33 #include "core/editing/VisiblePosition.h" | 33 #include "core/editing/VisiblePosition.h" |
34 #include "platform/geometry/FloatQuad.h" | 34 #include "platform/geometry/FloatQuad.h" |
35 #include "platform/geometry/LayoutRect.h" | 35 #include "platform/geometry/LayoutRect.h" |
36 #include "wtf/Forward.h" | 36 #include "wtf/Forward.h" |
37 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
38 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class AXObject; | 42 class AXObject; |
43 class AXObjectCache; | |
43 class AXObjectCacheImpl; | 44 class AXObjectCacheImpl; |
44 class Element; | 45 class Element; |
45 class FrameView; | 46 class FrameView; |
46 class IntPoint; | 47 class IntPoint; |
47 class Node; | 48 class Node; |
48 class RenderObject; | 49 class RenderObject; |
49 class ScrollableArea; | 50 class ScrollableArea; |
50 class Widget; | 51 class Widget; |
51 | 52 |
52 typedef unsigned AXID; | 53 typedef unsigned AXID; |
53 | 54 |
54 enum AccessibilityRole { | 55 enum AccessibilityRole { |
56 UnknownRole = 0, | |
55 AlertDialogRole = 1, | 57 AlertDialogRole = 1, |
dmazzoni
2014/12/17 06:24:19
nit: get rid of the = 1
aboxhall
2014/12/18 04:34:47
Done.
| |
56 AlertRole, | 58 AlertRole, |
57 AnnotationRole, | 59 AnnotationRole, |
58 ApplicationRole, | 60 ApplicationRole, |
59 ArticleRole, | 61 ArticleRole, |
60 BannerRole, | 62 BannerRole, |
61 BlockquoteRole, | 63 BlockquoteRole, |
62 BusyIndicatorRole, | 64 BusyIndicatorRole, |
63 ButtonRole, | 65 ButtonRole, |
64 CanvasRole, | 66 CanvasRole, |
65 CellRole, | 67 CellRole, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 TableRole, | 158 TableRole, |
157 TextAreaRole, | 159 TextAreaRole, |
158 TextFieldRole, | 160 TextFieldRole, |
159 TimeRole, | 161 TimeRole, |
160 TimerRole, | 162 TimerRole, |
161 ToggleButtonRole, | 163 ToggleButtonRole, |
162 ToolbarRole, | 164 ToolbarRole, |
163 TreeGridRole, | 165 TreeGridRole, |
164 TreeItemRole, | 166 TreeItemRole, |
165 TreeRole, | 167 TreeRole, |
166 UnknownRole, | |
167 UserInterfaceTooltipRole, | 168 UserInterfaceTooltipRole, |
168 WebAreaRole, | 169 WebAreaRole, |
169 WindowRole, | 170 WindowRole, |
171 NumRoles | |
170 }; | 172 }; |
171 | 173 |
172 enum AccessibilityTextSource { | 174 enum AccessibilityTextSource { |
173 AlternativeText, | 175 AlternativeText, |
174 ChildrenText, | 176 ChildrenText, |
175 SummaryText, | 177 SummaryText, |
176 HelpText, | 178 HelpText, |
177 VisibleText, | 179 VisibleText, |
178 TitleTagText, | 180 TitleTagText, |
179 PlaceholderText, | 181 PlaceholderText, |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
570 virtual VisiblePosition visiblePositionForIndex(int) const { return VisibleP osition(); } | 572 virtual VisiblePosition visiblePositionForIndex(int) const { return VisibleP osition(); } |
571 int lineForPosition(const VisiblePosition&) const; | 573 int lineForPosition(const VisiblePosition&) const; |
572 virtual int index(const VisiblePosition&) const { return -1; } | 574 virtual int index(const VisiblePosition&) const { return -1; } |
573 virtual void lineBreaks(Vector<int>&) const { } | 575 virtual void lineBreaks(Vector<int>&) const { } |
574 | 576 |
575 // Static helper functions. | 577 // Static helper functions. |
576 static bool isARIAControl(AccessibilityRole); | 578 static bool isARIAControl(AccessibilityRole); |
577 static bool isARIAInput(AccessibilityRole); | 579 static bool isARIAInput(AccessibilityRole); |
578 static AccessibilityRole ariaRoleToWebCoreRole(const String&); | 580 static AccessibilityRole ariaRoleToWebCoreRole(const String&); |
579 static IntRect boundingBoxForQuads(RenderObject*, const Vector<FloatQuad>&); | 581 static IntRect boundingBoxForQuads(RenderObject*, const Vector<FloatQuad>&); |
582 static const AtomicString& roleName(AccessibilityRole); | |
580 | 583 |
581 protected: | 584 protected: |
582 AXID m_id; | 585 AXID m_id; |
583 AccessibilityChildrenVector m_children; | 586 AccessibilityChildrenVector m_children; |
584 mutable bool m_haveChildren; | 587 mutable bool m_haveChildren; |
585 AccessibilityRole m_role; | 588 AccessibilityRole m_role; |
586 AXObjectInclusion m_lastKnownIsIgnoredValue; | 589 AXObjectInclusion m_lastKnownIsIgnoredValue; |
587 LayoutRect m_explicitElementRect; | 590 LayoutRect m_explicitElementRect; |
588 | 591 |
589 virtual bool computeAccessibilityIsIgnored() const { return true; } | 592 virtual bool computeAccessibilityIsIgnored() const { return true; } |
(...skipping 23 matching lines...) Expand all Loading... | |
613 // functions called here may only search up the tree (ancestors), not down. | 616 // functions called here may only search up the tree (ancestors), not down. |
614 void updateCachedAttributeValuesIfNeeded() const; | 617 void updateCachedAttributeValuesIfNeeded() const; |
615 }; | 618 }; |
616 | 619 |
617 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 620 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
618 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) | 621 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) |
619 | 622 |
620 } // namespace blink | 623 } // namespace blink |
621 | 624 |
622 #endif // AXObject_h | 625 #endif // AXObject_h |
OLD | NEW |