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

@ -606,7 +606,7 @@ Messages::WebDriverClient::SetWindowRectResponse WebDriverConnection::set_window
auto size = m_page_client.page_did_request_resize_window({ *width, *height });
window_rect.set_size(size);
} else {
window_rect.set_size(m_page_client.page().window_size());
window_rect.set_size(m_page_client.page().window_size().to_type<int>());
}
// 12. If x and y are not null:
@ -615,7 +615,7 @@ Messages::WebDriverClient::SetWindowRectResponse WebDriverConnection::set_window
auto position = m_page_client.page_did_request_reposition_window({ *x, *y });
window_rect.set_location(position);
} else {
window_rect.set_location(m_page_client.page().window_position());
window_rect.set_location(m_page_client.page().window_position().to_type<int>());
}
// 14. Return success with data set to the WindowRect object for the current top-level browsing context.