| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 73f20e044eff49f9a207fc7fc9b2a43e45470128..ef051876b14c7f00a35482496c1d8b49c082ff84 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -94,6 +94,7 @@
|
| #include "core/dom/TransformSource.h"
|
| #include "core/dom/TreeWalker.h"
|
| #include "core/dom/VisitedLinkState.h"
|
| +#include "core/dom/XMLDocument.h"
|
| #include "core/dom/custom/CustomElementRegistrationContext.h"
|
| #include "core/dom/shadow/ElementShadow.h"
|
| #include "core/dom/shadow/ShadowRoot.h"
|
| @@ -1202,10 +1203,13 @@ void Document::setContent(const String& content)
|
|
|
| String Document::suggestedMIMEType() const
|
| {
|
| - if (isXHTMLDocument())
|
| - return "application/xhtml+xml";
|
| - if (isSVGDocument())
|
| - return "image/svg+xml";
|
| + if (isXMLDocument()) {
|
| + if (isXHTMLDocument())
|
| + return "application/xhtml+xml";
|
| + if (isSVGDocument())
|
| + return "image/svg+xml";
|
| + return "application/xml";
|
| + }
|
| if (xmlStandalone())
|
| return "text/xml";
|
| if (isHTMLDocument())
|
| @@ -3174,8 +3178,11 @@ PassRefPtr<Node> Document::cloneNode(bool deep)
|
| PassRefPtr<Document> Document::cloneDocumentWithoutChildren()
|
| {
|
| DocumentInit init(url());
|
| - if (isXHTMLDocument())
|
| - return createXHTML(init.withRegistrationContext(registrationContext()));
|
| + if (isXMLDocument()) {
|
| + if (isXHTMLDocument())
|
| + return XMLDocument::createXHTML(init.withRegistrationContext(registrationContext()));
|
| + return XMLDocument::create(init);
|
| + }
|
| return create(init);
|
| }
|
|
|
|
|