ladybird/Libraries/LibHTML/Layout/LayoutTable.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

26 lines
598 B
C++

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