summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-12-04 14:38:16 +0100
committerAndreas Kling <kling@serenityos.org>2021-12-04 14:38:16 +0100
commit58309444d735d9e69ebb45a85cdf6d594fedfeb0 (patch)
tree69cf3f0ba0537e9d822c28a305fa0091b801e740 /Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp
parentd7a116bb0e260a8ea3b6ac0f2a5c7959c70d6f20 (diff)
downloadserenity-58309444d735d9e69ebb45a85cdf6d594fedfeb0.zip
LibWeb: Fix DOMImplementation changing content type of wrong document
DOMImplementation.createDocument() should set the content type of the newly created document, not replace the content type of the DOMImplementation's own host document.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp')
-rw-r--r--Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp b/Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp
index 1b46a0d5f6..7dab0f5c62 100644
--- a/Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp
+++ b/Userland/Libraries/LibWeb/DOM/DOMImplementation.cpp
@@ -40,11 +40,11 @@ NonnullRefPtr<Document> DOMImplementation::create_document(const String& namespa
xml_document->set_origin(m_document.origin());
if (namespace_ == Namespace::HTML)
- m_document.set_content_type("application/xhtml+xml");
+ xml_document->set_content_type("application/xhtml+xml");
else if (namespace_ == Namespace::SVG)
- m_document.set_content_type("image/svg+xml");
+ xml_document->set_content_type("image/svg+xml");
else
- m_document.set_content_type("application/xml");
+ xml_document->set_content_type("application/xml");
return xml_document;
}