mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibWeb: Implement rotation transform functions from css-transforms-2
This commit is contained in:
parent
ddfe18783b
commit
0fdd924db2
Notes:
sideshowbarker
2024-07-17 08:43:11 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/0fdd924db2 Pull-request: https://github.com/SerenityOS/serenity/pull/15408
|
@ -23,6 +23,15 @@
|
|||
"rotate": {
|
||||
"parameters": "<angle>"
|
||||
},
|
||||
"rotateX": {
|
||||
"parameters": "<angle>"
|
||||
},
|
||||
"rotateY": {
|
||||
"parameters": "<angle>"
|
||||
},
|
||||
"rotateZ": {
|
||||
"parameters": "<angle>"
|
||||
},
|
||||
"skew": {
|
||||
"parameters": "<angle>{1,2}"
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue