mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +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:
parent
e60beef12e
commit
b5ab961e20
3 changed files with 20 additions and 14 deletions
|
@ -261,7 +261,7 @@ Vector<CSS::Transformation> StyleProperties::transformations() const
|
|||
auto& transformation_style_value = it.as_transformation();
|
||||
CSS::Transformation transformation;
|
||||
transformation.function = transformation_style_value.transform_function();
|
||||
Vector<Variant<CSS::LengthPercentage, float>> values;
|
||||
Vector<TransformValue> values;
|
||||
for (auto& transformation_value : transformation_style_value.values()) {
|
||||
if (transformation_value.is_length()) {
|
||||
values.append({ transformation_value.to_length() });
|
||||
|
@ -270,7 +270,7 @@ Vector<CSS::Transformation> StyleProperties::transformations() const
|
|||
} else if (transformation_value.is_numeric()) {
|
||||
values.append({ transformation_value.to_number() });
|
||||
} else if (transformation_value.is_angle()) {
|
||||
values.append({ transformation_value.as_angle().angle().to_degrees() });
|
||||
values.append({ transformation_value.as_angle().angle() });
|
||||
} else {
|
||||
dbgln("FIXME: Unsupported value in transform!");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue