diff --git a/Userland/Libraries/LibWeb/CSS/TransformFunctions.json b/Userland/Libraries/LibWeb/CSS/TransformFunctions.json index 6ece4e8ea3..6f764e6d04 100644 --- a/Userland/Libraries/LibWeb/CSS/TransformFunctions.json +++ b/Userland/Libraries/LibWeb/CSS/TransformFunctions.json @@ -139,6 +139,14 @@ } ] }, + "translateZ": { + "parameters": [ + { + "type": "", + "required": true + } + ] + }, "scale": { "parameters": [ { diff --git a/Userland/Libraries/LibWeb/CSS/Transformation.cpp b/Userland/Libraries/LibWeb/CSS/Transformation.cpp index 5a386fc300..6f5a5fcafb 100644 --- a/Userland/Libraries/LibWeb/CSS/Transformation.cpp +++ b/Userland/Libraries/LibWeb/CSS/Transformation.cpp @@ -84,6 +84,13 @@ Gfx::FloatMatrix4x4 Transformation::to_matrix(Painting::PaintableBox const& pain 0, 0, 1, 0, 0, 0, 0, 1); break; + case CSS::TransformFunction::TranslateZ: + if (count == 1) + return Gfx::FloatMatrix4x4(1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, value(0), + 0, 0, 0, 1); + break; case CSS::TransformFunction::Scale: if (count == 1) return Gfx::FloatMatrix4x4(value(0), 0, 0, 0,