mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
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.
This commit is contained in:
parent
d7a116bb0e
commit
58309444d7
Notes:
sideshowbarker
2024-07-17 23:11:39 +09:00
Author: https://github.com/awesomekling
Commit: 58309444d7
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue