1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:17:44 +00:00

LibWeb: Add proper support for Angle parameters in transform functions

Also, made the `reference_length` parameter optional for the lambda that
extracts transform-function parameters, since it is only needed to
resolve `LengthPercentage` parameters.
This commit is contained in:
Sam Atkins 2022-07-14 17:45:23 +01:00 committed by Andreas Kling
parent e60beef12e
commit b5ab961e20
3 changed files with 20 additions and 14 deletions

View file

@ -82,9 +82,11 @@ public:
float width { 0 };
};
using TransformValue = Variant<CSS::Angle, CSS::LengthPercentage, float>;
struct Transformation {
CSS::TransformFunction function;
Vector<Variant<CSS::LengthPercentage, float>> values;
Vector<TransformValue> values;
};
struct TransformOrigin {