mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:58:13 +00:00
LibWeb: Include all floating descendants in BFC root's automatic height
Before this change, we were only considering floating boxes that were immediate children of the BFC root.
This commit is contained in:
parent
005cd4e456
commit
c9a7853fef
3 changed files with 13 additions and 11 deletions
|
@ -109,6 +109,9 @@ struct LayoutState {
|
|||
|
||||
Optional<LineBoxFragmentCoordinate> containing_line_box_fragment;
|
||||
|
||||
void add_floating_descendant(Box const& box) { m_floating_descendants.set(&box); }
|
||||
auto const& floating_descendants() const { return m_floating_descendants; }
|
||||
|
||||
private:
|
||||
Layout::NodeWithStyleAndBoxModelMetrics* m_node { nullptr };
|
||||
|
||||
|
@ -117,6 +120,8 @@ struct LayoutState {
|
|||
|
||||
bool m_has_definite_width { false };
|
||||
bool m_has_definite_height { false };
|
||||
|
||||
HashTable<Box const*> m_floating_descendants;
|
||||
};
|
||||
|
||||
void commit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue