CSSStyleRule.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/CSS/CSSStyleRule.h>
  7. namespace Web::CSS {
  8. CSSStyleRule::CSSStyleRule(NonnullRefPtrVector<Selector>&& selectors, NonnullRefPtr<CSSStyleDeclaration>&& declaration)
  9. : m_selectors(move(selectors))
  10. , m_declaration(move(declaration))
  11. {
  12. }
  13. CSSStyleRule::~CSSStyleRule()
  14. {
  15. }
  16. // https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
  17. String CSSStyleRule::selector_text() const
  18. {
  19. TODO();
  20. }
  21. // https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
  22. void CSSStyleRule::set_selector_text(StringView selector_text)
  23. {
  24. // FIXME: 1. Run the parse a group of selectors algorithm on the given value.
  25. // FIXME: 2. If the algorithm returns a non-null value replace the associated group of selectors with the returned value.
  26. // FIXME: 3. Otherwise, if the algorithm returns a null value, do nothing.
  27. (void)selector_text;
  28. TODO();
  29. }
  30. // https://drafts.csswg.org/cssom/#dom-cssstylerule-style
  31. CSSStyleDeclaration* CSSStyleRule::style()
  32. {
  33. return m_declaration;
  34. }
  35. }