| 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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 virtual Element* anchorElement() const { return 0; } | 693 virtual Element* anchorElement() const { return 0; } |
| 694 virtual Element* actionElement() const { return 0; } | 694 virtual Element* actionElement() const { return 0; } |
| 695 virtual Widget* widgetForAttachmentView() const { return 0; } | 695 virtual Widget* widgetForAttachmentView() const { return 0; } |
| 696 String language() const; | 696 String language() const; |
| 697 bool hasAttribute(const QualifiedName&) const; | 697 bool hasAttribute(const QualifiedName&) const; |
| 698 const AtomicString& getAttribute(const QualifiedName&) const; | 698 const AtomicString& getAttribute(const QualifiedName&) const; |
| 699 | 699 |
| 700 // Selected text. | 700 // Selected text. |
| 701 virtual PlainTextRange selectedTextRange() const { return PlainTextRange();
} | 701 virtual PlainTextRange selectedTextRange() const { return PlainTextRange();
} |
| 702 | 702 |
| 703 // Scrollable containers. |
| 704 bool isScrollableContainer() const; |
| 705 IntPoint scrollOffset() const; |
| 706 IntPoint minimumScrollOffset() const; |
| 707 IntPoint maximumScrollOffset() const; |
| 708 void setScrollOffset(const IntPoint&) const; |
| 709 |
| 710 // If this object itself scrolls, return its ScrollableArea. |
| 711 virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; } |
| 712 |
| 703 // Modify or take an action on an object. | 713 // Modify or take an action on an object. |
| 704 virtual void increment() { } | 714 virtual void increment() { } |
| 705 virtual void decrement() { } | 715 virtual void decrement() { } |
| 706 bool performDefaultAction() const { return press(); } | 716 bool performDefaultAction() const { return press(); } |
| 707 virtual bool press() const; | 717 virtual bool press() const; |
| 708 // Make this object visible by scrolling as many nested scrollable views as
needed. | 718 // Make this object visible by scrolling as many nested scrollable views as
needed. |
| 709 void scrollToMakeVisible() const; | 719 void scrollToMakeVisible() const; |
| 710 // Same, but if the whole object can't be made visible, try for this subrect
, in local coordinates. | 720 // Same, but if the whole object can't be made visible, try for this subrect
, in local coordinates. |
| 711 void scrollToMakeVisibleWithSubFocus(const IntRect&) const; | 721 void scrollToMakeVisibleWithSubFocus(const IntRect&) const; |
| 712 // Scroll this object to a given point in global coordinates of the top-leve
l window. | 722 // Scroll this object to a given point in global coordinates of the top-leve
l window. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 protected: | 755 protected: |
| 746 AXID m_id; | 756 AXID m_id; |
| 747 AccessibilityChildrenVector m_children; | 757 AccessibilityChildrenVector m_children; |
| 748 mutable bool m_haveChildren; | 758 mutable bool m_haveChildren; |
| 749 AccessibilityRole m_role; | 759 AccessibilityRole m_role; |
| 750 AXObjectInclusion m_lastKnownIsIgnoredValue; | 760 AXObjectInclusion m_lastKnownIsIgnoredValue; |
| 751 LayoutRect m_explicitElementRect; | 761 LayoutRect m_explicitElementRect; |
| 752 | 762 |
| 753 virtual const AXObject* inheritsPresentationalRoleFrom() const { return 0; } | 763 virtual const AXObject* inheritsPresentationalRoleFrom() const { return 0; } |
| 754 | 764 |
| 755 // If this object itself scrolls, return its ScrollableArea. | |
| 756 virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; } | |
| 757 virtual void scrollTo(const IntPoint&) const { } | |
| 758 | |
| 759 bool nameFromContents() const; | 765 bool nameFromContents() const; |
| 760 | 766 |
| 761 AccessibilityRole buttonRoleType() const; | 767 AccessibilityRole buttonRoleType() const; |
| 762 | 768 |
| 763 unsigned getLengthForTextRange() const { return text().length(); } | 769 unsigned getLengthForTextRange() const { return text().length(); } |
| 764 | 770 |
| 765 bool m_detached; | 771 bool m_detached; |
| 766 | 772 |
| 767 mutable AXObject* m_parent; | 773 mutable AXObject* m_parent; |
| 768 | 774 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 787 static bool includesARIAWidgetRole(const String&); | 793 static bool includesARIAWidgetRole(const String&); |
| 788 static bool hasInteractiveARIAAttribute(const Element&); | 794 static bool hasInteractiveARIAAttribute(const Element&); |
| 789 }; | 795 }; |
| 790 | 796 |
| 791 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 797 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 792 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 798 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
| 793 | 799 |
| 794 } // namespace blink | 800 } // namespace blink |
| 795 | 801 |
| 796 #endif // AXObject_h | 802 #endif // AXObject_h |
| OLD | NEW |