diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-10-01 21:24:23 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-10-01 21:24:23 +0200 |
commit | dd27ec1fa2557f4172972e60a995903fa7ffa215 (patch) | |
tree | 6cd99bf5c055263060a409dc04af1f904bb69ff9 /components/layout_thread/lib.rs | |
parent | a2403c5cd63d689283bc35ff9c11329a7b522caf (diff) | |
download | servo-dd27ec1fa2557f4172972e60a995903fa7ffa215.tar.gz servo-dd27ec1fa2557f4172972e60a995903fa7ffa215.zip |
layout_thread: perform_post_main_layout_passes is always called with a root flow.
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 76146989fc1..0b9eb75b8f4 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -1596,6 +1596,7 @@ impl LayoutThread { }); self.perform_post_main_layout_passes(data, + root_flow, reflow_goal, document, rw_data, @@ -1604,30 +1605,30 @@ impl LayoutThread { fn perform_post_main_layout_passes(&self, data: &Reflow, + mut root_flow: &mut FlowRef, reflow_goal: &ReflowGoal, document: Option<&ServoLayoutDocument>, rw_data: &mut LayoutThreadData, layout_context: &mut LayoutContext) { // Build the display list if necessary, and send it to the painter. - if let Some(mut root_flow) = self.root_flow.borrow().clone() { - self.compute_abs_pos_and_build_display_list(data, - reflow_goal, - document, - FlowRef::deref_mut(&mut root_flow), - &mut *layout_context, - rw_data); - self.first_reflow.set(false); - - if opts::get().trace_layout { - layout_debug::end_trace(self.generation.get()); - } + self.compute_abs_pos_and_build_display_list(data, + reflow_goal, + document, + FlowRef::deref_mut(&mut root_flow), + &mut *layout_context, + rw_data); - if opts::get().dump_flow_tree { - root_flow.print("Post layout flow tree".to_owned()); - } + self.first_reflow.set(false); - self.generation.set(self.generation.get() + 1); + if opts::get().trace_layout { + layout_debug::end_trace(self.generation.get()); } + + if opts::get().dump_flow_tree { + root_flow.print("Post layout flow tree".to_owned()); + } + + self.generation.set(self.generation.get() + 1); } fn reflow_all_nodes(flow: &mut Flow) { |