mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibWeb: Parse "body" end tags during "in body"
This commit is contained in:
parent
1ad81e4833
commit
5e3972a946
Notes:
sideshowbarker
2024-07-19 05:51:12 +09:00
Author: https://github.com/kylemclean
Commit: 5e3972a946
Pull-request: https://github.com/SerenityOS/serenity/pull/2491
1 changed files with 8 additions and 7 deletions
|
@ -889,15 +889,16 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token)
|
||||||
|
|
||||||
if (token.is_end_tag() && token.tag_name() == "body") {
|
if (token.is_end_tag() && token.tag_name() == "body") {
|
||||||
if (!m_stack_of_open_elements.has_in_scope("body")) {
|
if (!m_stack_of_open_elements.has_in_scope("body")) {
|
||||||
TODO();
|
PARSE_ERROR();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Otherwise, if there is a node in the stack of open elements that is
|
for (auto& node : m_stack_of_open_elements.elements()) {
|
||||||
// not either a dd element, a dt element, an li element, an optgroup element,
|
if (!node.tag_name().is_one_of("dd", "dt", "li", "optgroup", "option", "p", "rb", "rp", "rt", "rtc", "tbody", "td", "tfoot", "th", "thead", "tr", "body", "html")) {
|
||||||
// an option element, a p element, an rb element, an rp element, an rt element,
|
PARSE_ERROR();
|
||||||
// an rtc element, a tbody element, a td element, a tfoot element, a th element,
|
break;
|
||||||
// a thead element, a tr element, the body element, or the html element,
|
}
|
||||||
// then this is a parse error.
|
}
|
||||||
|
|
||||||
m_insertion_mode = InsertionMode::AfterBody;
|
m_insertion_mode = InsertionMode::AfterBody;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue