mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
LibWeb: Tear down layout trees properly
Instead of just ripping out the root of the layout tree from its RefPtr in Document, actually go through the DOM and gather up all the layout nodes. Then destroy them all in one swoop. Also, make sure to do this when detaching Document from Frame, to enforce the invariant that layout only occurs in framed documents.
This commit is contained in:
parent
633b6fbc48
commit
0af2795662
2 changed files with 29 additions and 2 deletions
|
@ -198,6 +198,8 @@ public:
|
|||
private:
|
||||
virtual RefPtr<LayoutNode> create_layout_node(const CSS::StyleProperties* parent_style) override;
|
||||
|
||||
void tear_down_layout_tree();
|
||||
|
||||
unsigned m_referencing_node_count { 0 };
|
||||
|
||||
OwnPtr<CSS::StyleResolver> m_style_resolver;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue