LibWeb: Fully implement all DOCTYPE tokenizer states

Also fixes TagOpen having a seperate emit and reconsume in
ANYTHING_ELSE.
This commit is contained in:
Luke 2020-06-11 05:00:45 +01:00 committed by Andreas Kling
parent ab1df177d8
commit 821312729a
Notes: sideshowbarker 2024-07-19 05:39:25 +09:00
2 changed files with 178 additions and 47 deletions

View file

@ -170,6 +170,7 @@ void HTMLDocumentParser::handle_initial(HTMLToken& token)
auto doctype = adopt(*new DocumentType(document()));
doctype->set_name(token.m_doctype.name.to_string());
document().append_child(move(doctype));
document().set_quirks_mode(token.m_doctype.force_quirks);
m_insertion_mode = InsertionMode::BeforeHTML;
return;
}