StyleSheet.cpp 585 B

123456789101112131415161718192021222324252627
  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. void StyleSheet::set_owner_node(DOM::Element* element)
  12. {
  13. if (element)
  14. m_owner_node = element->make_weak_ptr<DOM::Element>();
  15. else
  16. m_owner_node = nullptr;
  17. }
  18. void StyleSheet::set_parent_css_style_sheet(CSSStyleSheet* parent)
  19. {
  20. m_parent_style_sheet = parent;
  21. }
  22. }