mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:07:36 +00:00
LibWeb: Use the new to_px() helpers in CSS, SVG and layout code
There should be no behavior change from this, only slightly less verbosity. :^)
This commit is contained in:
parent
cdf0d3e905
commit
ca1fa5f748
14 changed files with 141 additions and 149 deletions
|
@ -57,8 +57,8 @@ void SVGSVGBox::prepare_for_replaced_layout()
|
|||
if (dom_node.has_attribute(HTML::AttributeNames::width) && dom_node.has_attribute(HTML::AttributeNames::height)) {
|
||||
CSSPixelRect rect;
|
||||
// FIXME: Allow for relative lengths here
|
||||
rect.set_width(computed_values().width().resolved(*this, CSS::Length::make_px(0)).to_px(*this));
|
||||
rect.set_height(computed_values().height().resolved(*this, CSS::Length::make_px(0)).to_px(*this));
|
||||
rect.set_width(computed_values().width().to_px(*this, 0));
|
||||
rect.set_height(computed_values().height().to_px(*this, 0));
|
||||
add_to_united_rect(rect);
|
||||
return IterationDecision::Continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue