mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 19:16:02 +00:00
WebContent: Store and provide access to web page content size
This commit is contained in:
parent
2ba2e6ca0a
commit
2f5ceeac62
Notes:
sideshowbarker
2024-07-17 22:41:14 +09:00
Author: https://github.com/trflynn89
Commit: 2f5ceeac62
Pull-request: https://github.com/SerenityOS/serenity/pull/15939
Reviewed-by: https://github.com/linusg
2 changed files with 6 additions and 4 deletions
|
@ -141,12 +141,11 @@ void PageHost::page_did_layout()
|
|||
{
|
||||
auto* layout_root = this->layout_root();
|
||||
VERIFY(layout_root);
|
||||
Gfx::IntSize content_size;
|
||||
if (layout_root->paint_box()->has_overflow())
|
||||
content_size = enclosing_int_rect(layout_root->paint_box()->scrollable_overflow_rect().value()).size();
|
||||
m_content_size = enclosing_int_rect(layout_root->paint_box()->scrollable_overflow_rect().value()).size();
|
||||
else
|
||||
content_size = enclosing_int_rect(layout_root->paint_box()->absolute_rect()).size();
|
||||
m_client.async_did_layout(content_size);
|
||||
m_content_size = enclosing_int_rect(layout_root->paint_box()->absolute_rect()).size();
|
||||
m_client.async_did_layout(m_content_size);
|
||||
}
|
||||
|
||||
void PageHost::page_did_change_title(String const& title)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue