mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-23 03:22:54 +00:00
LibWeb: Rename Layout::Box::size() to content_size()
This property represents the CSS content size, so let's reduce ambiguity by using the spec terminology. We also bring a bunch of related functions along for the ride.
This commit is contained in:
parent
dbe5af3c6f
commit
0608de8c12
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/awesomekling
Commit: 0608de8c12
17 changed files with 140 additions and 140 deletions
|
@ -61,7 +61,7 @@ void InProcessWebView::set_preferred_color_scheme(CSS::PreferredColorScheme colo
|
|||
void InProcessWebView::page_did_layout()
|
||||
{
|
||||
VERIFY(layout_root());
|
||||
set_content_size(layout_root()->size().to_type<int>());
|
||||
set_content_size(layout_root()->content_size().to_type<int>());
|
||||
}
|
||||
|
||||
void InProcessWebView::page_did_change_title(const String& title)
|
||||
|
@ -177,13 +177,13 @@ void InProcessWebView::layout_and_sync_size()
|
|||
bool had_horizontal_scrollbar = horizontal_scrollbar().is_visible();
|
||||
|
||||
page().top_level_browsing_context().set_size(available_size());
|
||||
set_content_size(layout_root()->size().to_type<int>());
|
||||
set_content_size(layout_root()->content_size().to_type<int>());
|
||||
|
||||
// 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()) {
|
||||
page().top_level_browsing_context().set_size(available_size());
|
||||
set_content_size(layout_root()->size().to_type<int>());
|
||||
set_content_size(layout_root()->content_size().to_type<int>());
|
||||
}
|
||||
|
||||
page().top_level_browsing_context().set_viewport_scroll_offset({ horizontal_scrollbar().value(), vertical_scrollbar().value() });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue