mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
LibWeb: Make sure CSS::ComputedValues has initial size values
Instead of using Optional<LengthPercentage>, we now use LengthPercentage for these values. The initial values are all `auto`. This avoids having to check `has_value()` in a ton of places.
This commit is contained in:
parent
734ff422ad
commit
cefc931347
9 changed files with 81 additions and 86 deletions
|
@ -37,8 +37,8 @@ void SVGFormattingContext::run(Box const& box, LayoutMode)
|
|||
auto& layout_node = static_cast<Layout::Node&>(*(svg_element->layout_node()));
|
||||
|
||||
// FIXME: Allow for relative lengths here
|
||||
geometry_box_state.content_width = layout_node.computed_values().width().value().resolved(layout_node, { 0, CSS::Length::Type::Px }).to_px(layout_node);
|
||||
geometry_box_state.content_height = layout_node.computed_values().height().value().resolved(layout_node, { 0, CSS::Length::Type::Px }).to_px(layout_node);
|
||||
geometry_box_state.content_width = layout_node.computed_values().width().resolved(layout_node, { 0, CSS::Length::Type::Px }).to_px(layout_node);
|
||||
geometry_box_state.content_height = layout_node.computed_values().height().resolved(layout_node, { 0, CSS::Length::Type::Px }).to_px(layout_node);
|
||||
|
||||
return IterationDecision::Continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue