mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibHTML: Add a convenient way to get from any layout node to the root
This commit is contained in:
parent
2946b0e2d4
commit
715d7a8532
4 changed files with 31 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
class Document;
|
||||
class Element;
|
||||
class LayoutBlock;
|
||||
class LayoutDocument;
|
||||
class LayoutNode;
|
||||
class LayoutNodeWithStyle;
|
||||
class LineBoxFragment;
|
||||
|
@ -29,8 +30,12 @@ public:
|
|||
bool is_anonymous() const { return !m_node; }
|
||||
const Node* node() const { return m_node; }
|
||||
|
||||
Document& document();
|
||||
const Document& document() const;
|
||||
|
||||
const LayoutDocument& root() const;
|
||||
LayoutDocument& root();
|
||||
|
||||
template<typename Callback>
|
||||
inline void for_each_child(Callback callback) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue