| 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 virtual String description(AXNameFrom, AXDescriptionFrom&, AXObjectVector* d
escriptionObjects) const { return String(); } | 670 virtual String description(AXNameFrom, AXDescriptionFrom&, AXObjectVector* d
escriptionObjects) const { return String(); } |
| 671 | 671 |
| 672 // Same as above, but returns a list of all potential sources for the descri
ption, indicating which were used. | 672 // Same as above, but returns a list of all potential sources for the descri
ption, indicating which were used. |
| 673 virtual String description(AXNameFrom, AXDescriptionFrom&, DescriptionSource
s*, AXRelatedObjectVector*) const { return String(); } | 673 virtual String description(AXNameFrom, AXDescriptionFrom&, DescriptionSource
s*, AXRelatedObjectVector*) const { return String(); } |
| 674 | 674 |
| 675 // Takes the result of nameFrom and descriptionFrom from calling |name| and
|description|, | 675 // Takes the result of nameFrom and descriptionFrom from calling |name| and
|description|, |
| 676 // above, and retrieves the placeholder of the object, if present and if it
wasn't already | 676 // above, and retrieves the placeholder of the object, if present and if it
wasn't already |
| 677 // exposed by one of the two functions above. | 677 // exposed by one of the two functions above. |
| 678 virtual String placeholder(AXNameFrom, AXDescriptionFrom) const { return Str
ing(); } | 678 virtual String placeholder(AXNameFrom, AXDescriptionFrom) const { return Str
ing(); } |
| 679 | 679 |
| 680 // Internal function used by name and description, above. | 680 // Internal functions used by name and description, above. |
| 681 typedef HeapHashSet<Member<const AXObject>> AXObjectSet; | 681 typedef HeapHashSet<Member<const AXObject>> AXObjectSet; |
| 682 virtual String textAlternative(bool recursive, bool inAriaLabelledByTraversa
l, AXObjectSet& visited, AXNameFrom& nameFrom, AXRelatedObjectVector* relatedObj
ects, NameSources* nameSources) const { return String(); } | 682 virtual String textAlternative(bool recursive, bool inAriaLabelledByTraversa
l, AXObjectSet& visited, AXNameFrom& nameFrom, AXRelatedObjectVector* relatedObj
ects, NameSources* nameSources) const { return String(); } |
| 683 virtual String textFromDescendants(AXObjectSet& visited, bool recursive) con
st { return String(); } |
| 683 | 684 |
| 684 // Returns result of Accessible Name Calculation algorithm. | 685 // Returns result of Accessible Name Calculation algorithm. |
| 685 // This is a simpler high-level interface to |name| used by Inspector. | 686 // This is a simpler high-level interface to |name| used by Inspector. |
| 686 String computedName() const; | 687 String computedName() const; |
| 687 | 688 |
| 688 // Internal function used to determine whether the result of calling |name|
on this object would | 689 // Internal function used to determine whether the result of calling |name|
on this object would |
| 689 // return text that came from the an HTML label element or not. This is inte
nded to be faster than calling | 690 // return text that came from the an HTML label element or not. This is inte
nded to be faster than calling |
| 690 // |name| or |textAlternative|, and without side effects (it won't call axOb
jectCache->getOrCreate). | 691 // |name| or |textAlternative|, and without side effects (it won't call axOb
jectCache->getOrCreate). |
| 691 virtual bool nameFromLabelElement() const { return false; } | 692 virtual bool nameFromLabelElement() const { return false; } |
| 692 | 693 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 const AXObjectVector& children(); | 804 const AXObjectVector& children(); |
| 804 AXObject* parentObject() const; | 805 AXObject* parentObject() const; |
| 805 AXObject* parentObjectIfExists() const; | 806 AXObject* parentObjectIfExists() const; |
| 806 virtual AXObject* computeParent() const = 0; | 807 virtual AXObject* computeParent() const = 0; |
| 807 virtual AXObject* computeParentIfExists() const { return 0; } | 808 virtual AXObject* computeParentIfExists() const { return 0; } |
| 808 AXObject* cachedParentObject() const { return m_parent; } | 809 AXObject* cachedParentObject() const { return m_parent; } |
| 809 AXObject* parentObjectUnignored() const; | 810 AXObject* parentObjectUnignored() const; |
| 810 | 811 |
| 811 // Low-level accessibility tree exploration, only for use within the accessi
bility module. | 812 // Low-level accessibility tree exploration, only for use within the accessi
bility module. |
| 812 virtual AXObject* rawFirstChild() const { return 0; } | 813 virtual AXObject* rawFirstChild() const { return 0; } |
| 813 virtual AXObject* rawFirstSibling() const { return 0; } | 814 virtual AXObject* rawNextSibling() const { return 0; } |
| 814 virtual void addChildren() { } | 815 virtual void addChildren() { } |
| 815 virtual bool canHaveChildren() const { return true; } | 816 virtual bool canHaveChildren() const { return true; } |
| 816 bool hasChildren() const { return m_haveChildren; } | 817 bool hasChildren() const { return m_haveChildren; } |
| 817 virtual void updateChildrenIfNecessary(); | 818 virtual void updateChildrenIfNecessary(); |
| 818 virtual bool needsToUpdateChildren() const { return false; } | 819 virtual bool needsToUpdateChildren() const { return false; } |
| 819 virtual void setNeedsToUpdateChildren() { } | 820 virtual void setNeedsToUpdateChildren() { } |
| 820 virtual void clearChildren(); | 821 virtual void clearChildren(); |
| 821 virtual void detachFromParent() { m_parent = 0; } | 822 virtual void detachFromParent() { m_parent = 0; } |
| 822 virtual AXObject* scrollBar(AccessibilityOrientation) { return 0; } | 823 virtual AXObject* scrollBar(AccessibilityOrientation) { return 0; } |
| 823 | 824 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 953 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 953 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 954 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
| 954 | 955 |
| 955 } // namespace blink | 956 } // namespace blink |
| 956 | 957 |
| 957 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); | 958 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::IgnoredReason); |
| 958 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); | 959 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NameSource); |
| 959 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::DescriptionSource); | 960 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::DescriptionSource); |
| 960 | 961 |
| 961 #endif // AXObject_h | 962 #endif // AXObject_h |
| OLD | NEW |