mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 15:12:07 +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:
parent
6202a0ab32
commit
65ad6c35f0
6 changed files with 101 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
#include <LibHTML/DOM/Element.h>
|
||||
#include <LibHTML/Layout/LayoutTable.h>
|
||||
#include <LibHTML/Layout/LayoutTableRow.h>
|
||||
|
||||
LayoutTable::LayoutTable(const Element& element, NonnullRefPtr<StyleProperties> style)
|
||||
: LayoutBlock(&element, move(style))
|
||||
|
@ -12,5 +13,16 @@ LayoutTable::~LayoutTable()
|
|||
|
||||
void LayoutTable::layout()
|
||||
{
|
||||
|
||||
LayoutBlock::layout();
|
||||
}
|
||||
|
||||
LayoutTableRow* LayoutTable::first_row()
|
||||
{
|
||||
return first_child_of_type<LayoutTableRow>();
|
||||
}
|
||||
|
||||
const LayoutTableRow* LayoutTable::first_row() const
|
||||
{
|
||||
return first_child_of_type<LayoutTableRow>();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue