1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

LibWeb: Remove unnecessary static formatting context functions

At one point in the past, we had some functions that were called across
different formatting context types, which necessitated making them
static and taking the LayoutState as a parameter.

In all cases, those functions were used to do incorrect hacks, all of
which we've replaced with more correct solutions. :^)
This commit is contained in:
Andreas Kling 2023-05-31 09:28:03 +02:00
parent 421559d725
commit 4f08fcde29
5 changed files with 48 additions and 64 deletions

View file

@ -113,8 +113,8 @@ void InlineFormattingContext::dimension_box_on_line(Box const& box, LayoutMode l
if (is<ReplacedBox>(box)) {
auto& replaced = verify_cast<ReplacedBox>(box);
box_state.set_content_width(compute_width_for_replaced_element(m_state, replaced, *m_available_space));
box_state.set_content_height(compute_height_for_replaced_element(m_state, replaced, *m_available_space));
box_state.set_content_width(compute_width_for_replaced_element(replaced, *m_available_space));
box_state.set_content_height(compute_height_for_replaced_element(replaced, *m_available_space));
if (is<SVGSVGBox>(box))
(void)layout_inside(replaced, layout_mode, box_state.available_inner_space_or_constraints_from(*m_available_space));