mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibWeb: Convert Paintable coordinates to new pixel units
This fixes a few sizing issues too. The page size is now correct in most cases! \o/ We get to remove some of the `to_type<>()` shenanigans, though it reappears in some other places.
This commit is contained in:
parent
57a69f15ff
commit
ab49dbf137
39 changed files with 200 additions and 179 deletions
|
@ -27,10 +27,10 @@ float SVGGeometryBox::viewbox_scaling() const
|
|||
auto view_box = svg_box->view_box().value();
|
||||
|
||||
bool has_specified_width = svg_box->has_attribute(HTML::AttributeNames::width);
|
||||
auto specified_width = paint_box()->content_width();
|
||||
auto specified_width = paint_box()->content_width().value();
|
||||
|
||||
bool has_specified_height = svg_box->has_attribute(HTML::AttributeNames::height);
|
||||
auto specified_height = paint_box()->content_height();
|
||||
auto specified_height = paint_box()->content_height().value();
|
||||
|
||||
auto scale_width = has_specified_width ? specified_width / view_box.width : 1;
|
||||
auto scale_height = has_specified_height ? specified_height / view_box.height : 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue