ladybird/Libraries/LibHTML/Layout/LayoutTableRow.h
Andreas Kling 65ad6c35f0 LibHTML: Add typed child/sibling traversal helpers for LayoutNode
Also add some special variants for the table classes, to make it a bit
more pleasant to write table code. :^)
2019-10-18 09:38:12 +02:00

30 lines
699 B
C++

#pragma once
#include <LibHTML/Layout/LayoutBox.h>
class LayoutTableCell;
class LayoutTableRow final : public LayoutBox {
public:
LayoutTableRow(const Element&, NonnullRefPtr<StyleProperties>);
virtual ~LayoutTableRow() override;
virtual void layout() override;
LayoutTableCell* first_cell();
const LayoutTableCell* first_cell() const;
LayoutTableRow* next_row();
const LayoutTableRow* next_row() const;
private:
virtual bool is_table_row() const override { return true; }
virtual const char* class_name() const override { return "LayoutTableRow"; }
};
template<>
inline bool is<LayoutTableRow>(const LayoutNode& node)
{
return node.is_table_row();
}