mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-06 03:02:55 +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:
parent
aefc7f9b22
commit
3309bdf722
Notes:
sideshowbarker
2024-07-19 11:42:04 +09:00
Author: https://github.com/awesomekling
Commit: 3309bdf722
7 changed files with 26 additions and 22 deletions
|
@ -76,14 +76,14 @@ void HtmlView::layout_and_sync_size()
|
|||
|
||||
main_frame().set_size(available_size());
|
||||
document()->layout();
|
||||
set_content_size(layout_root()->rect().size());
|
||||
set_content_size(layout_root()->size());
|
||||
|
||||
// NOTE: If layout caused us to gain or lose scrollbars, we have to lay out again
|
||||
// since the scrollbars now take up some of the available space.
|
||||
if (had_vertical_scrollbar != vertical_scrollbar().is_visible() || had_horizontal_scrollbar != horizontal_scrollbar().is_visible()) {
|
||||
main_frame().set_size(available_size());
|
||||
document()->layout();
|
||||
set_content_size(layout_root()->rect().size());
|
||||
set_content_size(layout_root()->size());
|
||||
}
|
||||
|
||||
#ifdef HTML_DEBUG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue