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

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

Issue 268803005: Replace SVGDocument by XMLDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add rootElement() variant Created 6 years, 7 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/core.gypi ('k') | Source/core/dom/XMLDocument.h » ('j') | 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 c3e1784c0e7d5a249827a5491d93f087467fa01c..8b5297e622bd7a350885fccd2d091b75360ee886 100644
--- a/Source/core/dom/DOMImplementation.cpp
+++ b/Source/core/dom/DOMImplementation.cpp
@@ -49,7 +49,6 @@
#include "core/html/TextDocument.h"
#include "core/loader/FrameLoader.h"
#include "core/page/Page.h"
-#include "core/svg/SVGDocument.h"
#include "platform/ContentType.h"
#include "platform/MIMETypeRegistry.h"
#include "platform/graphics/Image.h"
@@ -204,9 +203,7 @@ PassRefPtr<XMLDocument> DOMImplementation::createDocument(const AtomicString& na
RefPtr<XMLDocument> doc;
DocumentInit init = DocumentInit::fromContext(m_document.contextDocument());
if (namespaceURI == SVGNames::svgNamespaceURI) {
- // FIXME: This should be an XMLDocument as per DOM4 but we need to get rid of SVGDocument first.
- // SVGDocument no longer exists in SVG2.
- doc = SVGDocument::create(init);
+ doc = XMLDocument::createSVG(init);
} else if (namespaceURI == HTMLNames::xhtmlNamespaceURI) {
doc = XMLDocument::createXHTML(init.withRegistrationContext(m_document.registrationContext()));
} else {
@@ -374,7 +371,7 @@ PassRefPtr<Document> DOMImplementation::createDocument(const String& type, const
if (isTextMIMEType(type))
return TextDocument::create(init);
if (type == "image/svg+xml")
- return SVGDocument::create(init);
+ return XMLDocument::createSVG(init);
if (isXMLMIMEType(type))
return XMLDocument::create(init);
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/XMLDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698