diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-21 17:49:02 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-21 17:49:02 +0200 |
commit | dd7cd92de4f5dbe94d1aaca36ea3cc0a3befd580 (patch) | |
tree | 91f4f80ab67c41c319f1bb67df5390665a55e006 /Libraries/LibWeb | |
parent | 15b5dfc79412fd0bf5ca21d8c34a3e6b76ddccc5 (diff) | |
download | serenity-dd7cd92de4f5dbe94d1aaca36ea3cc0a3befd580.zip |
LibWeb: Fix two typo bugs in table parsing
These were flushed out by the earlier fix to "table scope". Without the
bad implementation of table scopes, ACID2 stopped parsing correctly.
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r-- | Libraries/LibWeb/Parser/HTMLDocumentParser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp index 712dd18fb5..5d930b9a94 100644 --- a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp +++ b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp @@ -1515,7 +1515,6 @@ void HTMLDocumentParser::handle_in_body(HTMLToken& token) } return; } - } void HTMLDocumentParser::adjust_mathml_attributes(HTMLToken& token) @@ -1733,8 +1732,9 @@ void HTMLDocumentParser::handle_in_row(HTMLToken& token) return; } - if (token.is_start_tag() && token.tag_name().is_one_of(HTML::TagNames::caption, HTML::TagNames::col, HTML::TagNames::colgroup, HTML::TagNames::tbody, HTML::TagNames::tfoot, HTML::TagNames::thead, HTML::TagNames::tr)) { - if (m_stack_of_open_elements.has_in_table_scope(HTML::TagNames::tr)) { + if ((token.is_start_tag() && token.tag_name().is_one_of(HTML::TagNames::caption, HTML::TagNames::col, HTML::TagNames::colgroup, HTML::TagNames::tbody, HTML::TagNames::tfoot, HTML::TagNames::thead, HTML::TagNames::tr)) + || (token.is_end_tag() && token.tag_name() == HTML::TagNames::table)) { + if (!m_stack_of_open_elements.has_in_table_scope(HTML::TagNames::tr)) { PARSE_ERROR(); return; } @@ -1817,7 +1817,7 @@ void HTMLDocumentParser::handle_in_cell(HTMLToken& token) } if (token.is_end_tag() && token.tag_name().is_one_of(HTML::TagNames::table, HTML::TagNames::tbody, HTML::TagNames::tfoot, HTML::TagNames::thead, HTML::TagNames::tr)) { - if (m_stack_of_open_elements.has_in_table_scope(token.tag_name())) { + if (!m_stack_of_open_elements.has_in_table_scope(token.tag_name())) { PARSE_ERROR(); return; } |