summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Layout/LayoutTableRow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibWeb/Layout/LayoutTableRow.cpp')
-rw-r--r--Libraries/LibWeb/Layout/LayoutTableRow.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutTableRow.cpp b/Libraries/LibWeb/Layout/LayoutTableRow.cpp
index c2110db37e..a94e522c47 100644
--- a/Libraries/LibWeb/Layout/LayoutTableRow.cpp
+++ b/Libraries/LibWeb/Layout/LayoutTableRow.cpp
@@ -40,57 +40,4 @@ LayoutTableRow::~LayoutTableRow()
{
}
-void LayoutTableRow::layout(LayoutMode)
-{
-}
-
-void LayoutTableRow::calculate_column_widths(Vector<float>& column_widths)
-{
- size_t column_index = 0;
- auto* table = first_ancestor_of_type<LayoutTable>();
- bool use_auto_layout = !table || table->style().width().is_undefined_or_auto();
- for_each_child_of_type<LayoutTableCell>([&](auto& cell) {
- if (use_auto_layout) {
- cell.layout(LayoutMode::OnlyRequiredLineBreaks);
- } else {
- cell.layout(LayoutMode::Default);
- }
- column_widths[column_index] = max(column_widths[column_index], cell.width());
- column_index += cell.colspan();
- });
-}
-
-void LayoutTableRow::layout_row(const Vector<float>& column_widths)
-{
- size_t column_index = 0;
- float tallest_cell_height = 0;
- float content_width = 0;
- auto* table = first_ancestor_of_type<LayoutTable>();
- bool use_auto_layout = !table || table->style().width().is_undefined_or_auto();
-
- for_each_child_of_type<LayoutTableCell>([&](auto& cell) {
- cell.set_offset(effective_offset().translated(content_width, 0));
-
- // Layout the cell contents a second time, now that we know its final width.
- if (use_auto_layout) {
- cell.layout_inside(LayoutMode::OnlyRequiredLineBreaks);
- } else {
- cell.layout_inside(LayoutMode::Default);
- }
-
- size_t cell_colspan = cell.colspan();
- for (size_t i = 0; i < cell_colspan; ++i)
- content_width += column_widths[column_index++];
- tallest_cell_height = max(tallest_cell_height, cell.height());
- });
-
- if (use_auto_layout) {
- set_width(content_width);
- } else {
- set_width(table->width());
- }
-
- set_height(tallest_cell_height);
-}
-
}