Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 0620531f3449e3f1339a7051bcd1b19214ebf09d..b42792bd511bcbe854a6d89e526529894659f27f 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -2024,9 +2024,9 @@ void Document::setVisuallyOrdered() |
PassRefPtr<DocumentParser> Document::createParser() |
{ |
- if (isHTMLDocument()) { |
+ if (isHTMLDocument() || (RuntimeEnabledFeatures::parseSVGAsHTMLEnabled() && isSVGDocument())) { |
bool reportErrors = InspectorInstrumentation::collectingHTMLParseErrors(this->page()); |
- return HTMLDocumentParser::create(toHTMLDocument(this), reportErrors); |
+ return HTMLDocumentParser::create(this, reportErrors); |
} |
// FIXME: this should probably pass the frame instead |
return XMLDocumentParser::create(this, view()); |