From 244fe1089c1fec3b86e8cfe52a179a921373d3a1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 5 Jul 2020 19:51:49 +0200 Subject: [PATCH] LibWeb: Use LayoutTableRowGroup for display:table-{header,footer}-group --- Libraries/LibWeb/CSS/StyleProperties.cpp | 4 ++++ Libraries/LibWeb/CSS/StyleValue.h | 2 ++ Libraries/LibWeb/DOM/Element.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/CSS/StyleProperties.cpp b/Libraries/LibWeb/CSS/StyleProperties.cpp index d241ac2dae..aa95ecf703 100644 --- a/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -299,6 +299,10 @@ CSS::Display StyleProperties::display() const return CSS::Display::TableCell; if (display == "table-row-group") return CSS::Display::TableRowGroup; + if (display == "table-header-group") + return CSS::Display::TableHeaderGroup; + if (display == "table-footer-group") + return CSS::Display::TableFooterGroup; dbg() << "Unknown display type: _" << display << "_"; return CSS::Display::Block; } diff --git a/Libraries/LibWeb/CSS/StyleValue.h b/Libraries/LibWeb/CSS/StyleValue.h index 257cb29c64..584962eca9 100644 --- a/Libraries/LibWeb/CSS/StyleValue.h +++ b/Libraries/LibWeb/CSS/StyleValue.h @@ -132,7 +132,9 @@ enum class Display { Table, TableRow, TableCell, + TableHeaderGroup, TableRowGroup, + TableFooterGroup, }; enum class WhiteSpace { diff --git a/Libraries/LibWeb/DOM/Element.cpp b/Libraries/LibWeb/DOM/Element.cpp index f6439ee87a..dfbd322a97 100644 --- a/Libraries/LibWeb/DOM/Element.cpp +++ b/Libraries/LibWeb/DOM/Element.cpp @@ -131,7 +131,7 @@ RefPtr Element::create_layout_node(const StyleProperties* parent_sty return adopt(*new LayoutTableRow(document(), *this, move(style))); if (display == CSS::Display::TableCell) return adopt(*new LayoutTableCell(document(), *this, move(style))); - if (display == CSS::Display::TableRowGroup) + if (display == CSS::Display::TableRowGroup || display == CSS::Display::TableHeaderGroup || display == CSS::Display::TableFooterGroup) return adopt(*new LayoutTableRowGroup(document(), *this, move(style))); if (display == CSS::Display::InlineBlock) { auto inline_block = adopt(*new LayoutBlock(document(), this, move(style)));