From e5ddb76a67b96541596af6f742978333f6ce4505 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 1 Jun 2020 22:08:48 +0200 Subject: [PATCH] LibWeb: Support "td" and "th" start tags during "in table body" This makes it possible to load Google Image Search results. You can't see the images yet, but it's still something. :^) --- Libraries/LibWeb/Parser/HTMLDocumentParser.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp index cd25d9d470..4acbbaa2b7 100644 --- a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp +++ b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp @@ -1596,7 +1596,17 @@ void HTMLDocumentParser::handle_in_table_body(HTMLToken& token) } if (token.is_start_tag() && token.tag_name().is_one_of("th", "td")) { - TODO(); + PARSE_ERROR(); + clear_the_stack_back_to_a_table_body_context(); + + HTMLToken fake_tr_token; + fake_tr_token.m_type = HTMLToken::Type::StartTag; + fake_tr_token.m_tag.tag_name.append("tr"); + insert_html_element(fake_tr_token); + + m_insertion_mode = InsertionMode::InRow; + process_using_the_rules_for(m_insertion_mode, token); + return; } if (token.is_end_tag() && token.tag_name().is_one_of("tbody", "tfoot", "thead")) {