mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
LibWeb: Extract common path in definite row/column placement in GFC
Moves the code that identifies (start, end, span) for a grid item into a separate function. By doing so, we can eliminate the duplicated code between the placement of grid items with definite columns and those with definite rows. This change omits some of the comments that reference the spec, as they were largely irrelevant and unhelpful for making changes or diagnosing issues.
This commit is contained in:
parent
0243278587
commit
8695a82c56
2 changed files with 90 additions and 211 deletions
|
@ -255,6 +255,13 @@ private:
|
|||
|
||||
void build_grid_areas();
|
||||
|
||||
struct PlacementPosition {
|
||||
int start { 0 };
|
||||
int end { 0 };
|
||||
size_t span { 1 };
|
||||
};
|
||||
PlacementPosition resolve_grid_position(Box const& child_box, GridDimension const dimension);
|
||||
|
||||
void place_grid_items();
|
||||
void place_item_with_row_and_column_position(Box const& child_box);
|
||||
void place_item_with_row_position(Box const& child_box);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue