mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb: Add default values of URL and content type in document
As per this line in the specification: Unless stated otherwise, a document’s encoding is the utf-8 encoding, content type is "application/xml", URL is "about:blank", origin is an opaque origin, type is "xml", and its mode is "no-quirks". https://dom.spec.whatwg.org/#document
This commit is contained in:
@@ -58,7 +58,7 @@ class Document
|
||||
public:
|
||||
using WrapperType = Bindings::DocumentWrapper;
|
||||
|
||||
static NonnullRefPtr<Document> create(const URL& url = {}) { return adopt(*new Document(url)); }
|
||||
static NonnullRefPtr<Document> create(const URL& url = "about:blank") { return adopt(*new Document(url)); }
|
||||
virtual ~Document() override;
|
||||
|
||||
void set_url(const URL& url) { m_url = url; }
|
||||
@@ -261,7 +261,7 @@ private:
|
||||
RefPtr<Document> m_associated_inert_template_document;
|
||||
|
||||
String m_ready_state { "loading" };
|
||||
String m_content_type;
|
||||
String m_content_type { "application/xml" };
|
||||
|
||||
NonnullRefPtr<DOMImplementation> m_implementation;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user