| 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 virtual bool IsAXRadioInput() const { return false; } | 618 virtual bool IsAXRadioInput() const { return false; } |
| 619 virtual bool IsAXSVGRoot() const { return false; } | 619 virtual bool IsAXSVGRoot() const { return false; } |
| 620 | 620 |
| 621 // Check object role or purpose. | 621 // Check object role or purpose. |
| 622 virtual AccessibilityRole RoleValue() const { return role_; } | 622 virtual AccessibilityRole RoleValue() const { return role_; } |
| 623 bool IsARIATextControl() const; | 623 bool IsARIATextControl() const; |
| 624 virtual bool IsARIATreeGridRow() const { return false; } | 624 virtual bool IsARIATreeGridRow() const { return false; } |
| 625 virtual bool IsAXTable() const { return false; } | 625 virtual bool IsAXTable() const { return false; } |
| 626 virtual bool IsAnchor() const { return false; } | 626 virtual bool IsAnchor() const { return false; } |
| 627 bool IsButton() const; | 627 bool IsButton() const; |
| 628 bool IsCheckable() const; |
| 628 bool IsCanvas() const { return RoleValue() == kCanvasRole; } | 629 bool IsCanvas() const { return RoleValue() == kCanvasRole; } |
| 629 bool IsCheckbox() const { return RoleValue() == kCheckBoxRole; } | 630 bool IsCheckbox() const { return RoleValue() == kCheckBoxRole; } |
| 630 bool IsCheckboxOrRadio() const { return IsCheckbox() || IsRadioButton(); } | 631 bool IsCheckboxOrRadio() const { return IsCheckbox() || IsRadioButton(); } |
| 631 bool IsColorWell() const { return RoleValue() == kColorWellRole; } | 632 bool IsColorWell() const { return RoleValue() == kColorWellRole; } |
| 632 bool IsComboBox() const { return RoleValue() == kComboBoxRole; } | 633 bool IsComboBox() const { return RoleValue() == kComboBoxRole; } |
| 633 virtual bool IsControl() const { return false; } | 634 virtual bool IsControl() const { return false; } |
| 634 virtual bool IsDataTable() const { return false; } | 635 virtual bool IsDataTable() const { return false; } |
| 635 virtual bool IsEmbeddedObject() const { return false; } | 636 virtual bool IsEmbeddedObject() const { return false; } |
| 636 virtual bool IsFieldset() const { return false; } | 637 virtual bool IsFieldset() const { return false; } |
| 637 virtual bool IsHeading() const { return false; } | 638 virtual bool IsHeading() const { return false; } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 virtual bool IsSpinButtonPart() const { return false; } | 677 virtual bool IsSpinButtonPart() const { return false; } |
| 677 bool IsTabItem() const { return RoleValue() == kTabRole; } | 678 bool IsTabItem() const { return RoleValue() == kTabRole; } |
| 678 virtual bool IsTableCell() const { return false; } | 679 virtual bool IsTableCell() const { return false; } |
| 679 virtual bool IsTableRow() const { return false; } | 680 virtual bool IsTableRow() const { return false; } |
| 680 virtual bool IsTextControl() const { return false; } | 681 virtual bool IsTextControl() const { return false; } |
| 681 virtual bool IsTableCol() const { return false; } | 682 virtual bool IsTableCol() const { return false; } |
| 682 bool IsTree() const { return RoleValue() == kTreeRole; } | 683 bool IsTree() const { return RoleValue() == kTreeRole; } |
| 683 bool IsWebArea() const { return RoleValue() == kWebAreaRole; } | 684 bool IsWebArea() const { return RoleValue() == kWebAreaRole; } |
| 684 | 685 |
| 685 // Check object state. | 686 // Check object state. |
| 686 virtual bool IsChecked() const { return false; } | |
| 687 virtual bool IsClickable() const; | 687 virtual bool IsClickable() const; |
| 688 virtual bool IsCollapsed() const { return false; } | 688 virtual bool IsCollapsed() const { return false; } |
| 689 virtual bool IsEnabled() const { return false; } | 689 virtual bool IsEnabled() const { return false; } |
| 690 virtual AccessibilityExpanded IsExpanded() const { | 690 virtual AccessibilityExpanded IsExpanded() const { |
| 691 return kExpandedUndefined; | 691 return kExpandedUndefined; |
| 692 } | 692 } |
| 693 virtual bool IsFocused() const { return false; } | 693 virtual bool IsFocused() const { return false; } |
| 694 virtual bool IsHovered() const { return false; } | 694 virtual bool IsHovered() const { return false; } |
| 695 virtual bool IsLinked() const { return false; } | 695 virtual bool IsLinked() const { return false; } |
| 696 virtual bool IsLoaded() const { return false; } | 696 virtual bool IsLoaded() const { return false; } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 Vector<AXRange>&) const {} | 851 Vector<AXRange>&) const {} |
| 852 // For an inline text box. | 852 // For an inline text box. |
| 853 // The integer horizontal pixel offset of each character in the string; | 853 // The integer horizontal pixel offset of each character in the string; |
| 854 // negative values for RTL. | 854 // negative values for RTL. |
| 855 virtual void TextCharacterOffsets(Vector<int>&) const {} | 855 virtual void TextCharacterOffsets(Vector<int>&) const {} |
| 856 // The start and end character offset of each word in the object's text. | 856 // The start and end character offset of each word in the object's text. |
| 857 virtual void GetWordBoundaries(Vector<AXRange>&) const {} | 857 virtual void GetWordBoundaries(Vector<AXRange>&) const {} |
| 858 | 858 |
| 859 // Properties of interactive elements. | 859 // Properties of interactive elements. |
| 860 AXSupportedAction Action() const; | 860 AXSupportedAction Action() const; |
| 861 virtual AccessibilityButtonState CheckboxOrRadioValue() const; | 861 AccessibilityButtonState CheckedState() const; |
| 862 virtual AriaCurrentState GetAriaCurrentState() const { | 862 virtual AriaCurrentState GetAriaCurrentState() const { |
| 863 return kAriaCurrentStateUndefined; | 863 return kAriaCurrentStateUndefined; |
| 864 } | 864 } |
| 865 virtual InvalidState GetInvalidState() const { | 865 virtual InvalidState GetInvalidState() const { |
| 866 return kInvalidStateUndefined; | 866 return kInvalidStateUndefined; |
| 867 } | 867 } |
| 868 // Only used when invalidState() returns InvalidStateOther. | 868 // Only used when invalidState() returns InvalidStateOther. |
| 869 virtual String AriaInvalidValue() const { return String(); } | 869 virtual String AriaInvalidValue() const { return String(); } |
| 870 virtual String ValueDescription() const { return String(); } | 870 virtual String ValueDescription() const { return String(); } |
| 871 virtual float ValueForRange() const { return 0.0f; } | 871 virtual float ValueForRange() const { return 0.0f; } |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 mutable Member<AXObject> cached_live_region_root_; | 1113 mutable Member<AXObject> cached_live_region_root_; |
| 1114 | 1114 |
| 1115 Member<AXObjectCacheImpl> ax_object_cache_; | 1115 Member<AXObjectCacheImpl> ax_object_cache_; |
| 1116 | 1116 |
| 1117 // Updates the cached attribute values. This may be recursive, so to prevent | 1117 // Updates the cached attribute values. This may be recursive, so to prevent |
| 1118 // deadlocks, | 1118 // deadlocks, |
| 1119 // functions called here may only search up the tree (ancestors), not down. | 1119 // functions called here may only search up the tree (ancestors), not down. |
| 1120 void UpdateCachedAttributeValuesIfNeeded() const; | 1120 void UpdateCachedAttributeValuesIfNeeded() const; |
| 1121 | 1121 |
| 1122 private: | 1122 private: |
| 1123 static bool IsNativeInputInMixedState(const Node*); |
| 1123 static bool IncludesARIAWidgetRole(const String&); | 1124 static bool IncludesARIAWidgetRole(const String&); |
| 1124 static bool HasInteractiveARIAAttribute(const Element&); | 1125 static bool HasInteractiveARIAAttribute(const Element&); |
| 1125 | 1126 |
| 1126 static unsigned number_of_live_ax_objects_; | 1127 static unsigned number_of_live_ax_objects_; |
| 1127 }; | 1128 }; |
| 1128 | 1129 |
| 1129 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 1130 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 1130 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ | 1131 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, \ |
| 1131 object.predicate) | 1132 object.predicate) |
| 1132 | 1133 |
| 1133 } // namespace blink | 1134 } // namespace blink |
| 1134 | 1135 |
| 1135 #endif // AXObject_h | 1136 #endif // AXObject_h |
| OLD | NEW |