mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
LibHTML: Make "children are inline" flag imperative
Instead of computing whether a block's children are inline based on the first child, make it an imperatively-set flag. This gives us some flexibility to ignore things like text nodes inside a <table>, for example. I'm still unsure what the "correct" way to deal with those will be. We'll find out sooner or later. :^)
This commit is contained in:
parent
41896ff521
commit
5e29238a49
4 changed files with 11 additions and 8 deletions
|
@ -79,6 +79,9 @@ public:
|
|||
template<typename Callback>
|
||||
void for_each_fragment_of_this(Callback);
|
||||
|
||||
bool children_are_inline() const { return m_children_are_inline; }
|
||||
void set_children_are_inline(bool value) { m_children_are_inline = value; }
|
||||
|
||||
protected:
|
||||
explicit LayoutNode(const Node*);
|
||||
|
||||
|
@ -90,6 +93,7 @@ private:
|
|||
bool m_inline { false };
|
||||
bool m_has_style { false };
|
||||
bool m_visible { true };
|
||||
bool m_children_are_inline { false };
|
||||
};
|
||||
|
||||
class LayoutNodeWithStyle : public LayoutNode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue