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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 int lineForPosition(const VisiblePosition&) const; | 608 int lineForPosition(const VisiblePosition&) const; |
609 virtual int index(const VisiblePosition&) const { return -1; } | 609 virtual int index(const VisiblePosition&) const { return -1; } |
610 virtual void lineBreaks(Vector<int>&) const { } | 610 virtual void lineBreaks(Vector<int>&) const { } |
611 | 611 |
612 // Static helper functions. | 612 // Static helper functions. |
613 static bool isARIAControl(AccessibilityRole); | 613 static bool isARIAControl(AccessibilityRole); |
614 static bool isARIAInput(AccessibilityRole); | 614 static bool isARIAInput(AccessibilityRole); |
615 static AccessibilityRole ariaRoleToWebCoreRole(const String&); | 615 static AccessibilityRole ariaRoleToWebCoreRole(const String&); |
616 static IntRect boundingBoxForQuads(LayoutObject*, const Vector<FloatQuad>&); | 616 static IntRect boundingBoxForQuads(LayoutObject*, const Vector<FloatQuad>&); |
617 static const AtomicString& roleName(AccessibilityRole); | 617 static const AtomicString& roleName(AccessibilityRole); |
| 618 static bool isInsideFocusableElementOrARIAWidget(const Node&); |
618 | 619 |
619 protected: | 620 protected: |
620 AXID m_id; | 621 AXID m_id; |
621 AccessibilityChildrenVector m_children; | 622 AccessibilityChildrenVector m_children; |
622 mutable bool m_haveChildren; | 623 mutable bool m_haveChildren; |
623 AccessibilityRole m_role; | 624 AccessibilityRole m_role; |
624 AXObjectInclusion m_lastKnownIsIgnoredValue; | 625 AXObjectInclusion m_lastKnownIsIgnoredValue; |
625 LayoutRect m_explicitElementRect; | 626 LayoutRect m_explicitElementRect; |
626 | 627 |
627 virtual bool computeAccessibilityIsIgnored() const { return true; } | 628 virtual bool computeAccessibilityIsIgnored() const { return true; } |
(...skipping 17 matching lines...) Expand all Loading... |
645 mutable bool m_cachedIsIgnored : 1; | 646 mutable bool m_cachedIsIgnored : 1; |
646 mutable bool m_cachedIsInertOrAriaHidden : 1; | 647 mutable bool m_cachedIsInertOrAriaHidden : 1; |
647 mutable bool m_cachedIsDescendantOfBarrenParent : 1; | 648 mutable bool m_cachedIsDescendantOfBarrenParent : 1; |
648 mutable const AXObject* m_cachedLiveRegionRoot; | 649 mutable const AXObject* m_cachedLiveRegionRoot; |
649 | 650 |
650 AXObjectCacheImpl* m_axObjectCache; | 651 AXObjectCacheImpl* m_axObjectCache; |
651 | 652 |
652 // Updates the cached attribute values. This may be recursive, so to prevent
deadlocks, | 653 // Updates the cached attribute values. This may be recursive, so to prevent
deadlocks, |
653 // functions called here may only search up the tree (ancestors), not down. | 654 // functions called here may only search up the tree (ancestors), not down. |
654 void updateCachedAttributeValuesIfNeeded() const; | 655 void updateCachedAttributeValuesIfNeeded() const; |
| 656 |
| 657 private: |
| 658 static bool includesARIAWidgetRole(const String&); |
| 659 static bool hasInteractiveARIAAttribute(const Element&); |
655 }; | 660 }; |
656 | 661 |
657 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 662 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
658 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 663 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
659 | 664 |
660 } // namespace blink | 665 } // namespace blink |
661 | 666 |
662 #endif // AXObject_h | 667 #endif // AXObject_h |
OLD | NEW |