StyleSheet.cpp 730 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
  3. * Copyright (c) 2021, the SerenityOS developers.
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #include <LibWeb/CSS/CSSStyleSheet.h>
  8. #include <LibWeb/CSS/StyleSheet.h>
  9. #include <LibWeb/DOM/Element.h>
  10. namespace Web::CSS {
  11. StyleSheet::StyleSheet(JS::Realm& realm)
  12. : PlatformObject(realm)
  13. {
  14. }
  15. void StyleSheet::visit_edges(Cell::Visitor& visitor)
  16. {
  17. Base::visit_edges(visitor);
  18. visitor.visit(m_owner_node);
  19. visitor.visit(m_parent_style_sheet);
  20. }
  21. void StyleSheet::set_owner_node(DOM::Element* element)
  22. {
  23. m_owner_node = element;
  24. }
  25. void StyleSheet::set_parent_css_style_sheet(CSSStyleSheet* parent)
  26. {
  27. m_parent_style_sheet = parent;
  28. }
  29. }