From 032646b6c3bac74944884337cfbe7cad382baef1 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 21 Jul 2022 14:29:47 +0100 Subject: [PATCH] LibWeb: Produce a transformation matrix for TransformFunction::Rotate Currently we can't actually paint the result, but at least the maths is correct. :^) --- Userland/Libraries/LibWeb/Painting/StackingContext.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp index 9fd827a260..c205b6a23a 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp @@ -247,6 +247,10 @@ Gfx::FloatMatrix4x4 StackingContext::get_transformation_matrix(CSS::Transformati 0, 0, 1, 0, 0, 0, 0, 1); break; + case CSS::TransformFunction::Rotate: + if (count == 1) + return Gfx::rotation_matrix({ 0.0f, 0.0f, 1.0f }, value(0)); + break; default: dbgln_if(LIBWEB_CSS_DEBUG, "FIXME: Unhandled transformation function {}", CSS::TransformationStyleValue::create(transformation.function, {})->to_string()); }