HTMLTableCellElement.h 1.2 KB

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