Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Unified Diff: Source/core/dom/ChildNodeList.cpp

Issue 132923003: Make sure the rootNode of a LiveNodeListBase is always a ContainerNode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Slightly clearer cast Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/ChildNodeList.cpp
diff --git a/Source/core/dom/ChildNodeList.cpp b/Source/core/dom/ChildNodeList.cpp
index 4144c04cbe57fb38c5504c498ba9b4d4830a0515..372a2332ff5594542352905a3456f98b154720a4 100644
--- a/Source/core/dom/ChildNodeList.cpp
+++ b/Source/core/dom/ChildNodeList.cpp
@@ -28,7 +28,7 @@
namespace WebCore {
-ChildNodeList::ChildNodeList(PassRefPtr<Node> node)
+ChildNodeList::ChildNodeList(PassRefPtr<ContainerNode> node)
: LiveNodeList(node, ChildNodeListType, DoNotInvalidateOnAttributeChanges)
{
}
@@ -45,4 +45,9 @@ bool ChildNodeList::nodeMatches(Element* testNode) const
return testNode->parentNode() == rootNode();
}
+EmptyNodeList::~EmptyNodeList()
+{
+ m_owner->nodeLists()->removeEmptyChildNodeList(this);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698