Chromium Code Reviews| Index: Source/modules/accessibility/AXObject.cpp |
| diff --git a/Source/modules/accessibility/AXObject.cpp b/Source/modules/accessibility/AXObject.cpp |
| index 21eb762cd0146c48d5b545358409f72b0fd92892..3e9c16e15a65d5e65b63ea6c2bab292a696368d3 100644 |
| --- a/Source/modules/accessibility/AXObject.cpp |
| +++ b/Source/modules/accessibility/AXObject.cpp |
| @@ -375,7 +375,7 @@ AXObject::AXObject(AXObjectCacheImpl* axObjectCache) |
| , m_role(UnknownRole) |
| , m_lastKnownIsIgnoredValue(DefaultBehavior) |
| , m_detached(false) |
| - , m_parent(0) |
| + , m_parent(nullptr) |
| , m_lastModificationCount(-1) |
| , m_cachedIsIgnored(false) |
| , m_cachedIsInertOrAriaHidden(false) |
| @@ -383,7 +383,7 @@ AXObject::AXObject(AXObjectCacheImpl* axObjectCache) |
| , m_cachedIsDescendantOfDisabledNode(false) |
| , m_cachedHasInheritedPresentationalRole(false) |
| , m_cachedIsPresentationalChild(false) |
| - , m_cachedLiveRegionRoot(0) |
| + , m_cachedLiveRegionRoot(nullptr) |
| , m_axObjectCache(axObjectCache) |
| { |
| } |
| @@ -398,7 +398,7 @@ void AXObject::detach() |
| // Clear any children and call detachFromParent on them so that |
| // no children are left with dangling pointers to their parent. |
| clearChildren(); |
| - |
| + m_axObjectCache = nullptr; |
| m_detached = true; |
| } |
| @@ -666,9 +666,9 @@ bool AXObject::isPresentationalChild() const |
| return m_cachedIsPresentationalChild; |
| } |
| -String AXObject::name(AXNameFrom& nameFrom, Vector<AXObject*>& nameObjects) |
| +String AXObject::name(AXNameFrom& nameFrom, WillBeHeapVector<RawPtrWillBeMember<AXObject>>& nameObjects) |
| { |
| - HashSet<AXObject*> visited; |
| + WillBeHeapHashSet<RawPtrWillBeMember<AXObject>> visited; |
| return textAlternative(false, false, visited, &nameFrom, &nameObjects); |
| } |
| @@ -1477,4 +1477,12 @@ const AtomicString& AXObject::internalRoleName(AccessibilityRole role) |
| return internalRoleNameVector->at(role); |
| } |
| +DEFINE_TRACE(AXObject) |
| +{ |
| + visitor->trace(m_children); |
| + visitor->trace(m_parent); |
| + visitor->trace(m_cachedLiveRegionRoot); |
| + visitor->trace(m_axObjectCache); |
|
dmazzoni
2015/06/08 15:25:49
Why is this circular reference needed? It doesn't
haraken
2015/06/09 02:25:45
We don't need to worry about circular references w
keishi
2015/06/09 05:51:19
Like haraken said we don't need to worry about cir
dmazzoni
2015/06/09 18:07:28
I like the idea of using m_axObjectCache instead o
haraken
2015/06/10 00:55:57
I think the AccessibilityText part can be landed s
|
| +} |
| + |
| } // namespace blink |