LayoutTableCell.h 672 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include <LibHTML/Layout/LayoutBlock.h>
  3. class LayoutTableCell final : public LayoutBlock {
  4. public:
  5. LayoutTableCell(const Element&, NonnullRefPtr<StyleProperties>);
  6. virtual ~LayoutTableCell() override;
  7. LayoutTableCell* next_cell() { return next_sibling_of_type<LayoutTableCell>(); }
  8. const LayoutTableCell* next_cell() const { return next_sibling_of_type<LayoutTableCell>(); }
  9. private:
  10. virtual bool is_table_cell() const override { return true; }
  11. virtual const char* class_name() const override { return "LayoutTableCell"; }
  12. };
  13. template<>
  14. inline bool is<LayoutTableCell>(const LayoutNode& node)
  15. {
  16. return node.is_table_cell();
  17. }