Chromium Code Reviews| Index: Source/core/dom/Document.cpp |
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
| index 9b0511ddc6e663203c3e32580568af971fab7083..e7d7f5eb112a1e435c21a02c82d9ae9e685e7b26 100644 |
| --- a/Source/core/dom/Document.cpp |
| +++ b/Source/core/dom/Document.cpp |
| @@ -2127,8 +2127,13 @@ void Document::detach(const AttachContext& context) |
| frameHost()->chromeClient().focusedNodeChanged(oldFocusedElement.get(), nullptr); |
| } |
| - if (this == &axObjectCacheOwner()) |
| + if (this == &axObjectCacheOwner()) { |
| clearAXObjectCache(); |
| + } else if (AXObjectCache* cache = existingAXObjectCache()) { |
| + for (Element& element : ElementTraversal::descendantsOf(*this)) { |
| + cache->remove(&element); |
|
dmazzoni
2015/06/08 15:25:49
What would happen if we called AXObjectCache::getO
|
| + } |
| + } |
| m_layoutView = nullptr; |
| ContainerNode::detach(context); |