mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
LibWeb: Tear down old layout tree when new document becomes active
When a new document becomes the active document of a browsing context, we now notify the old document, allowing it to tear down its layout tree. In the future, there might be more cleanups we'd like to do here.
This commit is contained in:
parent
94f0c34dfe
commit
dbee75af19
Notes:
sideshowbarker
2024-07-17 22:55:25 +09:00
Author: https://github.com/awesomekling
Commit: dbee75af19
Pull-request: https://github.com/SerenityOS/serenity/pull/15672
3 changed files with 12 additions and 0 deletions
|
@ -2256,4 +2256,9 @@ void Document::unload(bool recursive_flag, Optional<DocumentUnloadTimingInfo> un
|
|||
m_unload_counter -= 1;
|
||||
}
|
||||
|
||||
void Document::did_stop_being_active_document_in_browsing_context(Badge<HTML::BrowsingContext>)
|
||||
{
|
||||
tear_down_layout_tree();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue