mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 13:37:44 +00:00
LibWeb: Split out FFC's "generate anonymous flex items" to a function
Let's begin splitting the FlexFormattingContext layout algorithm into separate functions to make it more manageable.
This commit is contained in:
parent
ad50e328e0
commit
ca02d112a5
2 changed files with 82 additions and 62 deletions
|
@ -10,6 +10,8 @@
|
|||
|
||||
namespace Web::Layout {
|
||||
|
||||
struct FlexItem;
|
||||
|
||||
class FlexFormattingContext final : public FormattingContext {
|
||||
public:
|
||||
FlexFormattingContext(Box& containing_block, FormattingContext* parent);
|
||||
|
@ -18,6 +20,13 @@ public:
|
|||
virtual bool inhibits_floating() const override { return true; }
|
||||
|
||||
virtual void run(Box&, LayoutMode) override;
|
||||
|
||||
private:
|
||||
void generate_anonymous_flex_items(Box& flex_container, Vector<FlexItem>&);
|
||||
|
||||
bool is_row_layout() const { return m_flex_direction == CSS::FlexDirection::Row || m_flex_direction == CSS::FlexDirection::RowReverse; }
|
||||
|
||||
CSS::FlexDirection m_flex_direction {};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue