1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

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. :^)
This commit is contained in:
Andreas Kling 2019-10-18 09:36:46 +02:00
parent 6202a0ab32
commit 65ad6c35f0
6 changed files with 101 additions and 0 deletions

View file

@ -2,6 +2,8 @@
#include <LibHTML/Layout/LayoutBox.h>
class LayoutTableCell;
class LayoutTableRow final : public LayoutBox {
public:
LayoutTableRow(const Element&, NonnullRefPtr<StyleProperties>);
@ -9,6 +11,12 @@ public:
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"; }