mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibWeb: Don't call did_layout in non-main frame documents
Fixes https://github.com/SerenityOS/serenity/issues/2649 Loading a page with iframes could lead to a scenario, where the iframe document finished layout prior to the main frame beeing laid out initially. This caused a crash/assertion of the browser.
This commit is contained in:
parent
a5b8cc2d0b
commit
5b6920a18a
Notes:
sideshowbarker
2024-07-19 05:00:56 +09:00
Author: https://github.com/kevmeyer Commit: https://github.com/SerenityOS/serenity/commit/5b6920a18a5 Pull-request: https://github.com/SerenityOS/serenity/pull/2733 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/linusg
1 changed files with 2 additions and 1 deletions
|
@ -246,7 +246,8 @@ void Document::layout()
|
|||
m_layout_root->layout();
|
||||
m_layout_root->set_needs_display();
|
||||
|
||||
frame()->page().client().page_did_layout();
|
||||
if (frame()->is_main_frame())
|
||||
frame()->page().client().page_did_layout();
|
||||
}
|
||||
|
||||
void Document::update_style()
|
||||
|
|
Loading…
Add table
Reference in a new issue