summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-01 16:34:56 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-05 12:42:46 +0200
commitc4a0b7057b08b72d4d16b41bc6bf074aa2d264e7 (patch)
tree719026ce3d826a804e00d7955b6d964fa9d7ae8b /Userland/Libraries/LibWeb/HTML/BrowsingContext.h
parent29a4266367f8798f84219e0dad5c026886d3bbb0 (diff)
downloadserenity-c4a0b7057b08b72d4d16b41bc6bf074aa2d264e7.zip
LibWeb: Add basic skeleton of HTML "session history" to BrowsingContext
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/BrowsingContext.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/BrowsingContext.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
index 564d246218..7ae35ee318 100644
--- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
+++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -16,6 +16,7 @@
#include <LibGfx/Size.h>
#include <LibWeb/DOM/Position.h>
#include <LibWeb/HTML/BrowsingContextContainer.h>
+#include <LibWeb/HTML/SessionHistoryEntry.h>
#include <LibWeb/Loader/FrameLoader.h>
#include <LibWeb/Page/EventHandler.h>
#include <LibWeb/TreeNode.h>
@@ -112,6 +113,9 @@ public:
String const& name() const { return m_name; }
void set_name(String const& name) { m_name = name; }
+ Vector<SessionHistoryEntry>& session_history() { return m_session_history; }
+ Vector<SessionHistoryEntry> const& session_history() const { return m_session_history; }
+
private:
explicit BrowsingContext(Page&, HTML::BrowsingContextContainer*);
@@ -122,6 +126,9 @@ private:
FrameLoader m_loader;
Web::EventHandler m_event_handler;
+ // https://html.spec.whatwg.org/multipage/history.html#session-history
+ Vector<SessionHistoryEntry> m_session_history;
+
WeakPtr<HTML::BrowsingContextContainer> m_container;
RefPtr<DOM::Document> m_active_document;
Gfx::IntSize m_size;