mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Change the mis-named 'traverse_flow_tree_preorder' to 'reflow'
This commit is contained in:
parent
ee697a926d
commit
832b811198
4 changed files with 11 additions and 9 deletions
|
@ -1551,7 +1551,7 @@ impl BlockFlow {
|
||||||
self.assign_inline_sizes(layout_context);
|
self.assign_inline_sizes(layout_context);
|
||||||
// Re-run layout on our children.
|
// Re-run layout on our children.
|
||||||
for child in flow::mut_base(self).children.iter_mut() {
|
for child in flow::mut_base(self).children.iter_mut() {
|
||||||
sequential::traverse_flow_tree_preorder(child, layout_context, RelayoutMode::Force);
|
sequential::reflow(child, layout_context, RelayoutMode::Force);
|
||||||
}
|
}
|
||||||
// Assign our final-final block size.
|
// Assign our final-final block size.
|
||||||
self.assign_block_size(layout_context);
|
self.assign_block_size(layout_context);
|
||||||
|
|
|
@ -187,7 +187,8 @@ fn top_down_flow<'scope>(unsafe_flows: &[UnsafeFlow],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn traverse_flow_tree_preorder(
|
/// Run the main layout passes in parallel.
|
||||||
|
pub fn reflow(
|
||||||
root: &mut Flow,
|
root: &mut Flow,
|
||||||
profiler_metadata: Option<TimerMetadata>,
|
profiler_metadata: Option<TimerMetadata>,
|
||||||
time_profiler_chan: time::ProfilerChan,
|
time_profiler_chan: time::ProfilerChan,
|
||||||
|
|
|
@ -24,7 +24,8 @@ pub fn resolve_generated_content(root: &mut Flow, layout_context: &LayoutContext
|
||||||
ResolveGeneratedContent::new(&layout_context).traverse(root, 0);
|
ResolveGeneratedContent::new(&layout_context).traverse(root, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn traverse_flow_tree_preorder(root: &mut Flow, layout_context: &LayoutContext, relayout_mode: RelayoutMode) {
|
/// Run the main layout passes sequentially.
|
||||||
|
pub fn reflow(root: &mut Flow, layout_context: &LayoutContext, relayout_mode: RelayoutMode) {
|
||||||
fn doit(flow: &mut Flow,
|
fn doit(flow: &mut Flow,
|
||||||
assign_inline_sizes: AssignISizes,
|
assign_inline_sizes: AssignISizes,
|
||||||
assign_block_sizes: AssignBSizes,
|
assign_block_sizes: AssignBSizes,
|
||||||
|
|
|
@ -929,7 +929,7 @@ impl LayoutThread {
|
||||||
fn solve_constraints(layout_root: &mut Flow,
|
fn solve_constraints(layout_root: &mut Flow,
|
||||||
layout_context: &LayoutContext) {
|
layout_context: &LayoutContext) {
|
||||||
let _scope = layout_debug_scope!("solve_constraints");
|
let _scope = layout_debug_scope!("solve_constraints");
|
||||||
sequential::traverse_flow_tree_preorder(layout_root, layout_context, RelayoutMode::Incremental);
|
sequential::reflow(layout_root, layout_context, RelayoutMode::Incremental);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs layout constraint solving in parallel.
|
/// Performs layout constraint solving in parallel.
|
||||||
|
@ -946,11 +946,11 @@ impl LayoutThread {
|
||||||
|
|
||||||
// NOTE: this currently computes borders, so any pruning should separate that
|
// NOTE: this currently computes borders, so any pruning should separate that
|
||||||
// operation out.
|
// operation out.
|
||||||
parallel::traverse_flow_tree_preorder(layout_root,
|
parallel::reflow(layout_root,
|
||||||
profiler_metadata,
|
profiler_metadata,
|
||||||
time_profiler_chan,
|
time_profiler_chan,
|
||||||
layout_context,
|
layout_context,
|
||||||
traversal);
|
traversal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes the stacking-relative positions of all flows and, if the painting is dirty and the
|
/// Computes the stacking-relative positions of all flows and, if the painting is dirty and the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue