| 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 | 384 |
| 385 bool isNull() const { return !start && !length; } | 385 bool isNull() const { return !start && !length; } |
| 386 }; | 386 }; |
| 387 | 387 |
| 388 protected: | 388 protected: |
| 389 AXObject(AXObjectCacheImpl&); | 389 AXObject(AXObjectCacheImpl&); |
| 390 | 390 |
| 391 public: | 391 public: |
| 392 virtual ~AXObject(); | 392 virtual ~AXObject(); |
| 393 | 393 |
| 394 static unsigned numberOfLiveAXObjects() { return s_numberOfLiveAXObjects; } |
| 395 |
| 394 // After constructing an AXObject, it must be given a | 396 // After constructing an AXObject, it must be given a |
| 395 // unique ID, then added to AXObjectCacheImpl, and finally init() must | 397 // unique ID, then added to AXObjectCacheImpl, and finally init() must |
| 396 // be called last. | 398 // be called last. |
| 397 void setAXObjectID(AXID axObjectID) { m_id = axObjectID; } | 399 void setAXObjectID(AXID axObjectID) { m_id = axObjectID; } |
| 398 virtual void init() { } | 400 virtual void init() { } |
| 399 | 401 |
| 400 // When the corresponding WebCore object that this AXObject | 402 // When the corresponding WebCore object that this AXObject |
| 401 // wraps is deleted, it must be detached. | 403 // wraps is deleted, it must be detached. |
| 402 virtual void detach(); | 404 virtual void detach(); |
| 403 virtual bool isDetached() const; | 405 virtual bool isDetached() const; |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 | 801 |
| 800 AXObjectCacheImpl* m_axObjectCache; | 802 AXObjectCacheImpl* m_axObjectCache; |
| 801 | 803 |
| 802 // Updates the cached attribute values. This may be recursive, so to prevent
deadlocks, | 804 // Updates the cached attribute values. This may be recursive, so to prevent
deadlocks, |
| 803 // functions called here may only search up the tree (ancestors), not down. | 805 // functions called here may only search up the tree (ancestors), not down. |
| 804 void updateCachedAttributeValuesIfNeeded() const; | 806 void updateCachedAttributeValuesIfNeeded() const; |
| 805 | 807 |
| 806 private: | 808 private: |
| 807 static bool includesARIAWidgetRole(const String&); | 809 static bool includesARIAWidgetRole(const String&); |
| 808 static bool hasInteractiveARIAAttribute(const Element&); | 810 static bool hasInteractiveARIAAttribute(const Element&); |
| 811 |
| 812 static unsigned s_numberOfLiveAXObjects; |
| 809 }; | 813 }; |
| 810 | 814 |
| 811 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 815 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 812 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 816 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
| 813 | 817 |
| 814 } // namespace blink | 818 } // namespace blink |
| 815 | 819 |
| 816 #endif // AXObject_h | 820 #endif // AXObject_h |
| OLD | NEW |