mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +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:
@@ -833,7 +833,7 @@ void Document::update_layout()
|
||||
if (!browsing_context())
|
||||
return;
|
||||
|
||||
auto viewport_rect = browsing_context()->viewport_rect();
|
||||
auto viewport_rect = browsing_context()->viewport_rect().to_type<float>();
|
||||
|
||||
if (!m_layout_root) {
|
||||
m_next_layout_node_serial_id = 0;
|
||||
@@ -1724,7 +1724,7 @@ void Document::run_the_resize_steps()
|
||||
if (!browsing_context())
|
||||
return;
|
||||
|
||||
auto viewport_size = browsing_context()->viewport_rect().size();
|
||||
auto viewport_size = browsing_context()->viewport_rect().size().to_type<float>().to_type<int>();
|
||||
if (m_last_viewport_size == viewport_size)
|
||||
return;
|
||||
m_last_viewport_size = viewport_size;
|
||||
|
||||
Reference in New Issue
Block a user