diff options
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Document.h | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index ab5e5edee3..fe89703d54 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -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 }; }; } diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp index 8f84c18adb..be45d48140 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLParser.cpp @@ -261,9 +261,11 @@ void HTMLParser::the_end() // FIXME: 8. Set the Document's load timing info's load event end time to the current high resolution time given window. - // FIXME: 9. Assert: Document's page showing is false. + // 9. Assert: Document's page showing is false. + VERIFY(!document->page_showing()); - // FIXME: 10. Set the Document's page showing flag to true. + // 10. Set the Document's page showing flag to true. + document->set_page_showing(true); // FIXME: 11. Fire a page transition event named pageshow at window with false. |