1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:57:47 +00:00

LibWeb: Rename FormattingState to LayoutState

This seems a bit more descriptive (and also a bit shorter).
This commit is contained in:
Andreas Kling 2022-07-16 23:30:32 +02:00
parent 0d8f9019c8
commit 52862c72d0
25 changed files with 95 additions and 95 deletions

View file

@ -8,7 +8,7 @@
#include <AK/OwnPtr.h>
#include <LibWeb/Forward.h>
#include <LibWeb/Layout/FormattingState.h>
#include <LibWeb/Layout/LayoutState.h>
namespace Web::Layout {
@ -38,10 +38,10 @@ public:
static bool creates_block_formatting_context(Box const&);
static float compute_width_for_replaced_element(FormattingState const&, ReplacedBox const&);
static float compute_height_for_replaced_element(FormattingState const&, ReplacedBox const&);
static float compute_width_for_replaced_element(LayoutState const&, ReplacedBox const&);
static float compute_height_for_replaced_element(LayoutState const&, ReplacedBox const&);
OwnPtr<FormattingContext> create_independent_formatting_context_if_needed(FormattingState&, Box const& child_box);
OwnPtr<FormattingContext> create_independent_formatting_context_if_needed(LayoutState&, Box const& child_box);
virtual void parent_context_did_dimension_child_root_box() { }
@ -58,13 +58,13 @@ public:
float containing_block_width_for(Box const& box) const { return containing_block_width_for(box, m_state); }
float containing_block_height_for(Box const& box) const { return containing_block_height_for(box, m_state); }
static float containing_block_width_for(Box const&, FormattingState const&);
static float containing_block_height_for(Box const&, FormattingState const&);
static float containing_block_width_for(Box const&, LayoutState const&);
static float containing_block_height_for(Box const&, LayoutState const&);
virtual void run_intrinsic_size_determination(Box const&);
protected:
FormattingContext(Type, FormattingState&, Box const&, FormattingContext* parent = nullptr);
FormattingContext(Type, LayoutState&, Box const&, FormattingContext* parent = nullptr);
float calculate_fit_content_size(float min_content_size, float max_content_size, Optional<float> available_space) const;
@ -81,11 +81,11 @@ protected:
float preferred_minimum_width { 0 };
};
static float tentative_width_for_replaced_element(FormattingState const&, ReplacedBox const&, CSS::LengthPercentage const& computed_width);
static float tentative_height_for_replaced_element(FormattingState const&, ReplacedBox const&, CSS::LengthPercentage const& computed_height);
static float compute_auto_height_for_block_formatting_context_root(FormattingState const&, BlockContainer const&);
static float compute_auto_height_for_block_level_element(FormattingState const&, Box const&);
static float calculate_auto_height(FormattingState const& state, Box const& box);
static float tentative_width_for_replaced_element(LayoutState const&, ReplacedBox const&, CSS::LengthPercentage const& computed_width);
static float tentative_height_for_replaced_element(LayoutState const&, ReplacedBox const&, CSS::LengthPercentage const& computed_height);
static float compute_auto_height_for_block_formatting_context_root(LayoutState const&, BlockContainer const&);
static float compute_auto_height_for_block_level_element(LayoutState const&, Box const&);
static float calculate_auto_height(LayoutState const& state, Box const& box);
ShrinkToFitResult calculate_shrink_to_fit_widths(Box const&);
@ -102,7 +102,7 @@ protected:
FormattingContext* m_parent { nullptr };
Box const& m_context_box;
FormattingState& m_state;
LayoutState& m_state;
};
}