1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 13:17:35 +00:00

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
3 changed files with 7 additions and 1 deletions

View file

@ -299,6 +299,10 @@ CSS::Display StyleProperties::display() const
return CSS::Display::TableCell; return CSS::Display::TableCell;
if (display == "table-row-group") if (display == "table-row-group")
return CSS::Display::TableRowGroup; 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 << "_"; dbg() << "Unknown display type: _" << display << "_";
return CSS::Display::Block; return CSS::Display::Block;
} }

View file

@ -132,7 +132,9 @@ enum class Display {
Table, Table,
TableRow, TableRow,
TableCell, TableCell,
TableHeaderGroup,
TableRowGroup, TableRowGroup,
TableFooterGroup,
}; };
enum class WhiteSpace { 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))); return adopt(*new LayoutTableRow(document(), *this, move(style)));
if (display == CSS::Display::TableCell) if (display == CSS::Display::TableCell)
return adopt(*new LayoutTableCell(document(), *this, move(style))); 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))); return adopt(*new LayoutTableRowGroup(document(), *this, move(style)));
if (display == CSS::Display::InlineBlock) { if (display == CSS::Display::InlineBlock) {
auto inline_block = adopt(*new LayoutBlock(document(), this, move(style))); auto inline_block = adopt(*new LayoutBlock(document(), this, move(style)));