StyleSheet.cpp 440 B

123456789101112131415161718192021
  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/StyleSheet.h>
  8. #include <LibWeb/DOM/Element.h>
  9. namespace Web::CSS {
  10. void StyleSheet::set_owner_node(DOM::Element* element)
  11. {
  12. if (element)
  13. m_owner_node = element->make_weak_ptr<DOM::Element>();
  14. else
  15. m_owner_node = nullptr;
  16. }
  17. }