LibWeb: Use LayoutTableRowGroup for display:table-{header,footer}-group

This commit is contained in:
Andreas Kling 2020-07-05 19:51:49 +02:00
parent 6b3a7b1ce7
commit 244fe1089c
Notes: sideshowbarker 2024-07-19 05:07:49 +09:00
3 changed files with 7 additions and 1 deletions

View file

@ -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;
}

View file

@ -132,7 +132,9 @@ enum class Display {
Table,
TableRow,
TableCell,
TableHeaderGroup,
TableRowGroup,
TableFooterGroup,
};
enum class WhiteSpace {

View file

@ -131,7 +131,7 @@ RefPtr<LayoutNode> 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)));