mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Replaced remaining usage and delete Size::resolved()
This commit is contained in:
parent
76152845fd
commit
7225087fa2
Notes:
github-actions[bot]
2024-10-06 17:26:10 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 7225087fa2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1651
3 changed files with 2 additions and 10 deletions
|
@ -19,11 +19,6 @@ CSSPixels Size::to_px(Layout::Node const& node, CSSPixels reference_value) const
|
||||||
return m_length_percentage.resolved(node, reference_value).to_px(node);
|
return m_length_percentage.resolved(node, reference_value).to_px(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSS::Length Size::resolved(Layout::Node const& node, CSSPixels reference_value) const
|
|
||||||
{
|
|
||||||
return m_length_percentage.resolved(node, reference_value);
|
|
||||||
}
|
|
||||||
|
|
||||||
Size Size::make_auto()
|
Size Size::make_auto()
|
||||||
{
|
{
|
||||||
return Size { Type::Auto, Length::make_auto() };
|
return Size { Type::Auto, Length::make_auto() };
|
||||||
|
|
|
@ -45,9 +45,6 @@ public:
|
||||||
bool is_fit_content() const { return m_type == Type::FitContent; }
|
bool is_fit_content() const { return m_type == Type::FitContent; }
|
||||||
bool is_none() const { return m_type == Type::None; }
|
bool is_none() const { return m_type == Type::None; }
|
||||||
|
|
||||||
// FIXME: This is a stopgap API that will go away once all layout code is aware of CSS::Size.
|
|
||||||
CSS::Length resolved(Layout::Node const&, CSSPixels reference_value) const;
|
|
||||||
|
|
||||||
[[nodiscard]] CSSPixels to_px(Layout::Node const&, CSSPixels reference_value) const;
|
[[nodiscard]] CSSPixels to_px(Layout::Node const&, CSSPixels reference_value) const;
|
||||||
|
|
||||||
bool contains_percentage() const;
|
bool contains_percentage() const;
|
||||||
|
|
|
@ -1600,7 +1600,7 @@ CSSPixels FormattingContext::calculate_inner_width(Layout::Box const& box, Avail
|
||||||
return max(inner_width, 0);
|
return max(inner_width, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return width.resolved(box, width_of_containing_block).to_px(box);
|
return width.to_px(box, width_of_containing_block);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSSPixels FormattingContext::calculate_inner_height(Layout::Box const& box, AvailableSize const& available_height, CSS::Size const& height) const
|
CSSPixels FormattingContext::calculate_inner_height(Layout::Box const& box, AvailableSize const& available_height, CSS::Size const& height) const
|
||||||
|
@ -1618,7 +1618,7 @@ CSSPixels FormattingContext::calculate_inner_height(Layout::Box const& box, Avai
|
||||||
return max(inner_height, 0);
|
return max(inner_height, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return height.resolved(box, height_of_containing_block).to_px(box);
|
return height.to_px(box, height_of_containing_block);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSSPixels FormattingContext::containing_block_width_for(NodeWithStyleAndBoxModelMetrics const& node) const
|
CSSPixels FormattingContext::containing_block_width_for(NodeWithStyleAndBoxModelMetrics const& node) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue