mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Handle calc percentages when interpolating scale function
Also clean up the corresponding handling in TransformationStyleValue::to_transformation
This commit is contained in:
parent
15e4deb831
commit
ec14948175
Notes:
github-actions[bot]
2025-11-16 21:50:59 +00:00
Author: https://github.com/Calme1709
Commit: ec14948175
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6836
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/tcl3
3 changed files with 21 additions and 7 deletions
|
|
@ -41,12 +41,9 @@ Transformation TransformationStyleValue::to_transformation() const
|
|||
|
||||
if (transformation_value->is_calculated()) {
|
||||
auto& calculated = transformation_value->as_calculated();
|
||||
if (function_type == TransformFunctionParameterType::NumberPercentage
|
||||
&& (calculated.resolves_to_number() || calculated.resolves_to_percentage())) {
|
||||
values.append(NumberPercentage { calculated });
|
||||
} else if (calculated.resolves_to_length_percentage()) {
|
||||
if (calculated.resolves_to_length()) {
|
||||
values.append(LengthPercentage { calculated });
|
||||
} else if (calculated.resolves_to_number()) {
|
||||
} else if (calculated.resolves_to_number() || calculated.resolves_to_percentage()) {
|
||||
values.append(NumberPercentage { calculated });
|
||||
} else if (calculated.resolves_to_angle()) {
|
||||
values.append(AngleOrCalculated { calculated });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue