| 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 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 }; | 363 }; |
| 364 | 364 |
| 365 | 365 |
| 366 HTMLDialogElement* getActiveDialogElement(Node* node) | 366 HTMLDialogElement* getActiveDialogElement(Node* node) |
| 367 { | 367 { |
| 368 return node->document().activeModalDialog(); | 368 return node->document().activeModalDialog(); |
| 369 } | 369 } |
| 370 | 370 |
| 371 } // namespace | 371 } // namespace |
| 372 | 372 |
| 373 unsigned AXObject::s_numberOfLiveAXObjects = 0; |
| 374 |
| 373 AXObject::AXObject(AXObjectCacheImpl& axObjectCache) | 375 AXObject::AXObject(AXObjectCacheImpl& axObjectCache) |
| 374 : m_id(0) | 376 : m_id(0) |
| 375 , m_haveChildren(false) | 377 , m_haveChildren(false) |
| 376 , m_role(UnknownRole) | 378 , m_role(UnknownRole) |
| 377 , m_lastKnownIsIgnoredValue(DefaultBehavior) | 379 , m_lastKnownIsIgnoredValue(DefaultBehavior) |
| 378 , m_parent(0) | 380 , m_parent(0) |
| 379 , m_lastModificationCount(-1) | 381 , m_lastModificationCount(-1) |
| 380 , m_cachedIsIgnored(false) | 382 , m_cachedIsIgnored(false) |
| 381 , m_cachedIsInertOrAriaHidden(false) | 383 , m_cachedIsInertOrAriaHidden(false) |
| 382 , m_cachedIsDescendantOfLeafNode(false) | 384 , m_cachedIsDescendantOfLeafNode(false) |
| 383 , m_cachedIsDescendantOfDisabledNode(false) | 385 , m_cachedIsDescendantOfDisabledNode(false) |
| 384 , m_cachedHasInheritedPresentationalRole(false) | 386 , m_cachedHasInheritedPresentationalRole(false) |
| 385 , m_cachedIsPresentationalChild(false) | 387 , m_cachedIsPresentationalChild(false) |
| 386 , m_cachedLiveRegionRoot(0) | 388 , m_cachedLiveRegionRoot(0) |
| 387 , m_axObjectCache(&axObjectCache) | 389 , m_axObjectCache(&axObjectCache) |
| 388 { | 390 { |
| 391 ++s_numberOfLiveAXObjects; |
| 389 } | 392 } |
| 390 | 393 |
| 391 AXObject::~AXObject() | 394 AXObject::~AXObject() |
| 392 { | 395 { |
| 393 ASSERT(isDetached()); | 396 ASSERT(isDetached()); |
| 397 --s_numberOfLiveAXObjects; |
| 394 } | 398 } |
| 395 | 399 |
| 396 void AXObject::detach() | 400 void AXObject::detach() |
| 397 { | 401 { |
| 398 // Clear any children and call detachFromParent on them so that | 402 // Clear any children and call detachFromParent on them so that |
| 399 // no children are left with dangling pointers to their parent. | 403 // no children are left with dangling pointers to their parent. |
| 400 clearChildren(); | 404 clearChildren(); |
| 401 | 405 |
| 402 m_axObjectCache = nullptr; | 406 m_axObjectCache = nullptr; |
| 403 } | 407 } |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1474 } | 1478 } |
| 1475 | 1479 |
| 1476 const AtomicString& AXObject::internalRoleName(AccessibilityRole role) | 1480 const AtomicString& AXObject::internalRoleName(AccessibilityRole role) |
| 1477 { | 1481 { |
| 1478 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo
leNameVector(); | 1482 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo
leNameVector(); |
| 1479 | 1483 |
| 1480 return internalRoleNameVector->at(role); | 1484 return internalRoleNameVector->at(role); |
| 1481 } | 1485 } |
| 1482 | 1486 |
| 1483 } // namespace blink | 1487 } // namespace blink |
| OLD | NEW |