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

LibHTML: Add some convenient geometry getters on LayoutNode

Add x(), y(), size() and position() and use them around the codebase.
This commit is contained in:
Andreas Kling 2019-10-13 17:31:58 +02:00
parent aefc7f9b22
commit 3309bdf722
7 changed files with 26 additions and 22 deletions

View file

@ -21,6 +21,6 @@ void LayoutListItem::layout()
append_child(*m_marker);
}
Rect marker_rect { rect().x() - 8, rect().y(), 4, rect().height() };
Rect marker_rect { x() - 8, y(), 4, height() };
m_marker->set_rect(marker_rect);
}