mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibWeb/CSS: Merge ScaleStyleValue into TransformationStyleValue
The only ways this varies from the `scale()` function is with parsing and serialization. Parsing stays separate, and serialization is done by telling `TransformationStyleValue` which property it is, and overriding its normal `to_string()` code for properties other than `transform`.
This commit is contained in:
committed by
Andreas Kling
parent
bd5d1b092a
commit
ac15e626dd
@@ -420,7 +420,7 @@ RefPtr<CSSStyleValue const> interpolate_transform(DOM::Element& element, CSSStyl
|
||||
values.ensure_capacity(16);
|
||||
for (int i = 0; i < 16; i++)
|
||||
values.append(NumberStyleValue::create(static_cast<double>(interpolated(i % 4, i / 4))));
|
||||
return StyleValueList::create({ TransformationStyleValue::create(TransformFunction::Matrix3d, move(values)) }, StyleValueList::Separator::Comma);
|
||||
return StyleValueList::create({ TransformationStyleValue::create(PropertyID::Transform, TransformFunction::Matrix3d, move(values)) }, StyleValueList::Separator::Comma);
|
||||
}
|
||||
|
||||
Color interpolate_color(Color from, Color to, float delta)
|
||||
|
||||
Reference in New Issue
Block a user