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

LibWeb: Remove Length::Type::Undefined! :^)

This commit is contained in:
Sam Atkins 2022-02-18 16:50:17 +00:00 committed by Andreas Kling
parent b715943035
commit 356d8bcfe8
8 changed files with 13 additions and 20 deletions

View file

@ -72,7 +72,7 @@ void TableFormattingContext::calculate_column_widths(Box& row, Vector<float>& co
{
size_t column_index = 0;
auto* table = row.first_ancestor_of_type<TableBox>();
bool use_auto_layout = !table || (!table->computed_values().width().has_value() || (table->computed_values().width()->is_length() && table->computed_values().width()->length().is_undefined_or_auto()));
bool use_auto_layout = !table || (!table->computed_values().width().has_value() || (table->computed_values().width()->is_length() && table->computed_values().width()->length().is_auto()));
row.for_each_child_of_type<TableCellBox>([&](auto& cell) {
compute_width(cell);
if (use_auto_layout) {
@ -91,7 +91,7 @@ void TableFormattingContext::layout_row(Box& row, Vector<float>& column_widths)
float tallest_cell_height = 0;
float content_width = 0;
auto* table = row.first_ancestor_of_type<TableBox>();
bool use_auto_layout = !table || (!table->computed_values().width().has_value() || (table->computed_values().width()->is_length() && table->computed_values().width()->length().is_undefined_or_auto()));
bool use_auto_layout = !table || (!table->computed_values().width().has_value() || (table->computed_values().width()->is_length() && table->computed_values().width()->length().is_auto()));
row.for_each_child_of_type<TableCellBox>([&](auto& cell) {
cell.set_offset(row.effective_offset().translated(content_width, 0));