diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-06-16 11:28:47 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-16 12:26:24 +0200 |
commit | fec098b5cd1182d647dd204508977c1147a86d45 (patch) | |
tree | 78e3d5a2ed0b1438648e95da759cabedc46f162c /LibHTML/Layout | |
parent | c52d553249b6182e8eb76ccbb7bede3db4b5fa22 (diff) | |
download | serenity-fec098b5cd1182d647dd204508977c1147a86d45.zip |
LibHTML: Give LayoutNodes a rect.
Also improve the layout tree dump format somewhat.
Diffstat (limited to 'LibHTML/Layout')
-rw-r--r-- | LibHTML/Layout/LayoutNode.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/LibHTML/Layout/LayoutNode.h b/LibHTML/Layout/LayoutNode.h index cc83db6fd9..0e47154992 100644 --- a/LibHTML/Layout/LayoutNode.h +++ b/LibHTML/Layout/LayoutNode.h @@ -2,6 +2,7 @@ #include <AK/Retained.h> #include <AK/Vector.h> +#include <SharedGraphics/Rect.h> class Node; @@ -13,6 +14,10 @@ public: void release(); int retain_count() const { return m_retain_count; } + const Rect& rect() const { return m_rect; } + void set_rect(const Rect& rect) { m_rect = rect; } + + bool is_anonymous() const { return !m_node; } const Node* node() const { return m_node; } LayoutNode* next_sibling() { return m_next_sibling; } @@ -50,5 +55,5 @@ private: LayoutNode* m_last_child { nullptr }; LayoutNode* m_next_sibling { nullptr }; LayoutNode* m_previous_sibling { nullptr }; + Rect m_rect; }; - |