mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
committed by
Jelle Raaijmakers
parent
e4dc2663ba
commit
15fa6676b0
Notes:
github-actions[bot]
2025-11-18 13:37:37 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/15fa6676b07 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6826 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/nico
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user