From f26eed96334ce3a7af765fa2c47adfd643bd71d4 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Sun, 8 Jan 2023 01:14:02 +0300 Subject: [PATCH] LibWeb: Rename used_width to used_height in TFC row struct Rename used_width to used_height because it is used to store row height. --- Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp | 4 ++-- Userland/Libraries/LibWeb/Layout/TableFormattingContext.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp index b3cbd1b62f..7db0a5e9dc 100644 --- a/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp @@ -403,7 +403,7 @@ void TableFormattingContext::calculate_row_heights() cell.baseline = box_baseline(m_state, cell.box); auto& row = m_rows[cell.row_index]; - row.used_width = max(row.used_width, cell_state.border_box_height()); + row.used_height = max(row.used_height, cell_state.border_box_height()); row.baseline = max(row.baseline, cell.baseline); } } @@ -419,7 +419,7 @@ void TableFormattingContext::position_row_boxes() row_width += column.used_width; } - row_state.set_content_height(row.used_width); + row_state.set_content_height(row.used_height); row_state.set_content_width(row_width); row_state.set_content_y(row_top_offset); row_top_offset += row_state.content_height(); diff --git a/Userland/Libraries/LibWeb/Layout/TableFormattingContext.h b/Userland/Libraries/LibWeb/Layout/TableFormattingContext.h index 11f1e739ec..09e2fc8582 100644 --- a/Userland/Libraries/LibWeb/Layout/TableFormattingContext.h +++ b/Userland/Libraries/LibWeb/Layout/TableFormattingContext.h @@ -50,7 +50,7 @@ private: struct Row { Box& box; - CSSPixels used_width { 0 }; + CSSPixels used_height { 0 }; CSSPixels baseline { 0 }; };