LibWeb: Fix copy-paste error in HTMLDocumentParser (#2358)

When watching the video of the new HTML parser I noticed a small copy
and paste error. In one of the cases in `handle_after_head` the code
was checking for end tags when it should check for start tags.

I haven't tested this change, just looking at the spec.
This commit is contained in:
Daniel Gustafsson 2020-05-24 13:48:46 +02:00 committed by GitHub
parent 10bdb6f33b
commit 6561987e9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: sideshowbarker 2024-07-19 06:11:10 +09:00

View file

@ -214,7 +214,7 @@ void HTMLDocumentParser::handle_after_head(HTMLToken& token)
{
Vector<String> names = { "base", "basefont", "bgsound", "link", "meta", "noframes", "script", "style", "template", "title" };
if (token.is_end_tag() && names.contains_slow(token.tag_name())) {
if (token.is_start_tag() && names.contains_slow(token.tag_name())) {
ASSERT_NOT_REACHED();
}
}