mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
LibWeb: Refactor GridTrackSize classes
Refactor various classes in the GridTrackSize file for the incoming named_tracks feature. Previously the ExplicitTrackSizing had mixed responsiblities with the newly-named GridRepeat class. This made it so it was not possible to have multiple repeats within a single 'GridTrackSizeList' definition. The MetaGridTrackSize class had both the responsibilities of being a container for minmax values as well as for simple GridSizes. By uniting the different possible values (repeat, minmax, default) into the ExplicitGridTrack class are able to be more expressive as to the different grid size modalities. The GridTrackSizeList will be useful as compared to a Vector<ExplicitGridTrack> since this way can keep track of the declared line names. These same line names are able to be declared within the values of a repeat function, hence the presence of a GridTrackSizeList inside the GridRepeat class.
This commit is contained in:
parent
9441515312
commit
b2b677e984
12 changed files with 639 additions and 380 deletions
|
@ -64,8 +64,8 @@ public:
|
|||
static CSS::Size height() { return CSS::Size::make_auto(); }
|
||||
static CSS::Size min_height() { return CSS::Size::make_auto(); }
|
||||
static CSS::Size max_height() { return CSS::Size::make_none(); }
|
||||
static CSS::ExplicitTrackSizing grid_template_columns() { return CSS::ExplicitTrackSizing::make_auto(); }
|
||||
static CSS::ExplicitTrackSizing grid_template_rows() { return CSS::ExplicitTrackSizing::make_auto(); }
|
||||
static CSS::GridTrackSizeList grid_template_columns() { return CSS::GridTrackSizeList::make_auto(); }
|
||||
static CSS::GridTrackSizeList grid_template_rows() { return CSS::GridTrackSizeList::make_auto(); }
|
||||
static CSS::GridTrackPlacement grid_column_end() { return CSS::GridTrackPlacement::make_auto(); }
|
||||
static CSS::GridTrackPlacement grid_column_start() { return CSS::GridTrackPlacement::make_auto(); }
|
||||
static CSS::GridTrackPlacement grid_row_end() { return CSS::GridTrackPlacement::make_auto(); }
|
||||
|
@ -182,8 +182,8 @@ public:
|
|||
CSS::Size const& min_height() const { return m_noninherited.min_height; }
|
||||
CSS::Size const& max_height() const { return m_noninherited.max_height; }
|
||||
Variant<CSS::VerticalAlign, CSS::LengthPercentage> const& vertical_align() const { return m_noninherited.vertical_align; }
|
||||
CSS::ExplicitTrackSizing const& grid_template_columns() const { return m_noninherited.grid_template_columns; }
|
||||
CSS::ExplicitTrackSizing const& grid_template_rows() const { return m_noninherited.grid_template_rows; }
|
||||
CSS::GridTrackSizeList const& grid_template_columns() const { return m_noninherited.grid_template_columns; }
|
||||
CSS::GridTrackSizeList const& grid_template_rows() const { return m_noninherited.grid_template_rows; }
|
||||
CSS::GridTrackPlacement const& grid_column_end() const { return m_noninherited.grid_column_end; }
|
||||
CSS::GridTrackPlacement const& grid_column_start() const { return m_noninherited.grid_column_start; }
|
||||
CSS::GridTrackPlacement const& grid_row_end() const { return m_noninherited.grid_row_end; }
|
||||
|
@ -304,8 +304,8 @@ protected:
|
|||
CSS::BoxSizing box_sizing { InitialValues::box_sizing() };
|
||||
CSS::ContentData content;
|
||||
Variant<CSS::VerticalAlign, CSS::LengthPercentage> vertical_align { InitialValues::vertical_align() };
|
||||
CSS::ExplicitTrackSizing grid_template_columns;
|
||||
CSS::ExplicitTrackSizing grid_template_rows;
|
||||
CSS::GridTrackSizeList grid_template_columns;
|
||||
CSS::GridTrackSizeList grid_template_rows;
|
||||
CSS::GridTrackPlacement grid_column_end { InitialValues::grid_column_end() };
|
||||
CSS::GridTrackPlacement grid_column_start { InitialValues::grid_column_start() };
|
||||
CSS::GridTrackPlacement grid_row_end { InitialValues::grid_row_end() };
|
||||
|
@ -382,8 +382,8 @@ public:
|
|||
void set_box_sizing(CSS::BoxSizing value) { m_noninherited.box_sizing = value; }
|
||||
void set_vertical_align(Variant<CSS::VerticalAlign, CSS::LengthPercentage> value) { m_noninherited.vertical_align = move(value); }
|
||||
void set_visibility(CSS::Visibility value) { m_inherited.visibility = value; }
|
||||
void set_grid_template_columns(CSS::ExplicitTrackSizing value) { m_noninherited.grid_template_columns = move(value); }
|
||||
void set_grid_template_rows(CSS::ExplicitTrackSizing value) { m_noninherited.grid_template_rows = move(value); }
|
||||
void set_grid_template_columns(CSS::GridTrackSizeList value) { m_noninherited.grid_template_columns = move(value); }
|
||||
void set_grid_template_rows(CSS::GridTrackSizeList value) { m_noninherited.grid_template_rows = move(value); }
|
||||
void set_grid_column_end(CSS::GridTrackPlacement value) { m_noninherited.grid_column_end = value; }
|
||||
void set_grid_column_start(CSS::GridTrackPlacement value) { m_noninherited.grid_column_start = value; }
|
||||
void set_grid_row_end(CSS::GridTrackPlacement value) { m_noninherited.grid_row_end = value; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue