DocumentState.cpp 651 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
  3. * Copyright (c) 2023, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #include <LibWeb/DOM/Document.h>
  8. #include <LibWeb/HTML/DocumentState.h>
  9. namespace Web::HTML {
  10. DocumentState::DocumentState() = default;
  11. DocumentState::~DocumentState() = default;
  12. void DocumentState::visit_edges(Cell::Visitor& visitor)
  13. {
  14. Base::visit_edges(visitor);
  15. visitor.visit(m_document);
  16. for (auto& nested_history : m_nested_histories) {
  17. for (auto& entry : nested_history.entries) {
  18. visitor.visit(entry);
  19. }
  20. }
  21. }
  22. }