1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +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:
martinfalisse 2022-10-30 13:27:57 +01:00 committed by Andreas Kling
parent 9441515312
commit b2b677e984
12 changed files with 639 additions and 380 deletions

View file

@ -50,7 +50,7 @@ class CSSStyleSheet;
class CSSSupportsRule;
class Display;
class ElementInlineCSSStyleDeclaration;
class ExplicitTrackSizing;
class ExplicitGridTrack;
class FilterValueListStyleValue;
class FlexFlowStyleValue;
class FlexStyleValue;
@ -59,10 +59,13 @@ class FontStyleValue;
class Frequency;
class FrequencyPercentage;
class FrequencyStyleValue;
class GridMinMax;
class GridRepeat;
class GridSize;
class GridTrackPlacement;
class GridTrackPlacementShorthandStyleValue;
class GridTrackPlacementStyleValue;
class GridTrackSize;
class GridTrackSizeList;
class GridTrackSizeStyleValue;
class IdentifierStyleValue;
class ImageStyleValue;
@ -79,7 +82,6 @@ class MediaList;
class MediaQuery;
class MediaQueryList;
class MediaQueryListEvent;
class MetaGridTrackSize;
class Number;
class NumericStyleValue;
class OverflowStyleValue;