mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Support transform: translate(...)
by percentage
This commit is contained in:
parent
bc5d39493b
commit
dc94879b83
Notes:
sideshowbarker
2024-07-17 16:58:10 +09:00
Author: https://github.com/skyrising
Commit: dc94879b83
Pull-request: https://github.com/SerenityOS/serenity/pull/13181
4 changed files with 43 additions and 32 deletions
|
@ -329,10 +329,12 @@ 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::Length, float>> values;
|
||||
Vector<Variant<CSS::LengthPercentage, float>> values;
|
||||
for (auto& transformation_value : transformation_style_value.values()) {
|
||||
if (transformation_value.is_length()) {
|
||||
values.append({ transformation_value.to_length() });
|
||||
} else if (transformation_value.is_percentage()) {
|
||||
values.append({ transformation_value.as_percentage().percentage() });
|
||||
} else if (transformation_value.is_numeric()) {
|
||||
values.append({ transformation_value.to_number() });
|
||||
} else if (transformation_value.is_angle()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue