mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Simplify generation of perspective() matrix transform
A value of `perspective(none)` should result in the identity matrix. But instead of creating that identity matrix explicitly, just break and default to the identity matrix at the bottom of this method.
This commit is contained in:
parent
e4dc2663ba
commit
15fa6676b0
Notes:
github-actions[bot]
2025-11-18 13:37:37 +00:00
Author: https://github.com/gmta
Commit: 15fa6676b0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6826
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/nico
1 changed files with 1 additions and 4 deletions
|
|
@ -90,10 +90,7 @@ ErrorOr<Gfx::FloatMatrix4x4> Transformation::to_matrix(Optional<Painting::Painta
|
|||
0, 0, 1, 0,
|
||||
0, 0, -1 / distance, 1);
|
||||
}
|
||||
return Gfx::FloatMatrix4x4(1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1);
|
||||
break;
|
||||
case CSS::TransformFunction::Matrix:
|
||||
if (count == 6)
|
||||
return Gfx::FloatMatrix4x4(TRY(value(0)), TRY(value(2)), 0, TRY(value(4)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue