mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
frame-resize refactor
This commit is contained in:
parent
04a3242dc5
commit
bca565a1a3
6 changed files with 54 additions and 44 deletions
|
@ -934,6 +934,17 @@ impl LayoutThread {
|
|||
let origin = Rect::new(Point2D::new(Au(0), Au(0)), root_size);
|
||||
build_state.root_stacking_context.bounds = origin;
|
||||
build_state.root_stacking_context.overflow = origin;
|
||||
|
||||
if !build_state.iframe_sizes.is_empty() {
|
||||
// build_state.iframe_sizes is only used here, so its okay to replace
|
||||
// it with an empty vector
|
||||
let iframe_sizes = std::mem::replace(&mut build_state.iframe_sizes, vec![]);
|
||||
let msg = ConstellationMsg::FrameSizes(iframe_sizes);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!("Layout resize to constellation failed ({}).", e);
|
||||
}
|
||||
}
|
||||
|
||||
rw_data.display_list = Some(Arc::new(build_state.to_display_list()));
|
||||
}
|
||||
(ReflowGoal::ForScriptQuery, false) => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue