HTMLTableCellElement.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. public:
  12. virtual ~HTMLTableCellElement() override;
  13. unsigned col_span() const;
  14. unsigned row_span() const;
  15. WebIDL::ExceptionOr<void> set_col_span(unsigned);
  16. WebIDL::ExceptionOr<void> set_row_span(unsigned);
  17. virtual Optional<ARIA::Role> default_role() const override;
  18. private:
  19. HTMLTableCellElement(DOM::Document&, DOM::QualifiedName);
  20. virtual bool is_html_table_cell_element() const override { return true; }
  21. virtual void initialize(JS::Realm&) override;
  22. virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
  23. };
  24. }
  25. namespace Web::DOM {
  26. template<>
  27. inline bool Node::fast_is<HTML::HTMLTableCellElement>() const { return is_html_table_cell_element(); }
  28. }