mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibWeb: Convert Paintable coordinates to new pixel units
This fixes a few sizing issues too. The page size is now correct in most cases! \o/ We get to remove some of the `to_type<>()` shenanigans, though it reappears in some other places.
This commit is contained in:
parent
57a69f15ff
commit
ab49dbf137
39 changed files with 200 additions and 179 deletions
|
@ -152,9 +152,9 @@ void PageHost::page_did_layout()
|
|||
auto* layout_root = this->layout_root();
|
||||
VERIFY(layout_root);
|
||||
if (layout_root->paint_box()->has_overflow())
|
||||
m_content_size = page().enclosing_device_rect(layout_root->paint_box()->scrollable_overflow_rect().value().to_type<Web::CSSPixels>()).size();
|
||||
m_content_size = page().enclosing_device_rect(layout_root->paint_box()->scrollable_overflow_rect().value()).size();
|
||||
else
|
||||
m_content_size = page().enclosing_device_rect(layout_root->paint_box()->absolute_rect().to_type<Web::CSSPixels>()).size();
|
||||
m_content_size = page().enclosing_device_rect(layout_root->paint_box()->absolute_rect()).size();
|
||||
m_client.async_did_layout(m_content_size.to_type<int>());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue