mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27:35 +00:00
LibWeb: Get rid of weird Length::resolved() usage in LayoutState
The second call to resolved() turns non-finite lengths into "auto". This is a very strange ad-hoc behavior that we need to get rid of.
This commit is contained in:
parent
ca1fa5f748
commit
c9223528a0
1 changed files with 4 additions and 4 deletions
|
@ -239,14 +239,14 @@ void LayoutState::UsedValues::set_node(NodeWithStyleAndBoxModelMetrics& node, Us
|
|||
|
||||
if (width) {
|
||||
border_and_padding = CSSPixels(computed_values.border_left().width)
|
||||
+ computed_values.padding().left().resolved(*m_node, CSS::Length::make_px(containing_block_used_values->content_width())).resolved(*m_node).to_px(*m_node)
|
||||
+ computed_values.padding().left().to_px(*m_node, containing_block_used_values->content_width())
|
||||
+ CSSPixels(computed_values.border_right().width)
|
||||
+ computed_values.padding().right().resolved(*m_node, CSS::Length::make_px(containing_block_used_values->content_width())).resolved(*m_node).to_px(*m_node);
|
||||
+ computed_values.padding().right().to_px(*m_node, containing_block_used_values->content_width());
|
||||
} else {
|
||||
border_and_padding = CSSPixels(computed_values.border_top().width)
|
||||
+ computed_values.padding().top().resolved(*m_node, CSS::Length::make_px(containing_block_used_values->content_width())).resolved(*m_node).to_px(*m_node)
|
||||
+ computed_values.padding().top().to_px(*m_node, containing_block_used_values->content_width())
|
||||
+ CSSPixels(computed_values.border_bottom().width)
|
||||
+ computed_values.padding().bottom().resolved(*m_node, CSS::Length::make_px(containing_block_used_values->content_width())).resolved(*m_node).to_px(*m_node);
|
||||
+ computed_values.padding().bottom().to_px(*m_node, containing_block_used_values->content_width());
|
||||
}
|
||||
|
||||
return unadjusted_pixels - border_and_padding;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue