From f738a166f26fb831133ef21d38452c2d14b84879 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Wed, 5 Apr 2023 09:09:43 +0300 Subject: [PATCH] LibWeb: Add resource property in DocumentState --- Userland/Libraries/LibWeb/HTML/DocumentState.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/DocumentState.h b/Userland/Libraries/LibWeb/HTML/DocumentState.h index ceda3244dd..0fe1946ece 100644 --- a/Userland/Libraries/LibWeb/HTML/DocumentState.h +++ b/Userland/Libraries/LibWeb/HTML/DocumentState.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -57,6 +58,9 @@ public: [[nodiscard]] Vector const& nested_histories() const { return m_nested_histories; } [[nodiscard]] Vector& nested_histories() { return m_nested_histories; } + [[nodiscard]] Variant resource() const { return m_resource; } + void set_resource(Variant resource) { m_resource = move(resource); } + [[nodiscard]] bool reload_pending() const { return m_reload_pending; } void set_reload_pending(bool reload_pending) { m_reload_pending = reload_pending; } @@ -92,7 +96,8 @@ private: // https://html.spec.whatwg.org/multipage/browsing-the-web.html#document-state-nested-histories Vector m_nested_histories; - // FIXME: https://html.spec.whatwg.org/multipage/browsing-the-web.html#document-state-resource + // https://html.spec.whatwg.org/multipage/browsing-the-web.html#document-state-resource + Variant m_resource {}; // https://html.spec.whatwg.org/multipage/browsing-the-web.html#document-state-reload-pending bool m_reload_pending { false };