Chromium Code Reviews| Index: Source/core/dom/Document.cpp |
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
| index 67d2aade857ba3a23849345346db45b872b6a5fb..aedb82cfd8d8e76b27f94995805b7fa7464715f8 100644 |
| --- a/Source/core/dom/Document.cpp |
| +++ b/Source/core/dom/Document.cpp |
| @@ -2185,8 +2185,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()) { |
|
haraken
2015/06/24 11:52:13
Maybe worth having a comment about the relationshi
|
| + for (Node& node : NodeTraversal::descendantsOf(*this)) { |
| + cache->remove(&node); |
| + } |
| + } |
| m_layoutView = nullptr; |
| ContainerNode::detach(context); |