mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Don't trigger page_did_layout() on non-active documents
PageHost assumes page_did_layout() to be called when the layout of the active document changes, however, it seems that sometimes the layout can change on another document before the layout of the active document has been calculated. This leads to a VERIFY() being hit. This commit now makes it so page_did_layout() is only called when the document is the active document. Fixes #15328
This commit is contained in:
parent
29260d1480
commit
f5052e5017
Notes:
sideshowbarker
2024-07-17 21:26:19 +09:00
Author: https://github.com/MacDue
Commit: f5052e5017
Pull-request: https://github.com/SerenityOS/serenity/pull/15333
Issue: https://github.com/SerenityOS/serenity/issues/15328
1 changed files with 1 additions and 1 deletions
|
@ -816,7 +816,7 @@ void Document::update_layout()
|
|||
|
||||
browsing_context()->set_needs_display();
|
||||
|
||||
if (browsing_context()->is_top_level()) {
|
||||
if (browsing_context()->is_top_level() && browsing_context()->active_document() == this) {
|
||||
if (auto* page = this->page())
|
||||
page->client().page_did_layout();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue