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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 virtual String description(AXNameFrom, AXDescriptionFrom&, AXObjectVector* d
escriptionObjects) const { return String(); } | 687 virtual String description(AXNameFrom, AXDescriptionFrom&, AXObjectVector* d
escriptionObjects) const { return String(); } |
688 | 688 |
689 // Same as above, but returns a list of all potential sources for the descri
ption, indicating which were used. | 689 // Same as above, but returns a list of all potential sources for the descri
ption, indicating which were used. |
690 virtual String description(AXNameFrom, AXDescriptionFrom&, DescriptionSource
s*, AXRelatedObjectVector*) const { return String(); } | 690 virtual String description(AXNameFrom, AXDescriptionFrom&, DescriptionSource
s*, AXRelatedObjectVector*) const { return String(); } |
691 | 691 |
692 // Takes the result of nameFrom and descriptionFrom from calling |name| and
|description|, | 692 // Takes the result of nameFrom and descriptionFrom from calling |name| and
|description|, |
693 // above, and retrieves the placeholder of the object, if present and if it
wasn't already | 693 // above, and retrieves the placeholder of the object, if present and if it
wasn't already |
694 // exposed by one of the two functions above. | 694 // exposed by one of the two functions above. |
695 virtual String placeholder(AXNameFrom, AXDescriptionFrom) const { return Str
ing(); } | 695 virtual String placeholder(AXNameFrom, AXDescriptionFrom) const { return Str
ing(); } |
696 | 696 |
697 // Internal function used by name and description, above. | 697 // Internal functions used by name and description, above. |
698 typedef HeapHashSet<Member<const AXObject>> AXObjectSet; | 698 typedef HeapHashSet<Member<const AXObject>> AXObjectSet; |
699 virtual String textAlternative(bool recursive, bool inAriaLabelledByTraversa
l, AXObjectSet& visited, AXNameFrom& nameFrom, AXRelatedObjectVector* relatedObj
ects, NameSources* nameSources) const { return String(); } | 699 virtual String textAlternative(bool recursive, bool inAriaLabelledByTraversa
l, AXObjectSet& visited, AXNameFrom& nameFrom, AXRelatedObjectVector* relatedObj
ects, NameSources* nameSources) const { return String(); } |
| 700 virtual String textFromDescendants(AXObjectSet& visited, bool recursive) con
st { return String(); } |
700 | 701 |
701 // Returns result of Accessible Name Calculation algorithm. | 702 // Returns result of Accessible Name Calculation algorithm. |
702 // This is a simpler high-level interface to |name| used by Inspector. | 703 // This is a simpler high-level interface to |name| used by Inspector. |
703 String computedName() const; | 704 String computedName() const; |
704 | 705 |
705 // Internal function used to determine whether the result of calling |name|
on this object would | 706 // Internal function used to determine whether the result of calling |name|
on this object would |
706 // return text that came from the an HTML label element or not. This is inte
nded to be faster than calling | 707 // return text that came from the an HTML label element or not. This is inte
nded to be faster than calling |
707 // |name| or |textAlternative|, and without side effects (it won't call axOb
jectCache->getOrCreate). | 708 // |name| or |textAlternative|, and without side effects (it won't call axOb
jectCache->getOrCreate). |
708 virtual bool nameFromLabelElement() const { return false; } | 709 virtual bool nameFromLabelElement() const { return false; } |
709 | 710 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 const AXObjectVector& children(); | 825 const AXObjectVector& children(); |
825 AXObject* parentObject() const; | 826 AXObject* parentObject() const; |
826 AXObject* parentObjectIfExists() const; | 827 AXObject* parentObjectIfExists() const; |
827 virtual AXObject* computeParent() const = 0; | 828 virtual AXObject* computeParent() const = 0; |
828 virtual AXObject* computeParentIfExists() const { return 0; } | 829 virtual AXObject* computeParentIfExists() const { return 0; } |
829 AXObject* cachedParentObject() const { return m_parent; } | 830 AXObject* cachedParentObject() const { return m_parent; } |
830 AXObject* parentObjectUnignored() const; | 831 AXObject* parentObjectUnignored() const; |
831 | 832 |
832 // Low-level accessibility tree exploration, only for use within the accessi
bility module. | 833 // Low-level accessibility tree exploration, only for use within the accessi
bility module. |
833 virtual AXObject* rawFirstChild() const { return 0; } | 834 virtual AXObject* rawFirstChild() const { return 0; } |
834 virtual AXObject* rawFirstSibling() const { return 0; } | 835 virtual AXObject* rawNextSibling() const { return 0; } |
835 AXObject* firstAccessibleObjectFromNode(const Node*); | 836 AXObject* firstAccessibleObjectFromNode(const Node*); |
836 virtual void addChildren() { } | 837 virtual void addChildren() { } |
837 virtual bool canHaveChildren() const { return true; } | 838 virtual bool canHaveChildren() const { return true; } |
838 bool hasChildren() const { return m_haveChildren; } | 839 bool hasChildren() const { return m_haveChildren; } |
839 virtual void updateChildrenIfNecessary(); | 840 virtual void updateChildrenIfNecessary(); |
840 virtual bool needsToUpdateChildren() const { return false; } | 841 virtual bool needsToUpdateChildren() const { return false; } |
841 virtual void setNeedsToUpdateChildren() { } | 842 virtual void setNeedsToUpdateChildren() { } |
842 virtual void clearChildren(); | 843 virtual void clearChildren(); |
843 virtual void detachFromParent() { m_parent = 0; } | 844 virtual void detachFromParent() { m_parent = 0; } |
844 virtual AXObject* scrollBar(AccessibilityOrientation) { return 0; } | 845 virtual AXObject* scrollBar(AccessibilityOrientation) { return 0; } |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 980 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
980 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 981 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
981 | 982 |
982 } // namespace blink | 983 } // namespace blink |
983 | 984 |
984 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); | 985 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); |
985 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); | 986 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); |
986 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::DescriptionSource); | 987 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::DescriptionSource); |
987 | 988 |
988 #endif // AXObject_h | 989 #endif // AXObject_h |
OLD | NEW |