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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 virtual bool isAXSVGRoot() const { return false; } | 610 virtual bool isAXSVGRoot() const { return false; } |
611 | 611 |
612 // Check object role or purpose. | 612 // Check object role or purpose. |
613 virtual AccessibilityRole roleValue() const { return m_role; } | 613 virtual AccessibilityRole roleValue() const { return m_role; } |
614 bool isARIATextControl() const; | 614 bool isARIATextControl() const; |
615 virtual bool isARIATreeGridRow() const { return false; } | 615 virtual bool isARIATreeGridRow() const { return false; } |
616 virtual bool isAXTable() const { return false; } | 616 virtual bool isAXTable() const { return false; } |
617 virtual bool isAnchor() const { return false; } | 617 virtual bool isAnchor() const { return false; } |
618 bool isButton() const; | 618 bool isButton() const; |
619 bool isCanvas() const { return roleValue() == CanvasRole; } | 619 bool isCanvas() const { return roleValue() == CanvasRole; } |
| 620 bool isCheckable() const; |
620 bool isCheckbox() const { return roleValue() == CheckBoxRole; } | 621 bool isCheckbox() const { return roleValue() == CheckBoxRole; } |
621 bool isCheckboxOrRadio() const { return isCheckbox() || isRadioButton(); } | 622 bool isCheckboxOrRadio() const { return isCheckbox() || isRadioButton(); } |
622 bool isColorWell() const { return roleValue() == ColorWellRole; } | 623 bool isColorWell() const { return roleValue() == ColorWellRole; } |
623 bool isComboBox() const { return roleValue() == ComboBoxRole; } | 624 bool isComboBox() const { return roleValue() == ComboBoxRole; } |
624 virtual bool isControl() const { return false; } | 625 virtual bool isControl() const { return false; } |
625 virtual bool isDataTable() const { return false; } | 626 virtual bool isDataTable() const { return false; } |
626 virtual bool isEmbeddedObject() const { return false; } | 627 virtual bool isEmbeddedObject() const { return false; } |
627 virtual bool isFieldset() const { return false; } | 628 virtual bool isFieldset() const { return false; } |
628 virtual bool isHeading() const { return false; } | 629 virtual bool isHeading() const { return false; } |
629 virtual bool isImage() const { return false; } | 630 virtual bool isImage() const { return false; } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 virtual bool isSpinButtonPart() const { return false; } | 667 virtual bool isSpinButtonPart() const { return false; } |
667 bool isTabItem() const { return roleValue() == TabRole; } | 668 bool isTabItem() const { return roleValue() == TabRole; } |
668 virtual bool isTableCell() const { return false; } | 669 virtual bool isTableCell() const { return false; } |
669 virtual bool isTableRow() const { return false; } | 670 virtual bool isTableRow() const { return false; } |
670 virtual bool isTextControl() const { return false; } | 671 virtual bool isTextControl() const { return false; } |
671 virtual bool isTableCol() const { return false; } | 672 virtual bool isTableCol() const { return false; } |
672 bool isTree() const { return roleValue() == TreeRole; } | 673 bool isTree() const { return roleValue() == TreeRole; } |
673 bool isWebArea() const { return roleValue() == WebAreaRole; } | 674 bool isWebArea() const { return roleValue() == WebAreaRole; } |
674 | 675 |
675 // Check object state. | 676 // Check object state. |
676 virtual bool isChecked() const { return false; } | 677 bool isChecked() const; |
677 virtual bool isClickable() const; | 678 virtual bool isClickable() const; |
678 virtual bool isCollapsed() const { return false; } | 679 virtual bool isCollapsed() const { return false; } |
679 virtual bool isEnabled() const { return false; } | 680 virtual bool isEnabled() const { return false; } |
680 virtual AccessibilityExpanded isExpanded() const { return ExpandedUndefined; } | 681 virtual AccessibilityExpanded isExpanded() const { return ExpandedUndefined; } |
681 virtual bool isFocused() const { return false; } | 682 virtual bool isFocused() const { return false; } |
682 virtual bool isHovered() const { return false; } | 683 virtual bool isHovered() const { return false; } |
683 virtual bool isLinked() const { return false; } | 684 virtual bool isLinked() const { return false; } |
684 virtual bool isLoaded() const { return false; } | 685 virtual bool isLoaded() const { return false; } |
685 virtual bool isModal() const { return false; } | 686 virtual bool isModal() const { return false; } |
686 virtual bool isMultiSelectable() const { return false; } | 687 virtual bool isMultiSelectable() const { return false; } |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 Vector<AXRange>&) const {} | 834 Vector<AXRange>&) const {} |
834 // For an inline text box. | 835 // For an inline text box. |
835 // The integer horizontal pixel offset of each character in the string; | 836 // The integer horizontal pixel offset of each character in the string; |
836 // negative values for RTL. | 837 // negative values for RTL. |
837 virtual void textCharacterOffsets(Vector<int>&) const {} | 838 virtual void textCharacterOffsets(Vector<int>&) const {} |
838 // The start and end character offset of each word in the object's text. | 839 // The start and end character offset of each word in the object's text. |
839 virtual void wordBoundaries(Vector<AXRange>&) const {} | 840 virtual void wordBoundaries(Vector<AXRange>&) const {} |
840 | 841 |
841 // Properties of interactive elements. | 842 // Properties of interactive elements. |
842 AXSupportedAction action() const; | 843 AXSupportedAction action() const; |
843 virtual AccessibilityButtonState checkboxOrRadioValue() const; | 844 AccessibilityButtonState checkboxOrRadioState() const; |
844 virtual AriaCurrentState ariaCurrentState() const { | 845 virtual AriaCurrentState ariaCurrentState() const { |
845 return AriaCurrentStateUndefined; | 846 return AriaCurrentStateUndefined; |
846 } | 847 } |
847 virtual InvalidState getInvalidState() const { return InvalidStateUndefined; } | 848 virtual InvalidState getInvalidState() const { return InvalidStateUndefined; } |
848 // Only used when invalidState() returns InvalidStateOther. | 849 // Only used when invalidState() returns InvalidStateOther. |
849 virtual String ariaInvalidValue() const { return String(); } | 850 virtual String ariaInvalidValue() const { return String(); } |
850 virtual String valueDescription() const { return String(); } | 851 virtual String valueDescription() const { return String(); } |
851 virtual float valueForRange() const { return 0.0f; } | 852 virtual float valueForRange() const { return 0.0f; } |
852 virtual float maxValueForRange() const { return 0.0f; } | 853 virtual float maxValueForRange() const { return 0.0f; } |
853 virtual float minValueForRange() const { return 0.0f; } | 854 virtual float minValueForRange() const { return 0.0f; } |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 mutable Member<AXObject> m_cachedLiveRegionRoot; | 1094 mutable Member<AXObject> m_cachedLiveRegionRoot; |
1094 | 1095 |
1095 Member<AXObjectCacheImpl> m_axObjectCache; | 1096 Member<AXObjectCacheImpl> m_axObjectCache; |
1096 | 1097 |
1097 // Updates the cached attribute values. This may be recursive, so to prevent | 1098 // Updates the cached attribute values. This may be recursive, so to prevent |
1098 // deadlocks, | 1099 // deadlocks, |
1099 // functions called here may only search up the tree (ancestors), not down. | 1100 // functions called here may only search up the tree (ancestors), not down. |
1100 void updateCachedAttributeValuesIfNeeded() const; | 1101 void updateCachedAttributeValuesIfNeeded() const; |
1101 | 1102 |
1102 private: | 1103 private: |
| 1104 static bool isNativeInputInMixedState(const Node *); |
| 1105 |
1103 static bool includesARIAWidgetRole(const String&); | 1106 static bool includesARIAWidgetRole(const String&); |
1104 static bool hasInteractiveARIAAttribute(const Element&); | 1107 static bool hasInteractiveARIAAttribute(const Element&); |
1105 | 1108 |
1106 static unsigned s_numberOfLiveAXObjects; | 1109 static unsigned s_numberOfLiveAXObjects; |
1107 }; | 1110 }; |
1108 | 1111 |
1109 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 1112 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
1110 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ | 1113 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ |
1111 object.predicate) | 1114 object.predicate) |
1112 | 1115 |
1113 } // namespace blink | 1116 } // namespace blink |
1114 | 1117 |
1115 #endif // AXObject_h | 1118 #endif // AXObject_h |
OLD | NEW |