mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 18:32:28 -05:00
LibWeb: Add m_is_grid_item
in Layout::Node
This information is going to be needed during painting to treat grid items as stacking contexts.
This commit is contained in:
parent
08528a8084
commit
b4064320bd
2 changed files with 7 additions and 0 deletions
|
@ -1328,6 +1328,8 @@ void GridFormattingContext::place_grid_items(AvailableSpace const& available_spa
|
|||
if (child_box.is_out_of_flow(*this))
|
||||
return IterationDecision::Continue;
|
||||
|
||||
child_box.set_grid_item(true);
|
||||
|
||||
auto& order_bucket = order_item_bucket.ensure(child_box.computed_values().order());
|
||||
order_bucket.append(child_box);
|
||||
|
||||
|
|
|
@ -124,6 +124,9 @@ public:
|
|||
bool is_flex_item() const { return m_is_flex_item; }
|
||||
void set_flex_item(bool b) { m_is_flex_item = b; }
|
||||
|
||||
bool is_grid_item() const { return m_is_grid_item; }
|
||||
void set_grid_item(bool b) { m_is_grid_item = b; }
|
||||
|
||||
Box const* containing_block() const;
|
||||
Box* containing_block() { return const_cast<Box*>(const_cast<Node const*>(this)->containing_block()); }
|
||||
|
||||
|
@ -194,6 +197,8 @@ private:
|
|||
SelectionState m_selection_state { SelectionState::None };
|
||||
|
||||
bool m_is_flex_item { false };
|
||||
bool m_is_grid_item { false };
|
||||
|
||||
GeneratedFor m_generated_for { GeneratedFor::NotGenerated };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue