Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 1b58988fa57f7919eb3c223be714fb8e9d4aa15d..0958eb4485e22fb1e37254802ae491be0a8d193e 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -3333,8 +3333,8 @@ bool Document::canReplaceChild(const Node& newChild, const Node& oldChild) const |
} |
// Then, see how many doctypes and elements might be added by the new child. |
- if (newChild.nodeType() == DOCUMENT_FRAGMENT_NODE) { |
- for (Node* c = newChild.firstChild(); c; c = c->nextSibling()) { |
+ if (newChild.isDocumentFragment()) { |
+ for (Node* c = toDocumentFragment(newChild).firstChild(); c; c = c->nextSibling()) { |
aandrey
2014/06/02 14:50:51
why change this?
Inactive
2014/06/02 15:48:02
Because this ends up calling ContainerNode::firstC
Inactive
2014/06/02 15:49:02
BTW, this is not the only place where we should do
|
switch (c->nodeType()) { |
case ATTRIBUTE_NODE: |
case CDATA_SECTION_NODE: |