1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:08:13 +00:00

LibWeb: Report if anything is delaying load event, not the count

Some elements that delay the load event are more complicated than a
simple count will allow for. We'll implement those in a bit!
This commit is contained in:
Sam Atkins 2023-11-24 15:18:57 +00:00 committed by Andreas Kling
parent 6154681718
commit 6c5450f9ce
5 changed files with 14 additions and 4 deletions

View file

@ -2384,6 +2384,16 @@ void Document::decrement_number_of_things_delaying_the_load_event(Badge<Document
page->client().page_did_update_resource_count(m_number_of_things_delaying_the_load_event);
}
bool Document::anything_is_delaying_the_load_event() const
{
if (m_number_of_things_delaying_the_load_event > 0)
return true;
// FIXME: Track down all the things that are supposed to delay the load event.
return false;
}
void Document::invalidate_stacking_context_tree()
{
if (auto* paintable_box = this->paintable_box())