HTMLStyleElement.h 815 B

12345678910111213141516171819202122232425262728293031323334
  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. #pragma once
  8. #include <LibWeb/HTML/HTMLElement.h>
  9. namespace Web::HTML {
  10. class HTMLStyleElement final : public HTMLElement {
  11. public:
  12. using WrapperType = Bindings::HTMLStyleElementWrapper;
  13. HTMLStyleElement(DOM::Document&, DOM::QualifiedName);
  14. virtual ~HTMLStyleElement() override;
  15. virtual void children_changed() override;
  16. virtual void inserted() override;
  17. virtual void removed_from(Node*) override;
  18. void update_a_style_block();
  19. RefPtr<CSS::CSSStyleSheet> sheet() const;
  20. private:
  21. // https://www.w3.org/TR/cssom/#associated-css-style-sheet
  22. RefPtr<CSS::CSSStyleSheet> m_associated_css_style_sheet;
  23. };
  24. }