mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibHTML: Add a LayoutStyle object (computed style for a LayoutNode.)
This commit is contained in:
parent
fec098b5cd
commit
e3d3e431dc
4 changed files with 59 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <AK/Retained.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibHTML/Layout/LayoutStyle.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
|
||||
class Node;
|
||||
|
@ -17,6 +18,9 @@ public:
|
|||
const Rect& rect() const { return m_rect; }
|
||||
void set_rect(const Rect& rect) { m_rect = rect; }
|
||||
|
||||
LayoutStyle& style() { return m_style; }
|
||||
const LayoutStyle& style() const { return m_style; }
|
||||
|
||||
bool is_anonymous() const { return !m_node; }
|
||||
const Node* node() const { return m_node; }
|
||||
|
||||
|
@ -55,5 +59,6 @@ private:
|
|||
LayoutNode* m_last_child { nullptr };
|
||||
LayoutNode* m_next_sibling { nullptr };
|
||||
LayoutNode* m_previous_sibling { nullptr };
|
||||
LayoutStyle m_style;
|
||||
Rect m_rect;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue