| 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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 // Internal function used to determine whether the result of calling |name|
on this object would | 715 // Internal function used to determine whether the result of calling |name|
on this object would |
| 716 // return text that came from the an HTML label element or not. This is inte
nded to be faster than calling | 716 // return text that came from the an HTML label element or not. This is inte
nded to be faster than calling |
| 717 // |name| or |textAlternative|, and without side effects (it won't call axOb
jectCache->getOrCreate). | 717 // |name| or |textAlternative|, and without side effects (it won't call axOb
jectCache->getOrCreate). |
| 718 virtual bool nameFromLabelElement() const { return false; } | 718 virtual bool nameFromLabelElement() const { return false; } |
| 719 | 719 |
| 720 // | 720 // |
| 721 // Properties of static elements. | 721 // Properties of static elements. |
| 722 // | 722 // |
| 723 | 723 |
| 724 virtual const AtomicString& accessKey() const { return nullAtom; } | 724 virtual const AtomicString& accessKey() const { return nullAtom; } |
| 725 virtual RGBA32 backgroundColor() const { return Color::transparent; } | 725 RGBA32 backgroundColor() const; |
| 726 virtual RGBA32 computeBackgroundColor() const { return Color::transparent; } |
| 726 virtual RGBA32 color() const { return Color::black; } | 727 virtual RGBA32 color() const { return Color::black; } |
| 727 // Used by objects of role ColorWellRole. | 728 // Used by objects of role ColorWellRole. |
| 728 virtual RGBA32 colorValue() const { return Color::transparent; } | 729 virtual RGBA32 colorValue() const { return Color::transparent; } |
| 729 virtual bool canvasHasFallbackContent() const { return false; } | 730 virtual bool canvasHasFallbackContent() const { return false; } |
| 730 virtual String fontFamily() const { return nullAtom; } | 731 virtual String fontFamily() const { return nullAtom; } |
| 731 // Font size is in pixels. | 732 // Font size is in pixels. |
| 732 virtual float fontSize() const { return 0.0f; } | 733 virtual float fontSize() const { return 0.0f; } |
| 733 virtual int headingLevel() const { return 0; } | 734 virtual int headingLevel() const { return 0; } |
| 734 // 1-based, to match the aria-level spec. | 735 // 1-based, to match the aria-level spec. |
| 735 virtual unsigned hierarchicalLevel() const { return 0; } | 736 virtual unsigned hierarchicalLevel() const { return 0; } |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 | 955 |
| 955 virtual bool nameFromContents() const; | 956 virtual bool nameFromContents() const; |
| 956 | 957 |
| 957 AccessibilityRole buttonRoleType() const; | 958 AccessibilityRole buttonRoleType() const; |
| 958 | 959 |
| 959 mutable Member<AXObject> m_parent; | 960 mutable Member<AXObject> m_parent; |
| 960 | 961 |
| 961 // The following cached attribute values (the ones starting with m_cached*) | 962 // The following cached attribute values (the ones starting with m_cached*) |
| 962 // are only valid if m_lastModificationCount matches AXObjectCacheImpl::modi
ficationCount(). | 963 // are only valid if m_lastModificationCount matches AXObjectCacheImpl::modi
ficationCount(). |
| 963 mutable int m_lastModificationCount; | 964 mutable int m_lastModificationCount; |
| 965 mutable RGBA32 m_cachedBackgroundColor; |
| 964 mutable bool m_cachedIsIgnored : 1; | 966 mutable bool m_cachedIsIgnored : 1; |
| 965 mutable bool m_cachedIsInertOrAriaHidden : 1; | 967 mutable bool m_cachedIsInertOrAriaHidden : 1; |
| 966 mutable bool m_cachedIsDescendantOfLeafNode : 1; | 968 mutable bool m_cachedIsDescendantOfLeafNode : 1; |
| 967 mutable bool m_cachedIsDescendantOfDisabledNode : 1; | 969 mutable bool m_cachedIsDescendantOfDisabledNode : 1; |
| 968 mutable bool m_cachedHasInheritedPresentationalRole : 1; | 970 mutable bool m_cachedHasInheritedPresentationalRole : 1; |
| 969 mutable bool m_cachedIsPresentationalChild : 1; | 971 mutable bool m_cachedIsPresentationalChild : 1; |
| 970 mutable bool m_cachedAncestorExposesActiveDescendant : 1; | 972 mutable bool m_cachedAncestorExposesActiveDescendant : 1; |
| 971 mutable Member<const AXObject> m_cachedLiveRegionRoot; | 973 mutable Member<const AXObject> m_cachedLiveRegionRoot; |
| 972 | 974 |
| 973 Member<AXObjectCacheImpl> m_axObjectCache; | 975 Member<AXObjectCacheImpl> m_axObjectCache; |
| 974 | 976 |
| 975 // Updates the cached attribute values. This may be recursive, so to prevent
deadlocks, | 977 // Updates the cached attribute values. This may be recursive, so to prevent
deadlocks, |
| 976 // functions called here may only search up the tree (ancestors), not down. | 978 // functions called here may only search up the tree (ancestors), not down. |
| 977 void updateCachedAttributeValuesIfNeeded() const; | 979 void updateCachedAttributeValuesIfNeeded() const; |
| 978 | 980 |
| 979 private: | 981 private: |
| 980 static bool includesARIAWidgetRole(const String&); | 982 static bool includesARIAWidgetRole(const String&); |
| 981 static bool hasInteractiveARIAAttribute(const Element&); | 983 static bool hasInteractiveARIAAttribute(const Element&); |
| 982 | 984 |
| 983 static unsigned s_numberOfLiveAXObjects; | 985 static unsigned s_numberOfLiveAXObjects; |
| 984 }; | 986 }; |
| 985 | 987 |
| 986 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 988 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 987 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 989 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
| 988 | 990 |
| 989 } // namespace blink | 991 } // namespace blink |
| 990 | 992 |
| 991 #endif // AXObject_h | 993 #endif // AXObject_h |
| OLD | NEW |