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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 bool isPresentational() const { return roleValue() == NoneRole || roleValue(
) == PresentationalRole; } | 401 bool isPresentational() const { return roleValue() == NoneRole || roleValue(
) == PresentationalRole; } |
402 virtual bool isProgressIndicator() const { return false; } | 402 virtual bool isProgressIndicator() const { return false; } |
403 bool isRadioButton() const { return roleValue() == RadioButtonRole; } | 403 bool isRadioButton() const { return roleValue() == RadioButtonRole; } |
404 bool isScrollbar() const { return roleValue() == ScrollBarRole; } | 404 bool isScrollbar() const { return roleValue() == ScrollBarRole; } |
405 virtual bool isSlider() const { return false; } | 405 virtual bool isSlider() const { return false; } |
406 virtual bool isSpinButton() const { return roleValue() == SpinButtonRole; } | 406 virtual bool isSpinButton() const { return roleValue() == SpinButtonRole; } |
407 virtual bool isSpinButtonPart() const { return false; } | 407 virtual bool isSpinButtonPart() const { return false; } |
408 bool isTabItem() const { return roleValue() == TabRole; } | 408 bool isTabItem() const { return roleValue() == TabRole; } |
409 virtual bool isTableCell() const { return false; } | 409 virtual bool isTableCell() const { return false; } |
410 virtual bool isTableRow() const { return false; } | 410 virtual bool isTableRow() const { return false; } |
411 virtual bool isTextControl() const { return false; } | |
412 virtual bool isTableCol() const { return false; } | 411 virtual bool isTableCol() const { return false; } |
| 412 bool isTextControl() const; |
413 bool isTree() const { return roleValue() == TreeRole; } | 413 bool isTree() const { return roleValue() == TreeRole; } |
414 bool isTreeItem() const { return roleValue() == TreeItemRole; } | 414 bool isTreeItem() const { return roleValue() == TreeItemRole; } |
415 bool isWebArea() const { return roleValue() == WebAreaRole; } | 415 bool isWebArea() const { return roleValue() == WebAreaRole; } |
416 | 416 |
417 // Check object state. | 417 // Check object state. |
418 virtual bool isChecked() const { return false; } | 418 virtual bool isChecked() const { return false; } |
419 virtual bool isClickable() const; | 419 virtual bool isClickable() const; |
420 virtual bool isCollapsed() const { return false; } | 420 virtual bool isCollapsed() const { return false; } |
421 virtual bool isEnabled() const { return false; } | 421 virtual bool isEnabled() const { return false; } |
422 virtual AccessibilityExpanded isExpanded() const { return ExpandedUndefined;
} | 422 virtual AccessibilityExpanded isExpanded() const { return ExpandedUndefined;
} |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 | 682 |
683 virtual bool computeAccessibilityIsIgnored() const { return true; } | 683 virtual bool computeAccessibilityIsIgnored() const { return true; } |
684 virtual bool computeHasInheritedPresentationalRole() const { return false; } | 684 virtual bool computeHasInheritedPresentationalRole() const { return false; } |
685 | 685 |
686 // If this object itself scrolls, return its ScrollableArea. | 686 // If this object itself scrolls, return its ScrollableArea. |
687 virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; } | 687 virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; } |
688 virtual void scrollTo(const IntPoint&) const { } | 688 virtual void scrollTo(const IntPoint&) const { } |
689 | 689 |
690 AccessibilityRole buttonRoleType() const; | 690 AccessibilityRole buttonRoleType() const; |
691 | 691 |
| 692 bool allowsTextRanges() const { return isTextControl(); } |
692 unsigned getLengthForTextRange() const { return text().length(); } | 693 unsigned getLengthForTextRange() const { return text().length(); } |
693 | 694 |
694 bool m_detached; | 695 bool m_detached; |
695 | 696 |
696 mutable AXObject* m_parent; | 697 mutable AXObject* m_parent; |
697 | 698 |
698 // The following cached attribute values (the ones starting with m_cached*) | 699 // The following cached attribute values (the ones starting with m_cached*) |
699 // are only valid if m_lastModificationCount matches AXObjectCacheImpl::modi
ficationCount(). | 700 // are only valid if m_lastModificationCount matches AXObjectCacheImpl::modi
ficationCount(). |
700 mutable int m_lastModificationCount; | 701 mutable int m_lastModificationCount; |
701 mutable bool m_cachedIsIgnored : 1; | 702 mutable bool m_cachedIsIgnored : 1; |
(...skipping 13 matching lines...) Expand all Loading... |
715 static bool includesARIAWidgetRole(const String&); | 716 static bool includesARIAWidgetRole(const String&); |
716 static bool hasInteractiveARIAAttribute(const Element&); | 717 static bool hasInteractiveARIAAttribute(const Element&); |
717 }; | 718 }; |
718 | 719 |
719 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 720 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
720 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 721 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
721 | 722 |
722 } // namespace blink | 723 } // namespace blink |
723 | 724 |
724 #endif // AXObject_h | 725 #endif // AXObject_h |
OLD | NEW |