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

LibWeb+WebContent: Convert BrowsingContext to new pixel units

This fixes a few glitches. We no longer give the page double the width
it should have, and we mark the correct area of the page as needing
repainting.
This commit is contained in:
Sam Atkins 2022-11-03 12:49:54 +00:00 committed by Linus Groh
parent 8fb7c32ec3
commit affc8a22ca
23 changed files with 68 additions and 70 deletions

View file

@ -112,7 +112,7 @@ void ConnectionFromClient::load_html(DeprecatedString const& html, const URL& ur
void ConnectionFromClient::set_viewport_rect(Gfx::IntRect const& rect)
{
dbgln_if(SPAM_DEBUG, "handle: WebContentServer::SetViewportRect: rect={}", rect);
m_page_host->set_viewport_rect(rect);
m_page_host->set_viewport_rect(rect.to_type<Web::DevicePixels>());
}
void ConnectionFromClient::add_backing_store(i32 backing_store_id, Gfx::ShareableBitmap const& bitmap)
@ -532,12 +532,12 @@ void ConnectionFromClient::set_is_scripting_enabled(bool is_scripting_enabled)
void ConnectionFromClient::set_window_position(Gfx::IntPoint position)
{
m_page_host->set_window_position(position);
m_page_host->set_window_position(position.to_type<Web::DevicePixels>());
}
void ConnectionFromClient::set_window_size(Gfx::IntSize size)
{
m_page_host->set_window_size(size);
m_page_host->set_window_size(size.to_type<Web::DevicePixels>());
}
Messages::WebContentServer::GetLocalStorageEntriesResponse ConnectionFromClient::get_local_storage_entries()