mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-15 22:12:20 +00:00
LibWeb: Use transform-box for resolving percentage transform values
Factor out computing the transform box rect into its own method. Then use it when resolving the transformation matrix, to compute percentage values.
This commit is contained in:
parent
a9d5a99568
commit
7e38e12bb0
Notes:
github-actions[bot]
2024-09-05 23:35:41 +00:00
Author: https://github.com/BenJilks
Commit: 7e38e12bb0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1289
Reviewed-by: https://github.com/kalenikaliaksandr
5 changed files with 92 additions and 65 deletions
|
@ -47,7 +47,7 @@ ErrorOr<Gfx::FloatMatrix4x4> Transformation::to_matrix(Optional<Painting::Painta
|
|||
CSSPixels width = 1;
|
||||
CSSPixels height = 1;
|
||||
if (paintable_box.has_value()) {
|
||||
auto reference_box = paintable_box->absolute_padding_box_rect();
|
||||
auto reference_box = paintable_box->transform_box_rect();
|
||||
width = reference_box.width();
|
||||
height = reference_box.height();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue