mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Set document type to HTML for text and media documents
This update fixes an issue where the document type was incorrectly set to XML instead of HTML when initializing text and media documents.
This commit is contained in:
parent
a95905f93f
commit
2565757c7a
Notes:
github-actions[bot]
2024-08-30 12:29:06 +00:00
Author: https://github.com/khaledev
Commit: 2565757c7a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1228
1 changed files with 2 additions and 2 deletions
|
@ -205,7 +205,7 @@ static WebIDL::ExceptionOr<JS::NonnullGCPtr<DOM::Document>> load_text_document(H
|
|||
// To load a text document, given a navigation params navigationParams and a string type:
|
||||
|
||||
// 1. Let document be the result of creating and initializing a Document object given "html", type, and navigationParams.
|
||||
auto document = TRY(DOM::Document::create_and_initialize(DOM::Document::Type::XML, type.essence(), navigation_params));
|
||||
auto document = TRY(DOM::Document::create_and_initialize(DOM::Document::Type::HTML, type.essence(), navigation_params));
|
||||
|
||||
// FIXME: 2. Set document's parser cannot change the mode flag to true.
|
||||
|
||||
|
@ -269,7 +269,7 @@ static WebIDL::ExceptionOr<JS::NonnullGCPtr<DOM::Document>> load_media_document(
|
|||
// To load a media document, given navigationParams and a string type:
|
||||
|
||||
// 1. Let document be the result of creating and initializing a Document object given "html", type, and navigationParams.
|
||||
auto document = TRY(DOM::Document::create_and_initialize(DOM::Document::Type::XML, type.essence(), navigation_params));
|
||||
auto document = TRY(DOM::Document::create_and_initialize(DOM::Document::Type::HTML, type.essence(), navigation_params));
|
||||
|
||||
// 2. Set document's mode to "no-quirks".
|
||||
document->set_quirks_mode(DOM::QuirksMode::No);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue