Revert "Revert "frame-resize refactor""

This reverts commit 6ead3952a3.
This commit is contained in:
Emilio Cobos Álvarez 2017-01-24 22:20:39 +01:00
parent 185759f87a
commit 4639940dfe
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 54 additions and 44 deletions

View file

@ -933,6 +933,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) => {}