mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 12:44:58 +00:00
LibWeb: Implement more of the "after body" insertion mode
This commit is contained in:
parent
cba5d59adc
commit
00b44ab148
1 changed files with 23 additions and 1 deletions
|
@ -482,6 +482,25 @@ void HTMLDocumentParser::handle_after_body(HTMLToken& token)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (token.is_comment()) {
|
||||||
|
TODO();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (token.is_doctype()) {
|
||||||
|
PARSE_ERROR();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (token.is_start_tag() && token.tag_name() == "html") {
|
||||||
|
process_using_the_rules_for(InsertionMode::InBody, token);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (token.is_end_of_file()) {
|
||||||
|
// FIXME: Stop parsing!
|
||||||
|
TODO();
|
||||||
|
}
|
||||||
|
|
||||||
if (token.is_end_tag() && token.tag_name() == "html") {
|
if (token.is_end_tag() && token.tag_name() == "html") {
|
||||||
if (m_parsing_fragment) {
|
if (m_parsing_fragment) {
|
||||||
ASSERT_NOT_REACHED();
|
ASSERT_NOT_REACHED();
|
||||||
|
@ -489,7 +508,10 @@ void HTMLDocumentParser::handle_after_body(HTMLToken& token)
|
||||||
m_insertion_mode = InsertionMode::AfterAfterBody;
|
m_insertion_mode = InsertionMode::AfterAfterBody;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ASSERT_NOT_REACHED();
|
|
||||||
|
PARSE_ERROR();
|
||||||
|
m_insertion_mode = InsertionMode::InBody;
|
||||||
|
process_using_the_rules_for(InsertionMode::InBody, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTMLDocumentParser::handle_after_after_body(HTMLToken& token)
|
void HTMLDocumentParser::handle_after_after_body(HTMLToken& token)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue