mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
layout_thread: perform_post_main_layout_passes is always called with a root flow.
This commit is contained in:
parent
a2403c5cd6
commit
dd27ec1fa2
1 changed files with 17 additions and 16 deletions
|
@ -1596,6 +1596,7 @@ impl LayoutThread {
|
||||||
});
|
});
|
||||||
|
|
||||||
self.perform_post_main_layout_passes(data,
|
self.perform_post_main_layout_passes(data,
|
||||||
|
root_flow,
|
||||||
reflow_goal,
|
reflow_goal,
|
||||||
document,
|
document,
|
||||||
rw_data,
|
rw_data,
|
||||||
|
@ -1604,18 +1605,19 @@ impl LayoutThread {
|
||||||
|
|
||||||
fn perform_post_main_layout_passes(&self,
|
fn perform_post_main_layout_passes(&self,
|
||||||
data: &Reflow,
|
data: &Reflow,
|
||||||
|
mut root_flow: &mut FlowRef,
|
||||||
reflow_goal: &ReflowGoal,
|
reflow_goal: &ReflowGoal,
|
||||||
document: Option<&ServoLayoutDocument>,
|
document: Option<&ServoLayoutDocument>,
|
||||||
rw_data: &mut LayoutThreadData,
|
rw_data: &mut LayoutThreadData,
|
||||||
layout_context: &mut LayoutContext) {
|
layout_context: &mut LayoutContext) {
|
||||||
// Build the display list if necessary, and send it to the painter.
|
// 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,
|
self.compute_abs_pos_and_build_display_list(data,
|
||||||
reflow_goal,
|
reflow_goal,
|
||||||
document,
|
document,
|
||||||
FlowRef::deref_mut(&mut root_flow),
|
FlowRef::deref_mut(&mut root_flow),
|
||||||
&mut *layout_context,
|
&mut *layout_context,
|
||||||
rw_data);
|
rw_data);
|
||||||
|
|
||||||
self.first_reflow.set(false);
|
self.first_reflow.set(false);
|
||||||
|
|
||||||
if opts::get().trace_layout {
|
if opts::get().trace_layout {
|
||||||
|
@ -1628,7 +1630,6 @@ impl LayoutThread {
|
||||||
|
|
||||||
self.generation.set(self.generation.get() + 1);
|
self.generation.set(self.generation.get() + 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn reflow_all_nodes(flow: &mut Flow) {
|
fn reflow_all_nodes(flow: &mut Flow) {
|
||||||
debug!("reflowing all nodes!");
|
debug!("reflowing all nodes!");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue