mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 15:09:42 +00:00
LibWeb: Ensure parser cannot change the mode is handled
This fixes at least 1 wpt bug where text/plain documents are rendered in quirks mode. The test in question: https://wpt.live/html/browsers/browsing-the-web/read-text/load-text-plain.html
This commit is contained in:
parent
3c6472dc00
commit
e442aa6e10
Notes:
github-actions[bot]
2025-09-07 10:12:43 +00:00
Author: https://github.com/Euro20179 🔰
Commit: e442aa6e10
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6093
Reviewed-by: https://github.com/tcl3 ✅
6 changed files with 71 additions and 3 deletions
|
@ -208,7 +208,8 @@ static WebIDL::ExceptionOr<GC::Ref<DOM::Document>> load_text_document(HTML::Navi
|
|||
// 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::HTML, type.essence(), navigation_params));
|
||||
|
||||
// FIXME: 2. Set document's parser cannot change the mode flag to true.
|
||||
// 2. Set document's parser cannot change the mode flag to true.
|
||||
document->set_parser_cannot_change_the_mode(true);
|
||||
|
||||
// 3. 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