LibHTML: Add is<T> helpers for the table-related LayoutNode subclasses

This commit is contained in:
Andreas Kling 2019-10-17 23:34:12 +02:00
parent 5e29238a49
commit b4c2621ed7
Notes: sideshowbarker 2024-07-19 11:39:28 +09:00
4 changed files with 24 additions and 0 deletions

View file

@ -10,5 +10,12 @@ public:
virtual void layout() override;
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();
}