mirror of
https://github.com/servo/servo.git
synced 2025-07-25 16:20:36 +01:00
layout: Don't destroy the flow tree when resizing the window
This commit is contained in:
parent
bb6f557276
commit
e9a61c1ccf
1 changed files with 1 additions and 3 deletions
|
@ -580,7 +580,7 @@ impl LayoutTask {
|
||||||
|
|
||||||
let current_screen_size = Size2D(Au::from_frac32_px(viewport_size.width.get()),
|
let current_screen_size = Size2D(Au::from_frac32_px(viewport_size.width.get()),
|
||||||
Au::from_frac32_px(viewport_size.height.get()));
|
Au::from_frac32_px(viewport_size.height.get()));
|
||||||
let old_screen_size = mem::replace(&mut rw_data.screen_size, current_screen_size);
|
rw_data.screen_size = current_screen_size;
|
||||||
|
|
||||||
// Create a layout context for use throughout the following passes.
|
// Create a layout context for use throughout the following passes.
|
||||||
let mut shared_layout_ctx =
|
let mut shared_layout_ctx =
|
||||||
|
@ -591,8 +591,6 @@ impl LayoutTask {
|
||||||
|
|
||||||
// Handle conditions where the entire flow tree is invalid.
|
// Handle conditions where the entire flow tree is invalid.
|
||||||
let mut needs_dirtying = false;
|
let mut needs_dirtying = false;
|
||||||
|
|
||||||
needs_dirtying |= current_screen_size != old_screen_size;
|
|
||||||
needs_dirtying |= rw_data.stylesheet_dirty;
|
needs_dirtying |= rw_data.stylesheet_dirty;
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue