From 05b5a3bfbabb2e3a9feb3a009fe9a9861beb7e2d Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Sat, 18 Feb 2023 23:27:53 +0300 Subject: [PATCH] LibWeb: Transform translate() values to device pixels before painting --- Userland/Libraries/LibWeb/Painting/StackingContext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp index ba583496e4..b5abc8aad4 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp @@ -372,6 +372,8 @@ void StackingContext::paint(PaintContext& context) const return; auto affine_transform = affine_transform_matrix(); + auto translation = context.rounded_device_point(affine_transform.translation().to_type()).to_type().to_type(); + affine_transform.set_translation(translation); if (opacity < 1.0f || !affine_transform.is_identity_or_translation()) { auto transform_origin = this->transform_origin();