2022-12-12 20:55:34 +01:00
|
|
|
/*
|
2024-10-04 13:19:50 +02:00
|
|
|
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
2022-12-12 20:55:34 +01:00
|
|
|
* Copyright (c) 2023, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/HTML/DocumentState.h>
|
2026-02-11 07:33:58 +01:00
|
|
|
#include <LibWeb/HTML/SessionHistoryEntry.h>
|
2022-12-12 20:55:34 +01:00
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_DEFINE_ALLOCATOR(DocumentState);
|
2023-11-19 19:47:52 +01:00
|
|
|
|
2022-12-12 20:55:34 +01:00
|
|
|
DocumentState::DocumentState() = default;
|
|
|
|
|
|
|
|
|
|
DocumentState::~DocumentState() = default;
|
|
|
|
|
|
|
|
|
|
void DocumentState::visit_edges(Cell::Visitor& visitor)
|
|
|
|
|
{
|
|
|
|
|
Base::visit_edges(visitor);
|
2024-11-25 14:30:12 +00:00
|
|
|
m_history_policy_container.visit(
|
|
|
|
|
[&](GC::Ref<PolicyContainer> const& policy_container) { visitor.visit(policy_container); },
|
|
|
|
|
[](auto const&) {});
|
2023-04-05 09:08:10 +03:00
|
|
|
for (auto& nested_history : m_nested_histories) {
|
2024-04-15 13:58:21 +02:00
|
|
|
visitor.visit(nested_history.entries);
|
2023-04-05 09:08:10 +03:00
|
|
|
}
|
2022-12-12 20:55:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|