mirror of
https://github.com/RGBCube/serenity
synced 2025-06-28 23:22:11 +00:00
LibWeb: Convert LayoutState to new pixel units
This commit is contained in:
parent
76047d1932
commit
c70dcaefcd
10 changed files with 179 additions and 179 deletions
|
@ -81,7 +81,7 @@ void SVGFormattingContext::run(Box const& box, LayoutMode, [[maybe_unused]] Avai
|
|||
if (maybe_view_box.has_value()) {
|
||||
auto view_box = maybe_view_box.value();
|
||||
CSSPixelPoint viewbox_offset = { view_box.min_x, view_box.min_y };
|
||||
geometry_box_state.set_content_offset((path_bounding_box.top_left() + viewbox_offset).to_type<float>());
|
||||
geometry_box_state.set_content_offset(path_bounding_box.top_left() + viewbox_offset);
|
||||
|
||||
geometry_box_state.set_content_width(view_box.width);
|
||||
geometry_box_state.set_content_height(view_box.height);
|
||||
|
@ -89,9 +89,9 @@ void SVGFormattingContext::run(Box const& box, LayoutMode, [[maybe_unused]] Avai
|
|||
return IterationDecision::Continue;
|
||||
}
|
||||
|
||||
geometry_box_state.set_content_offset(path_bounding_box.top_left().to_type<float>());
|
||||
geometry_box_state.set_content_width(path_bounding_box.width().value());
|
||||
geometry_box_state.set_content_height(path_bounding_box.height().value());
|
||||
geometry_box_state.set_content_offset(path_bounding_box.top_left());
|
||||
geometry_box_state.set_content_width(path_bounding_box.width());
|
||||
geometry_box_state.set_content_height(path_bounding_box.height());
|
||||
}
|
||||
|
||||
return IterationDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue