Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 2e9ebcf57b3a5d410e775ff3202f8586cbf684aa..189eb69bfd32898b22f469763957b31bc1f6ac75 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -837,6 +837,10 @@ PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionSt |
return createProcessingInstruction(importedNode->nodeName(), importedNode->nodeValue(), exceptionState); |
case COMMENT_NODE: |
return createComment(importedNode->nodeValue()); |
+ case DOCUMENT_TYPE_NODE: { |
+ DocumentType* doctype = toDocumentType(importedNode); |
+ return DocumentType::create(this, doctype->name(), doctype->publicId(), doctype->systemId()); |
+ } |
case ELEMENT_NODE: { |
Element* oldElement = toElement(importedNode); |
// FIXME: The following check might be unnecessary. Is it possible that |
@@ -890,7 +894,6 @@ PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionSt |
// FIXME: It should be possible to import these node types, however in DOM3 the DocumentType is readonly, so there isn't much sense in doing that. |
// Ability to add these imported nodes to a DocumentType will be considered for addition to a future release of the DOM. |
case DOCUMENT_NODE: |
- case DOCUMENT_TYPE_NODE: |
case XPATH_NAMESPACE_NODE: |
break; |
} |