LibWeb: Maintain easing keywords as KeywordStyleValue until use-time

This excludes `step-end` and `step-start` which are expected to be
converted to the equivalent function at parse time.

We are expected to serialize these as the explicit keywords - previously
we would parse as `EasingStyleValue` and serialize equivalent functions
as the keywords. This caused issues as we would incorrectly serialize
even explicit functions as the keyword.

This also allows us to move the magic easing functions to
`EasingFunction` rather than `EasingStyleValue` which is a bit tidier
This commit is contained in:
Callum Law
2025-10-11 23:34:35 +13:00
committed by Sam Atkins
parent 755a576013
commit 03be70087d
Notes: github-actions[bot] 2025-10-20 10:29:02 +00:00
15 changed files with 210 additions and 125 deletions

View File

@@ -19,8 +19,6 @@ namespace Web::CSS {
class EasingStyleValue final : public StyleValueWithDefaultOperators<EasingStyleValue> {
public:
struct Linear {
static Linear identity();
struct Stop {
ValueComparingNonnullRefPtr<StyleValue const> output;
ValueComparingRefPtr<StyleValue const> input;
@@ -36,11 +34,6 @@ public:
};
struct CubicBezier {
static CubicBezier ease();
static CubicBezier ease_in();
static CubicBezier ease_out();
static CubicBezier ease_in_out();
ValueComparingNonnullRefPtr<StyleValue const> x1;
ValueComparingNonnullRefPtr<StyleValue const> y1;
ValueComparingNonnullRefPtr<StyleValue const> x2;
@@ -63,9 +56,6 @@ public:
};
struct Steps {
static Steps step_start();
static Steps step_end();
ValueComparingNonnullRefPtr<StyleValue const> number_of_intervals;
StepPosition position;