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

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

Issue 22880019: [DOM4] Doctypes now always have a node document and can be moved across document boundaries (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Improve tests Created 7 years, 4 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
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMImplementation.cpp
diff --git a/Source/core/dom/DOMImplementation.cpp b/Source/core/dom/DOMImplementation.cpp
index 14c51fefa766c6eb8489aa2926b7b4a991575439..3b888bce79dc1d4f970dc35734d4ad6e59945bc6 100644
--- a/Source/core/dom/DOMImplementation.cpp
+++ b/Source/core/dom/DOMImplementation.cpp
@@ -184,7 +184,7 @@ PassRefPtr<DocumentType> DOMImplementation::createDocumentType(const String& qua
if (!Document::parseQualifiedName(qualifiedName, prefix, localName, es))
return 0;
- return DocumentType::create(0, qualifiedName, publicId, systemId);
+ return DocumentType::create(m_document, qualifiedName, publicId, systemId);
}
DOMImplementation* DOMImplementation::getInterface(const String& /*feature*/)
@@ -213,16 +213,6 @@ PassRefPtr<Document> DOMImplementation::createDocument(const String& namespaceUR
return 0;
}
- // WrongDocumentError: Raised if doctype has already been used with a different document or was
- // created from a different implementation.
- // Hixie's interpretation of the DOM Core spec suggests we should prefer
- // other exceptions to WrongDocumentError (based on order mentioned in spec),
- // but this matches the new DOM Core spec (http://www.w3.org/TR/domcore/).
- if (doctype && doctype->document()) {
- es.throwDOMException(WrongDocumentError);
- return 0;
- }
-
if (doctype)
doc->appendChild(doctype);
if (documentElement)
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698