diff --git a/Userland/Libraries/LibWeb/CSS/TransformFunctions.json b/Userland/Libraries/LibWeb/CSS/TransformFunctions.json index 711488a357e..f0dbe7022f2 100644 --- a/Userland/Libraries/LibWeb/CSS/TransformFunctions.json +++ b/Userland/Libraries/LibWeb/CSS/TransformFunctions.json @@ -23,6 +23,15 @@ "rotate": { "parameters": "" }, + "rotateX": { + "parameters": "" + }, + "rotateY": { + "parameters": "" + }, + "rotateZ": { + "parameters": "" + }, "skew": { "parameters": "{1,2}" }, diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp index d08d3e6f477..53f1ce8c602 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp @@ -251,7 +251,16 @@ Gfx::FloatMatrix4x4 StackingContext::get_transformation_matrix(CSS::Transformati 0, 0, 1, 0, 0, 0, 0, 1); break; + case CSS::TransformFunction::RotateX: + if (count == 1) + return Gfx::rotation_matrix({ 1.0f, 0.0f, 0.0f }, value(0)); + break; + case CSS::TransformFunction::RotateY: + if (count == 1) + return Gfx::rotation_matrix({ 0.0f, 1.0f, 0.0f }, value(0)); + break; case CSS::TransformFunction::Rotate: + case CSS::TransformFunction::RotateZ: if (count == 1) return Gfx::rotation_matrix({ 0.0f, 0.0f, 1.0f }, value(0)); break;