1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:17:44 +00:00

LibWeb: Add a "page showing" flag to documents

This will be used to determine whether "pageshow" and "pagehide" events
are appropriate. We won't actually make use of it until we implement
more of history traversal and document unloading.
This commit is contained in:
Andreas Kling 2021-09-26 12:26:39 +02:00
parent a2f77a2e39
commit 508edcd217
2 changed files with 10 additions and 2 deletions

View file

@ -294,6 +294,9 @@ public:
--m_number_of_things_delaying_the_load_event;
}
bool page_showing() const { return m_page_showing; }
void set_page_showing(bool value) { m_page_showing = value; }
private:
explicit Document(const AK::URL&);
@ -378,6 +381,9 @@ private:
NonnullRefPtr<HTML::History> m_history;
size_t m_number_of_things_delaying_the_load_event { 0 };
// https://html.spec.whatwg.org/#page-showing
bool m_page_showing { false };
};
}