mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Support individual translate
CSS property
This commit is contained in:
parent
6836d4edb1
commit
66a821e731
Notes:
github-actions[bot]
2024-11-22 19:07:48 +00:00
Author: https://github.com/awesomekling
Commit: 66a821e731
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2506
Reviewed-by: https://github.com/shannonbooth
22 changed files with 267 additions and 80 deletions
|
@ -1128,9 +1128,12 @@ void PaintableBox::resolve_paint_properties()
|
|||
set_box_shadow_data(move(resolved_box_shadow_data));
|
||||
|
||||
auto const& transformations = computed_values.transformations();
|
||||
auto const& translate = computed_values.translate();
|
||||
auto const& rotate = computed_values.rotate();
|
||||
if (!transformations.is_empty() || rotate.has_value()) {
|
||||
if (!transformations.is_empty() || translate.has_value() || rotate.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();
|
||||
for (auto const& transform : transformations)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue