mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibWeb: Support individual scale
CSS property
This commit is contained in:
parent
66a821e731
commit
9a7c9286c4
Notes:
github-actions[bot]
2024-11-22 19:07:43 +00:00
Author: https://github.com/awesomekling
Commit: 9a7c9286c4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2506
Reviewed-by: https://github.com/shannonbooth
21 changed files with 234 additions and 55 deletions
|
@ -1130,12 +1130,15 @@ void PaintableBox::resolve_paint_properties()
|
|||
auto const& transformations = computed_values.transformations();
|
||||
auto const& translate = computed_values.translate();
|
||||
auto const& rotate = computed_values.rotate();
|
||||
if (!transformations.is_empty() || translate.has_value() || rotate.has_value()) {
|
||||
auto const& scale = computed_values.scale();
|
||||
if (!transformations.is_empty() || translate.has_value() || rotate.has_value() || scale.has_value()) {
|
||||
auto matrix = Gfx::FloatMatrix4x4::identity();
|
||||
if (translate.has_value())
|
||||
matrix = matrix * translate->to_matrix(*this).release_value();
|
||||
if (rotate.has_value())
|
||||
matrix = matrix * rotate->to_matrix(*this).release_value();
|
||||
if (scale.has_value())
|
||||
matrix = matrix * scale->to_matrix(*this).release_value();
|
||||
for (auto const& transform : transformations)
|
||||
matrix = matrix * transform.to_matrix(*this).release_value();
|
||||
set_transform(matrix);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue