HTMLTableCellElement.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/HTML/HTMLElement.h>
  8. namespace Web::HTML {
  9. class HTMLTableCellElement final : public HTMLElement {
  10. WEB_PLATFORM_OBJECT(HTMLTableCellElement, HTMLElement);
  11. JS_DECLARE_ALLOCATOR(HTMLTableCellElement);
  12. public:
  13. virtual ~HTMLTableCellElement() override;
  14. unsigned col_span() const;
  15. unsigned row_span() const;
  16. WebIDL::ExceptionOr<void> set_col_span(unsigned);
  17. WebIDL::ExceptionOr<void> set_row_span(unsigned);
  18. virtual Optional<ARIA::Role> default_role() const override;
  19. private:
  20. HTMLTableCellElement(DOM::Document&, DOM::QualifiedName);
  21. virtual bool is_html_table_cell_element() const override { return true; }
  22. virtual void initialize(JS::Realm&) override;
  23. virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
  24. };
  25. }
  26. namespace Web::DOM {
  27. template<>
  28. inline bool Node::fast_is<HTML::HTMLTableCellElement>() const { return is_html_table_cell_element(); }
  29. }