| 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 419 |
| 420 // Whether objects are ignored, i.e. not included in the tree. | 420 // Whether objects are ignored, i.e. not included in the tree. |
| 421 bool accessibilityIsIgnored() const; | 421 bool accessibilityIsIgnored() const; |
| 422 bool accessibilityIsIgnoredByDefault() const; | 422 bool accessibilityIsIgnoredByDefault() const; |
| 423 AXObjectInclusion accessibilityPlatformIncludesObject() const; | 423 AXObjectInclusion accessibilityPlatformIncludesObject() const; |
| 424 virtual AXObjectInclusion defaultObjectInclusion() const; | 424 virtual AXObjectInclusion defaultObjectInclusion() const; |
| 425 bool isInertOrAriaHidden() const; | 425 bool isInertOrAriaHidden() const; |
| 426 bool computeIsInertOrAriaHidden() const; | 426 bool computeIsInertOrAriaHidden() const; |
| 427 bool isDescendantOfBarrenParent() const; | 427 bool isDescendantOfBarrenParent() const; |
| 428 bool computeIsDescendantOfBarrenParent() const; | 428 bool computeIsDescendantOfBarrenParent() const; |
| 429 bool isDescendantOfDisabledParent() const; |
| 430 bool computeIsDescendantOfDisabledParent() const; |
| 429 bool lastKnownIsIgnoredValue(); | 431 bool lastKnownIsIgnoredValue(); |
| 430 void setLastKnownIsIgnoredValue(bool); | 432 void setLastKnownIsIgnoredValue(bool); |
| 431 | 433 |
| 432 // Properties of static elements. | 434 // Properties of static elements. |
| 433 virtual const AtomicString& accessKey() const { return nullAtom; } | 435 virtual const AtomicString& accessKey() const { return nullAtom; } |
| 434 virtual bool canvasHasFallbackContent() const { return false; } | 436 virtual bool canvasHasFallbackContent() const { return false; } |
| 435 virtual bool exposesTitleUIElement() const { return true; } | 437 virtual bool exposesTitleUIElement() const { return true; } |
| 436 virtual int headingLevel() const { return 0; } | 438 virtual int headingLevel() const { return 0; } |
| 437 // 1-based, to match the aria-level spec. | 439 // 1-based, to match the aria-level spec. |
| 438 virtual unsigned hierarchicalLevel() const { return 0; } | 440 virtual unsigned hierarchicalLevel() const { return 0; } |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 bool m_detached; | 641 bool m_detached; |
| 640 | 642 |
| 641 mutable AXObject* m_parent; | 643 mutable AXObject* m_parent; |
| 642 | 644 |
| 643 // The following cached attribute values (the ones starting with m_cached*) | 645 // The following cached attribute values (the ones starting with m_cached*) |
| 644 // are only valid if m_lastModificationCount matches AXObjectCacheImpl::modi
ficationCount(). | 646 // are only valid if m_lastModificationCount matches AXObjectCacheImpl::modi
ficationCount(). |
| 645 mutable int m_lastModificationCount; | 647 mutable int m_lastModificationCount; |
| 646 mutable bool m_cachedIsIgnored : 1; | 648 mutable bool m_cachedIsIgnored : 1; |
| 647 mutable bool m_cachedIsInertOrAriaHidden : 1; | 649 mutable bool m_cachedIsInertOrAriaHidden : 1; |
| 648 mutable bool m_cachedIsDescendantOfBarrenParent : 1; | 650 mutable bool m_cachedIsDescendantOfBarrenParent : 1; |
| 651 mutable bool m_cachedIsDescendantOfDisabledParent : 1; |
| 649 mutable const AXObject* m_cachedLiveRegionRoot; | 652 mutable const AXObject* m_cachedLiveRegionRoot; |
| 650 | 653 |
| 651 AXObjectCacheImpl* m_axObjectCache; | 654 AXObjectCacheImpl* m_axObjectCache; |
| 652 | 655 |
| 653 // Updates the cached attribute values. This may be recursive, so to prevent
deadlocks, | 656 // Updates the cached attribute values. This may be recursive, so to prevent
deadlocks, |
| 654 // functions called here may only search up the tree (ancestors), not down. | 657 // functions called here may only search up the tree (ancestors), not down. |
| 655 void updateCachedAttributeValuesIfNeeded() const; | 658 void updateCachedAttributeValuesIfNeeded() const; |
| 656 | 659 |
| 657 private: | 660 private: |
| 658 static bool includesARIAWidgetRole(const String&); | 661 static bool includesARIAWidgetRole(const String&); |
| 659 static bool hasInteractiveARIAAttribute(const Element&); | 662 static bool hasInteractiveARIAAttribute(const Element&); |
| 660 }; | 663 }; |
| 661 | 664 |
| 662 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 665 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 663 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 666 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
| 664 | 667 |
| 665 } // namespace blink | 668 } // namespace blink |
| 666 | 669 |
| 667 #endif // AXObject_h | 670 #endif // AXObject_h |
| OLD | NEW |