LibWeb/CSS: Implement pending-substitution value

This is a special value temporarily assigned to longhands when their
shorthand is unresolved, and then later replaced once that is resolved.
This commit is contained in:
Sam Atkins 2025-03-12 19:24:59 +00:00
commit 398d2f9981
Notes: github-actions[bot] 2025-05-14 10:48:04 +00:00
4 changed files with 48 additions and 0 deletions

View file

@ -122,6 +122,7 @@ public:
MathDepth,
Number,
OpenTypeTagged,
PendingSubstitution,
Percentage,
Position,
RadialGradient,
@ -295,6 +296,10 @@ public:
OpenTypeTaggedStyleValue const& as_open_type_tagged() const;
OpenTypeTaggedStyleValue& as_open_type_tagged() { return const_cast<OpenTypeTaggedStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_open_type_tagged()); }
bool is_pending_substitution() const { return type() == Type::PendingSubstitution; }
PendingSubstitutionStyleValue const& as_pending_substitution() const;
PendingSubstitutionStyleValue& as_pending_substitution() { return const_cast<PendingSubstitutionStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_pending_substitution()); }
bool is_percentage() const { return type() == Type::Percentage; }
PercentageStyleValue const& as_percentage() const;
PercentageStyleValue& as_percentage() { return const_cast<PercentageStyleValue&>(const_cast<CSSStyleValue const&>(*this).as_percentage()); }