Chromium Code Reviews| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 368 } | 368 } |
| 369 | 369 |
| 370 } // namespace | 370 } // namespace |
| 371 | 371 |
| 372 AXObject::AXObject(AXObjectCacheImpl* axObjectCache) | 372 AXObject::AXObject(AXObjectCacheImpl* axObjectCache) |
| 373 : m_id(0) | 373 : m_id(0) |
| 374 , m_haveChildren(false) | 374 , m_haveChildren(false) |
| 375 , m_role(UnknownRole) | 375 , m_role(UnknownRole) |
| 376 , m_lastKnownIsIgnoredValue(DefaultBehavior) | 376 , m_lastKnownIsIgnoredValue(DefaultBehavior) |
| 377 , m_detached(false) | 377 , m_detached(false) |
| 378 , m_parent(0) | 378 , m_parent(nullptr) |
| 379 , m_lastModificationCount(-1) | 379 , m_lastModificationCount(-1) |
| 380 , m_cachedIsIgnored(false) | 380 , m_cachedIsIgnored(false) |
| 381 , m_cachedIsInertOrAriaHidden(false) | 381 , m_cachedIsInertOrAriaHidden(false) |
| 382 , m_cachedIsDescendantOfLeafNode(false) | 382 , m_cachedIsDescendantOfLeafNode(false) |
| 383 , m_cachedIsDescendantOfDisabledNode(false) | 383 , m_cachedIsDescendantOfDisabledNode(false) |
| 384 , m_cachedHasInheritedPresentationalRole(false) | 384 , m_cachedHasInheritedPresentationalRole(false) |
| 385 , m_cachedIsPresentationalChild(false) | 385 , m_cachedIsPresentationalChild(false) |
| 386 , m_cachedLiveRegionRoot(0) | 386 , m_cachedLiveRegionRoot(nullptr) |
| 387 , m_axObjectCache(axObjectCache) | 387 , m_axObjectCache(axObjectCache) |
| 388 { | 388 { |
| 389 } | 389 } |
| 390 | 390 |
| 391 AXObject::~AXObject() | 391 AXObject::~AXObject() |
| 392 { | 392 { |
| 393 #if !ENABLE(OILPAN) | |
| 393 ASSERT(isDetached()); | 394 ASSERT(isDetached()); |
|
haraken
2015/05/28 10:48:40
Just help me understand: In what scenario is it po
keishi
2015/06/08 06:27:20
Reverted.
| |
| 395 #endif | |
| 394 } | 396 } |
| 395 | 397 |
| 396 void AXObject::detach() | 398 void AXObject::detach() |
| 397 { | 399 { |
| 398 // Clear any children and call detachFromParent on them so that | 400 // Clear any children and call detachFromParent on them so that |
| 399 // no children are left with dangling pointers to their parent. | 401 // no children are left with dangling pointers to their parent. |
| 400 clearChildren(); | 402 clearChildren(); |
| 401 | 403 |
| 402 m_detached = true; | 404 m_detached = true; |
| 403 } | 405 } |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 659 updateCachedAttributeValuesIfNeeded(); | 661 updateCachedAttributeValuesIfNeeded(); |
| 660 return m_cachedHasInheritedPresentationalRole; | 662 return m_cachedHasInheritedPresentationalRole; |
| 661 } | 663 } |
| 662 | 664 |
| 663 bool AXObject::isPresentationalChild() const | 665 bool AXObject::isPresentationalChild() const |
| 664 { | 666 { |
| 665 updateCachedAttributeValuesIfNeeded(); | 667 updateCachedAttributeValuesIfNeeded(); |
| 666 return m_cachedIsPresentationalChild; | 668 return m_cachedIsPresentationalChild; |
| 667 } | 669 } |
| 668 | 670 |
| 669 String AXObject::name(AXNameFrom& nameFrom, Vector<AXObject*>& nameObjects) | 671 String AXObject::name(AXNameFrom& nameFrom, WillBeHeapVector<RawPtrWillBeMember< AXObject>>& nameObjects) |
| 670 { | 672 { |
| 671 HashSet<AXObject*> visited; | 673 WillBeHeapHashSet<RawPtrWillBeMember<AXObject>> visited; |
| 672 return textAlternative(false, false, visited, &nameFrom, &nameObjects); | 674 return textAlternative(false, false, visited, &nameFrom, &nameObjects); |
| 673 } | 675 } |
| 674 | 676 |
| 675 // In ARIA 1.1, the default value for aria-orientation changed from horizontal t o undefined. | 677 // In ARIA 1.1, the default value for aria-orientation changed from horizontal t o undefined. |
| 676 AccessibilityOrientation AXObject::orientation() const | 678 AccessibilityOrientation AXObject::orientation() const |
| 677 { | 679 { |
| 678 return AccessibilityOrientationUndefined; | 680 return AccessibilityOrientationUndefined; |
| 679 } | 681 } |
| 680 | 682 |
| 681 static String queryString(WebLocalizedString::Name name) | 683 static String queryString(WebLocalizedString::Name name) |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1467 return roleNameVector->at(role); | 1469 return roleNameVector->at(role); |
| 1468 } | 1470 } |
| 1469 | 1471 |
| 1470 const AtomicString& AXObject::internalRoleName(AccessibilityRole role) | 1472 const AtomicString& AXObject::internalRoleName(AccessibilityRole role) |
| 1471 { | 1473 { |
| 1472 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo leNameVector(); | 1474 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo leNameVector(); |
| 1473 | 1475 |
| 1474 return internalRoleNameVector->at(role); | 1476 return internalRoleNameVector->at(role); |
| 1475 } | 1477 } |
| 1476 | 1478 |
| 1479 DEFINE_TRACE(AXObject) | |
| 1480 { | |
| 1481 visitor->trace(m_children); | |
| 1482 visitor->trace(m_parent); | |
| 1483 visitor->trace(m_cachedLiveRegionRoot); | |
| 1484 visitor->trace(m_axObjectCache); | |
| 1485 } | |
| 1486 | |
| 1477 } // namespace blink | 1487 } // namespace blink |
| OLD | NEW |