1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:18:13 +00:00

LibWeb: Introduce CalculatedOr type

This is intended as a replacement for Length and friends each holding a
`RefPtr<CalculatedStyleValue>`. Instead, let's make the types explicit
about whether they are calculated or not. This then means a Length is
always a Length, and won't require including `StyleValue.h`.

As noted, it's probably nicer for LengthOrCalculated to live in
`Length.h`, but we can't do that until Length stops including
`StyleValue.h`.
This commit is contained in:
Sam Atkins 2023-03-30 16:57:49 +01:00 committed by Andreas Kling
parent b727f8113f
commit fa90a3bb4f
5 changed files with 206 additions and 4 deletions

View file

@ -28,6 +28,7 @@ namespace Web::CSS {
class AbstractImageStyleValue;
class Angle;
class AnglePercentage;
class AngleOrCalculated;
class AngleStyleValue;
class BackgroundRepeatStyleValue;
class BackgroundSizeStyleValue;
@ -61,6 +62,7 @@ class FontFace;
class FontStyleValue;
class Frequency;
class FrequencyPercentage;
class FrequencyOrCalculated;
class FrequencyStyleValue;
class GridAreaShorthandStyleValue;
class GridMinMax;
@ -79,6 +81,7 @@ class InitialStyleValue;
class Length;
class LengthBox;
class LengthPercentage;
class LengthOrCalculated;
class LengthStyleValue;
class LinearGradientStyleValue;
class ListStyleStyleValue;
@ -91,6 +94,7 @@ class Number;
class NumericStyleValue;
class OverflowStyleValue;
class Percentage;
class PercentageOrCalculated;
class PercentageStyleValue;
class PositionStyleValue;
class PropertyOwningCSSStyleDeclaration;
@ -113,6 +117,7 @@ class Supports;
class TextDecorationStyleValue;
class Time;
class TimePercentage;
class TimeOrCalculated;
class TimeStyleValue;
class TransformationStyleValue;
class UnicodeRange;