mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:28:14 +00:00
LibWeb: Implement iterative percentage size for spanning table cells
Follow the computing column measures section of the specification, which gives an algorithm for setting intrinsic percentage widths when spanning columns are involved.
This commit is contained in:
parent
1f3fca996c
commit
268355c759
4 changed files with 260 additions and 14 deletions
|
@ -45,6 +45,8 @@ private:
|
|||
void initialize_table_measures();
|
||||
template<class RowOrColumn>
|
||||
void compute_table_measures();
|
||||
template<class RowOrColumn>
|
||||
void compute_intrinsic_percentage(size_t max_cell_span);
|
||||
void compute_table_width();
|
||||
void distribute_width_to_columns();
|
||||
void distribute_excess_width_to_columns(CSSPixels available_width);
|
||||
|
@ -126,6 +128,18 @@ private:
|
|||
template<class RowOrColumn>
|
||||
static CSSPixels cell_max_size(Cell const& cell);
|
||||
|
||||
template<class RowOrColumn>
|
||||
static double cell_percentage_contribution(Cell const& cell);
|
||||
|
||||
template<class RowOrColumn>
|
||||
static bool cell_has_intrinsic_percentage(Cell const& cell);
|
||||
|
||||
template<class RowOrColumn>
|
||||
void initialize_intrinsic_percentages_from_rows_or_columns();
|
||||
|
||||
template<class RowOrColumn>
|
||||
void initialize_intrinsic_percentages_from_cells();
|
||||
|
||||
template<class RowOrColumn>
|
||||
CSSPixels border_spacing();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue