| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 371 |
| 372 bool isNull() const { return !start && !length; } | 372 bool isNull() const { return !start && !length; } |
| 373 }; | 373 }; |
| 374 | 374 |
| 375 protected: | 375 protected: |
| 376 AXObject(AXObjectCacheImpl*); | 376 AXObject(AXObjectCacheImpl*); |
| 377 | 377 |
| 378 public: | 378 public: |
| 379 virtual ~AXObject(); | 379 virtual ~AXObject(); |
| 380 | 380 |
| 381 static unsigned instanceCount() { return s_instanceCount; } |
| 382 |
| 381 // After constructing an AXObject, it must be given a | 383 // After constructing an AXObject, it must be given a |
| 382 // unique ID, then added to AXObjectCacheImpl, and finally init() must | 384 // unique ID, then added to AXObjectCacheImpl, and finally init() must |
| 383 // be called last. | 385 // be called last. |
| 384 void setAXObjectID(AXID axObjectID) { m_id = axObjectID; } | 386 void setAXObjectID(AXID axObjectID) { m_id = axObjectID; } |
| 385 virtual void init() { } | 387 virtual void init() { } |
| 386 | 388 |
| 387 // When the corresponding WebCore object that this AXObject | 389 // When the corresponding WebCore object that this AXObject |
| 388 // wraps is deleted, it must be detached. | 390 // wraps is deleted, it must be detached. |
| 389 virtual void detach(); | 391 virtual void detach(); |
| 390 virtual bool isDetached() const; | 392 virtual bool isDetached() const; |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 | 788 |
| 787 AXObjectCacheImpl* m_axObjectCache; | 789 AXObjectCacheImpl* m_axObjectCache; |
| 788 | 790 |
| 789 // Updates the cached attribute values. This may be recursive, so to prevent
deadlocks, | 791 // Updates the cached attribute values. This may be recursive, so to prevent
deadlocks, |
| 790 // functions called here may only search up the tree (ancestors), not down. | 792 // functions called here may only search up the tree (ancestors), not down. |
| 791 void updateCachedAttributeValuesIfNeeded() const; | 793 void updateCachedAttributeValuesIfNeeded() const; |
| 792 | 794 |
| 793 private: | 795 private: |
| 794 static bool includesARIAWidgetRole(const String&); | 796 static bool includesARIAWidgetRole(const String&); |
| 795 static bool hasInteractiveARIAAttribute(const Element&); | 797 static bool hasInteractiveARIAAttribute(const Element&); |
| 798 |
| 799 static unsigned s_instanceCount; |
| 796 }; | 800 }; |
| 797 | 801 |
| 798 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ | 802 #define DEFINE_AX_OBJECT_TYPE_CASTS(thisType, predicate) \ |
| 799 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) | 803 DEFINE_TYPE_CASTS(thisType, AXObject, object, object->predicate, object.pred
icate) |
| 800 | 804 |
| 801 } // namespace blink | 805 } // namespace blink |
| 802 | 806 |
| 803 #endif // AXObject_h | 807 #endif // AXObject_h |
| OLD | NEW |