diff --git a/Libraries/LibWeb/Painting/PaintableBox.cpp b/Libraries/LibWeb/Painting/PaintableBox.cpp index a7fb33b4ee9..ab7f5313970 100644 --- a/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -1300,18 +1300,16 @@ void PaintableBox::resolve_paint_properties() auto const& translate = computed_values.translate(); auto const& rotate = computed_values.rotate(); 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); - } + 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); auto const& transform_origin = computed_values.transform_origin(); auto reference_box = transform_box_rect(); diff --git a/Tests/LibWeb/Text/expected/css-transform-transition-to-none-invalidation.txt b/Tests/LibWeb/Text/expected/css-transform-transition-to-none-invalidation.txt new file mode 100644 index 00000000000..9796495e5da --- /dev/null +++ b/Tests/LibWeb/Text/expected/css-transform-transition-to-none-invalidation.txt @@ -0,0 +1,2 @@ +before x=108, y=80, width=100, height=100 +after x=58, y=50, width=100, height=100 diff --git a/Tests/LibWeb/Text/input/css-transform-transition-to-none-invalidation.html b/Tests/LibWeb/Text/input/css-transform-transition-to-none-invalidation.html new file mode 100644 index 00000000000..d4dfcc0520a --- /dev/null +++ b/Tests/LibWeb/Text/input/css-transform-transition-to-none-invalidation.html @@ -0,0 +1,22 @@ + + + +
+ \ No newline at end of file