mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-02 03:26:39 +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
@@ -407,7 +407,7 @@ RefPtr<CSSStyleValue const> ResolvedCSSStyleDeclaration::style_value_for_propert
|
||||
NumberStyleValue::create(transform.elements()[0][3]),
|
||||
NumberStyleValue::create(transform.elements()[1][3]),
|
||||
};
|
||||
return TransformationStyleValue::create(TransformFunction::Matrix, move(parameters));
|
||||
return TransformationStyleValue::create(PropertyID::Transform, TransformFunction::Matrix, move(parameters));
|
||||
}
|
||||
// -> Otherwise
|
||||
// Serialize transform to a <matrix3d()> function.
|
||||
@@ -430,7 +430,7 @@ RefPtr<CSSStyleValue const> ResolvedCSSStyleDeclaration::style_value_for_propert
|
||||
NumberStyleValue::create(transform.elements()[2][3]),
|
||||
NumberStyleValue::create(transform.elements()[3][3]),
|
||||
};
|
||||
return TransformationStyleValue::create(TransformFunction::Matrix3d, move(parameters));
|
||||
return TransformationStyleValue::create(PropertyID::Transform, TransformFunction::Matrix3d, move(parameters));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user