fixup! Checks moved to Element::client_rect(), fixed conditions for the special cases, reconfigured Window constructor to initialize current_viewport to initial window size

This commit is contained in:
switchpiggy 2023-05-05 02:32:29 -07:00
parent 7c61c5b930
commit 34762d97ad
2 changed files with 14 additions and 27 deletions

View file

@ -2609,13 +2609,7 @@ impl Window {
layout_chan,
layout_rpc,
window_size: Cell::new(window_size),
current_viewport: Cell::new(Rect::new(
Point2D::zero(),
Size2D::new(
Au::from_f32_px(window_size.initial_viewport.width.into()),
Au::from_f32_px(window_size.initial_viewport.width.into()),
),
)),
current_viewport: Cell::new(Rect::zero()),
suppress_reflow: Cell::new(true),
pending_reflow_count: Default::default(),
current_state: Cell::new(WindowState::Alive),