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 NoRole = 0, | |
dmazzoni
2014/12/12 00:41:48
Same comment as before - I think you should use Un
| |
55 AlertDialogRole = 1, | 57 AlertDialogRole = 1, |
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, |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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, | 168 UnknownRole, |
167 UserInterfaceTooltipRole, | 169 UserInterfaceTooltipRole, |
168 WebAreaRole, | 170 WebAreaRole, |
169 WindowRole, | 171 WindowRole, |
172 NumRoles | |
170 }; | 173 }; |
171 | 174 |
172 enum AccessibilityTextSource { | 175 enum AccessibilityTextSource { |
173 AlternativeText, | 176 AlternativeText, |
174 ChildrenText, | 177 ChildrenText, |
175 SummaryText, | 178 SummaryText, |
176 HelpText, | 179 HelpText, |
177 VisibleText, | 180 VisibleText, |
178 TitleTagText, | 181 TitleTagText, |
179 PlaceholderText, | 182 PlaceholderText, |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
570 virtual VisiblePosition visiblePositionForIndex(int) const { return VisibleP osition(); } | 573 virtual VisiblePosition visiblePositionForIndex(int) const { return VisibleP osition(); } |
571 int lineForPosition(const VisiblePosition&) const; | 574 int lineForPosition(const VisiblePosition&) const; |
572 virtual int index(const VisiblePosition&) const { return -1; } | 575 virtual int index(const VisiblePosition&) const { return -1; } |
573 virtual void lineBreaks(Vector<int>&) const { } | 576 virtual void lineBreaks(Vector<int>&) const { } |
574 | 577 |
575 // Static helper functions. | 578 // Static helper functions. |
576 static bool isARIAControl(AccessibilityRole); | 579 static bool isARIAControl(AccessibilityRole); |
577 static bool isARIAInput(AccessibilityRole); | 580 static bool isARIAInput(AccessibilityRole); |
578 static AccessibilityRole ariaRoleToWebCoreRole(const String&); | 581 static AccessibilityRole ariaRoleToWebCoreRole(const String&); |
579 static IntRect boundingBoxForQuads(RenderObject*, const Vector<FloatQuad>&); | 582 static IntRect boundingBoxForQuads(RenderObject*, const Vector<FloatQuad>&); |
583 static const AtomicString& roleName(const AccessibilityRole); | |
580 | 584 |
581 protected: | 585 protected: |
582 AXID m_id; | 586 AXID m_id; |
583 AccessibilityChildrenVector m_children; | 587 AccessibilityChildrenVector m_children; |
584 mutable bool m_haveChildren; | 588 mutable bool m_haveChildren; |
585 AccessibilityRole m_role; | 589 AccessibilityRole m_role; |
586 AXObjectInclusion m_lastKnownIsIgnoredValue; | 590 AXObjectInclusion m_lastKnownIsIgnoredValue; |
587 LayoutRect m_explicitElementRect; | 591 LayoutRect m_explicitElementRect; |
588 | 592 |
589 virtual bool computeAccessibilityIsIgnored() const { return true; } | 593 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. | 617 // functions called here may only search up the tree (ancestors), not down. |
614 void updateCachedAttributeValuesIfNeeded() const; | 618 void updateCachedAttributeValuesIfNeeded() const; |
615 }; | 619 }; |
616 | 620 |
617 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 621 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
618 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) | 622 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred icate) |
619 | 623 |
620 } // namespace blink | 624 } // namespace blink |
621 | 625 |
622 #endif // AXObject_h | 626 #endif // AXObject_h |
OLD | NEW |