1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:57:35 +00:00

LibWeb: LayoutNodes know whether they are flex-items

This is useful for debugging when dumping the layout tree.
This commit is contained in:
Tobias Christiansen 2021-05-29 22:36:15 +02:00 committed by Ali Mohammad Pur
parent 2205239d9a
commit 7f81c8fba2
3 changed files with 10 additions and 1 deletions

View file

@ -109,6 +109,9 @@ public:
bool is_absolutely_positioned() const;
bool is_fixed_position() const;
bool is_flex_item() const { return m_is_flex_item; }
void set_flex_item(bool b) { m_is_flex_item = b; }
const BlockBox* containing_block() const;
BlockBox* containing_block() { return const_cast<BlockBox*>(const_cast<const Node*>(this)->containing_block()); }
@ -182,6 +185,8 @@ private:
bool m_visible { true };
bool m_children_are_inline { false };
SelectionState m_selection_state { SelectionState::None };
bool m_is_flex_item { false };
};
class NodeWithStyle : public Node {