| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2008 Nuanti Ltd. | 4 * Copyright (C) 2008 Nuanti Ltd. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 int LineForPosition(const VisiblePosition&) const; | 803 int LineForPosition(const VisiblePosition&) const; |
| 804 virtual int Index(const VisiblePosition&) const { return -1; } | 804 virtual int Index(const VisiblePosition&) const { return -1; } |
| 805 virtual void LineBreaks(Vector<int>&) const {} | 805 virtual void LineBreaks(Vector<int>&) const {} |
| 806 | 806 |
| 807 // Static helper functions. | 807 // Static helper functions. |
| 808 static bool IsARIAControl(AccessibilityRole); | 808 static bool IsARIAControl(AccessibilityRole); |
| 809 static bool IsARIAInput(AccessibilityRole); | 809 static bool IsARIAInput(AccessibilityRole); |
| 810 static AccessibilityRole AriaRoleToWebCoreRole(const String&); | 810 static AccessibilityRole AriaRoleToWebCoreRole(const String&); |
| 811 static const AtomicString& RoleName(AccessibilityRole); | 811 static const AtomicString& RoleName(AccessibilityRole); |
| 812 static const AtomicString& InternalRoleName(AccessibilityRole); | 812 static const AtomicString& InternalRoleName(AccessibilityRole); |
| 813 static bool IsInsideFocusableElementOrARIAWidget(const Node&); | |
| 814 | 813 |
| 815 protected: | 814 protected: |
| 816 AXID id_; | 815 AXID id_; |
| 817 AXObjectVector children_; | 816 AXObjectVector children_; |
| 818 mutable bool have_children_; | 817 mutable bool have_children_; |
| 819 AccessibilityRole role_; | 818 AccessibilityRole role_; |
| 820 AXObjectInclusion last_known_is_ignored_value_; | 819 AXObjectInclusion last_known_is_ignored_value_; |
| 821 LayoutRect explicit_element_rect_; | 820 LayoutRect explicit_element_rect_; |
| 822 AXID explicit_container_id_; | 821 AXID explicit_container_id_; |
| 823 | 822 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 | 878 |
| 880 Member<AXObjectCacheImpl> ax_object_cache_; | 879 Member<AXObjectCacheImpl> ax_object_cache_; |
| 881 | 880 |
| 882 // Updates the cached attribute values. This may be recursive, so to prevent | 881 // Updates the cached attribute values. This may be recursive, so to prevent |
| 883 // deadlocks, | 882 // deadlocks, |
| 884 // functions called here may only search up the tree (ancestors), not down. | 883 // functions called here may only search up the tree (ancestors), not down. |
| 885 void UpdateCachedAttributeValuesIfNeeded() const; | 884 void UpdateCachedAttributeValuesIfNeeded() const; |
| 886 | 885 |
| 887 private: | 886 private: |
| 888 static bool IsNativeInputInMixedState(const Node*); | 887 static bool IsNativeInputInMixedState(const Node*); |
| 889 static bool IncludesARIAWidgetRole(const String&); | |
| 890 static bool HasInteractiveARIAAttribute(const Element&); | |
| 891 | 888 |
| 892 static unsigned number_of_live_ax_objects_; | 889 static unsigned number_of_live_ax_objects_; |
| 893 }; | 890 }; |
| 894 | 891 |
| 895 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true); | 892 DEFINE_TYPE_CASTS(AXObjectImpl, AXObject, obj, true, true); |
| 896 | 893 |
| 897 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 894 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 898 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \ | 895 DEFINE_TYPE_CASTS(thisType, AXObjectImpl, object, object->predicate, \ |
| 899 object.predicate) | 896 object.predicate) |
| 900 | 897 |
| 901 } // namespace blink | 898 } // namespace blink |
| 902 | 899 |
| 903 #endif // AXObjectImpl_h | 900 #endif // AXObjectImpl_h |
| OLD | NEW |