From 70b9cddc48da064768cf4ad36f9ee04a53963050 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Sun, 18 Feb 2024 14:27:25 +0000 Subject: [PATCH] LibWeb: Align `Document::document_type()` default with the specification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DOM specification states that: "Unless stated otherwise, a document’s [...] type is 'xml'". Previously, calls to `Document::document_type()` were returning the incorrect value for non-HTML documents. --- Userland/Libraries/LibWeb/DOM/Document.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index 02b9b8dd2c..7b2fe36774 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -648,7 +648,7 @@ private: QuirksMode m_quirks_mode { QuirksMode::No }; // https://dom.spec.whatwg.org/#concept-document-type - Type m_type { Type::HTML }; + Type m_type { Type::XML }; bool m_editable { false };