1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

LibWeb: Make CSS Transformation struct a proper class

Move it out of ComputedValues.h into its own files, and take the
transformation-to-matrix code from StackingContext.
This commit is contained in:
Sam Atkins 2023-10-13 17:25:23 +01:00 committed by Andreas Kling
parent 3c49d0dad3
commit 642ad80960
8 changed files with 193 additions and 152 deletions

View file

@ -438,8 +438,7 @@ Vector<CSS::Transformation> StyleProperties::transformations() const
if (!it->is_transformation())
return {};
auto& transformation_style_value = it->as_transformation();
CSS::Transformation transformation;
transformation.function = transformation_style_value.transform_function();
auto function = transformation_style_value.transform_function();
Vector<TransformValue> values;
for (auto& transformation_value : transformation_style_value.values()) {
if (transformation_value->is_calculated()) {
@ -467,8 +466,7 @@ Vector<CSS::Transformation> StyleProperties::transformations() const
dbgln("FIXME: Unsupported value in transform! {}", transformation_value->to_string());
}
}
transformation.values = move(values);
transformations.append(move(transformation));
transformations.empend(function, move(values));
}
return transformations;
}