mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Rename imm_child_iter() and child_iter(). Fixes #10286
This commit is contained in:
parent
84a3dee67e
commit
d4dcaf3167
11 changed files with 40 additions and 40 deletions
|
@ -712,7 +712,7 @@ impl BlockFlow {
|
||||||
|
|
||||||
// Shift all kids down (or up, if margins are negative) if necessary.
|
// Shift all kids down (or up, if margins are negative) if necessary.
|
||||||
if block_start_margin_value != Au(0) {
|
if block_start_margin_value != Au(0) {
|
||||||
for kid in self.base.child_iter() {
|
for kid in self.base.child_iter_mut() {
|
||||||
let kid_base = flow::mut_base(kid);
|
let kid_base = flow::mut_base(kid);
|
||||||
kid_base.position.start.b = kid_base.position.start.b + block_start_margin_value
|
kid_base.position.start.b = kid_base.position.start.b + block_start_margin_value
|
||||||
}
|
}
|
||||||
|
@ -809,7 +809,7 @@ impl BlockFlow {
|
||||||
// At this point, `cur_b` is at the content edge of our box. Now iterate over children.
|
// At this point, `cur_b` is at the content edge of our box. Now iterate over children.
|
||||||
let mut floats = self.base.floats.clone();
|
let mut floats = self.base.floats.clone();
|
||||||
let thread_id = self.base.thread_id;
|
let thread_id = self.base.thread_id;
|
||||||
for (child_index, kid) in self.base.child_iter().enumerate() {
|
for (child_index, kid) in self.base.child_iter_mut().enumerate() {
|
||||||
if flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) {
|
if flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) {
|
||||||
// Assume that the *hypothetical box* for an absolute flow starts immediately
|
// Assume that the *hypothetical box* for an absolute flow starts immediately
|
||||||
// after the block-end border edge of the previous flow.
|
// after the block-end border edge of the previous flow.
|
||||||
|
@ -967,7 +967,7 @@ impl BlockFlow {
|
||||||
|
|
||||||
// Write in the size of the relative containing block for children. (This information
|
// Write in the size of the relative containing block for children. (This information
|
||||||
// is also needed to handle RTL.)
|
// is also needed to handle RTL.)
|
||||||
for kid in self.base.child_iter() {
|
for kid in self.base.child_iter_mut() {
|
||||||
flow::mut_base(kid).early_absolute_position_info = EarlyAbsolutePositionInfo {
|
flow::mut_base(kid).early_absolute_position_info = EarlyAbsolutePositionInfo {
|
||||||
relative_containing_block_size: self.fragment.content_box().size,
|
relative_containing_block_size: self.fragment.content_box().size,
|
||||||
relative_containing_block_mode: self.fragment.style().writing_mode,
|
relative_containing_block_mode: self.fragment.style().writing_mode,
|
||||||
|
@ -1017,7 +1017,7 @@ impl BlockFlow {
|
||||||
// We don't need to reflow, but we still need to perform in-order traversals if
|
// We don't need to reflow, but we still need to perform in-order traversals if
|
||||||
// necessary.
|
// necessary.
|
||||||
let thread_id = self.base.thread_id;
|
let thread_id = self.base.thread_id;
|
||||||
for kid in self.base.child_iter() {
|
for kid in self.base.child_iter_mut() {
|
||||||
kid.assign_block_size_for_inorder_child_if_necessary(layout_context, thread_id);
|
kid.assign_block_size_for_inorder_child_if_necessary(layout_context, thread_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1330,7 +1330,7 @@ impl BlockFlow {
|
||||||
let mut inline_start_margin_edge = inline_start_content_edge;
|
let mut inline_start_margin_edge = inline_start_content_edge;
|
||||||
let mut inline_end_margin_edge = inline_end_content_edge;
|
let mut inline_end_margin_edge = inline_end_content_edge;
|
||||||
|
|
||||||
let mut iterator = self.base.child_iter().enumerate().peekable();
|
let mut iterator = self.base.child_iter_mut().enumerate().peekable();
|
||||||
while let Some((i, kid)) = iterator.next() {
|
while let Some((i, kid)) = iterator.next() {
|
||||||
flow::mut_base(kid).block_container_explicit_block_size = explicit_content_size;
|
flow::mut_base(kid).block_container_explicit_block_size = explicit_content_size;
|
||||||
|
|
||||||
|
@ -1468,7 +1468,7 @@ impl BlockFlow {
|
||||||
let mut computation = self.fragment.compute_intrinsic_inline_sizes();
|
let mut computation = self.fragment.compute_intrinsic_inline_sizes();
|
||||||
let (mut left_float_width, mut right_float_width) = (Au(0), Au(0));
|
let (mut left_float_width, mut right_float_width) = (Au(0), Au(0));
|
||||||
let (mut left_float_width_accumulator, mut right_float_width_accumulator) = (Au(0), Au(0));
|
let (mut left_float_width_accumulator, mut right_float_width_accumulator) = (Au(0), Au(0));
|
||||||
for kid in self.base.child_iter() {
|
for kid in self.base.child_iter_mut() {
|
||||||
let is_absolutely_positioned =
|
let is_absolutely_positioned =
|
||||||
flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED);
|
flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED);
|
||||||
let child_base = flow::mut_base(kid);
|
let child_base = flow::mut_base(kid);
|
||||||
|
@ -1929,7 +1929,7 @@ impl Flow for BlockFlow {
|
||||||
self.base.flags.contains(IS_ABSOLUTELY_POSITIONED));
|
self.base.flags.contains(IS_ABSOLUTELY_POSITIONED));
|
||||||
|
|
||||||
// Process children.
|
// Process children.
|
||||||
for kid in self.base.child_iter() {
|
for kid in self.base.child_iter_mut() {
|
||||||
// If this layer preserves the 3d context of children,
|
// If this layer preserves the 3d context of children,
|
||||||
// then children will need a render layer.
|
// then children will need a render layer.
|
||||||
// TODO(gw): This isn't always correct. In some cases
|
// TODO(gw): This isn't always correct. In some cases
|
||||||
|
|
|
@ -100,7 +100,7 @@ impl FlexFlow {
|
||||||
|
|
||||||
let mut computation = self.block_flow.fragment.compute_intrinsic_inline_sizes();
|
let mut computation = self.block_flow.fragment.compute_intrinsic_inline_sizes();
|
||||||
if !fixed_width {
|
if !fixed_width {
|
||||||
for kid in self.block_flow.base.child_iter() {
|
for kid in self.block_flow.base.child_iter_mut() {
|
||||||
let is_absolutely_positioned =
|
let is_absolutely_positioned =
|
||||||
flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED);
|
flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED);
|
||||||
if !is_absolutely_positioned {
|
if !is_absolutely_positioned {
|
||||||
|
@ -122,7 +122,7 @@ impl FlexFlow {
|
||||||
|
|
||||||
let mut computation = self.block_flow.fragment.compute_intrinsic_inline_sizes();
|
let mut computation = self.block_flow.fragment.compute_intrinsic_inline_sizes();
|
||||||
if !fixed_width {
|
if !fixed_width {
|
||||||
for kid in self.block_flow.base.child_iter() {
|
for kid in self.block_flow.base.child_iter_mut() {
|
||||||
let is_absolutely_positioned =
|
let is_absolutely_positioned =
|
||||||
flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED);
|
flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED);
|
||||||
let child_base = flow::mut_base(kid);
|
let child_base = flow::mut_base(kid);
|
||||||
|
@ -168,7 +168,7 @@ impl FlexFlow {
|
||||||
// FIXME (mbrubeck): Get correct mode for absolute containing block
|
// FIXME (mbrubeck): Get correct mode for absolute containing block
|
||||||
let containing_block_mode = self.block_flow.base.writing_mode;
|
let containing_block_mode = self.block_flow.base.writing_mode;
|
||||||
|
|
||||||
let mut iterator = self.block_flow.base.child_iter().enumerate().peekable();
|
let mut iterator = self.block_flow.base.child_iter_mut().enumerate().peekable();
|
||||||
while let Some((_, kid)) = iterator.next() {
|
while let Some((_, kid)) = iterator.next() {
|
||||||
{
|
{
|
||||||
let kid_base = flow::mut_base(kid);
|
let kid_base = flow::mut_base(kid);
|
||||||
|
@ -222,7 +222,7 @@ impl FlexFlow {
|
||||||
|
|
||||||
let block_container_explicit_block_size = self.block_flow.base.block_container_explicit_block_size;
|
let block_container_explicit_block_size = self.block_flow.base.block_container_explicit_block_size;
|
||||||
let mut inline_child_start = inline_start_content_edge;
|
let mut inline_child_start = inline_start_content_edge;
|
||||||
for kid in self.block_flow.base.child_iter() {
|
for kid in self.block_flow.base.child_iter_mut() {
|
||||||
let kid_base = flow::mut_base(kid);
|
let kid_base = flow::mut_base(kid);
|
||||||
|
|
||||||
kid_base.block_container_inline_size = even_content_inline_size;
|
kid_base.block_container_inline_size = even_content_inline_size;
|
||||||
|
@ -246,7 +246,7 @@ impl FlexFlow {
|
||||||
|
|
||||||
let mut max_block_size = Au(0);
|
let mut max_block_size = Au(0);
|
||||||
let thread_id = self.block_flow.base.thread_id;
|
let thread_id = self.block_flow.base.thread_id;
|
||||||
for kid in self.block_flow.base.child_iter() {
|
for kid in self.block_flow.base.child_iter_mut() {
|
||||||
kid.assign_block_size_for_inorder_child_if_necessary(layout_context, thread_id);
|
kid.assign_block_size_for_inorder_child_if_necessary(layout_context, thread_id);
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -284,7 +284,7 @@ impl FlexFlow {
|
||||||
self.block_flow.base.position.size.block = block_size;
|
self.block_flow.base.position.size.block = block_size;
|
||||||
|
|
||||||
// Assign the block-size of kid fragments, which is the same value as own block-size.
|
// Assign the block-size of kid fragments, which is the same value as own block-size.
|
||||||
for kid in self.block_flow.base.child_iter() {
|
for kid in self.block_flow.base.child_iter_mut() {
|
||||||
{
|
{
|
||||||
let kid_fragment = &mut kid.as_mut_block().fragment;
|
let kid_fragment = &mut kid.as_mut_block().fragment;
|
||||||
let mut position = kid_fragment.border_box;
|
let mut position = kid_fragment.border_box;
|
||||||
|
|
|
@ -431,7 +431,7 @@ pub fn base<T: ?Sized + Flow>(this: &T) -> &BaseFlow {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Iterates over the children of this immutable flow.
|
/// Iterates over the children of this immutable flow.
|
||||||
pub fn imm_child_iter<'a>(flow: &'a Flow) -> FlowListIterator<'a> {
|
pub fn child_iter<'a>(flow: &'a Flow) -> FlowListIterator<'a> {
|
||||||
base(flow).children.iter()
|
base(flow).children.iter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,7 +445,7 @@ pub fn mut_base<T: ?Sized + Flow>(this: &mut T) -> &mut BaseFlow {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Iterates over the children of this flow.
|
/// Iterates over the children of this flow.
|
||||||
pub fn child_iter<'a>(flow: &'a mut Flow) -> MutFlowListIterator<'a> {
|
pub fn child_iter_mut<'a>(flow: &'a mut Flow) -> MutFlowListIterator<'a> {
|
||||||
mut_base(flow).children.iter_mut()
|
mut_base(flow).children.iter_mut()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1148,7 +1148,7 @@ impl BaseFlow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn child_iter(&mut self) -> MutFlowListIterator {
|
pub fn child_iter_mut(&mut self) -> MutFlowListIterator {
|
||||||
self.children.iter_mut()
|
self.children.iter_mut()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1379,7 +1379,7 @@ impl<'a> ImmutableFlowUtils for &'a Flow {
|
||||||
fn print_with_tree(self, print_tree: &mut PrintTree) {
|
fn print_with_tree(self, print_tree: &mut PrintTree) {
|
||||||
print_tree.new_level(format!("{:?}", self));
|
print_tree.new_level(format!("{:?}", self));
|
||||||
self.print_extra_flow_children(print_tree);
|
self.print_extra_flow_children(print_tree);
|
||||||
for kid in imm_child_iter(self) {
|
for kid in child_iter(self) {
|
||||||
kid.print_with_tree(print_tree);
|
kid.print_with_tree(print_tree);
|
||||||
}
|
}
|
||||||
print_tree.end_level();
|
print_tree.end_level();
|
||||||
|
@ -1406,14 +1406,14 @@ impl<'a> MutableFlowUtils for &'a mut Flow {
|
||||||
traversal.process(self);
|
traversal.process(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
for kid in child_iter(self) {
|
for kid in child_iter_mut(self) {
|
||||||
kid.traverse_preorder(traversal);
|
kid.traverse_preorder(traversal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Traverses the tree in postorder.
|
/// Traverses the tree in postorder.
|
||||||
fn traverse_postorder<T: PostorderFlowTraversal>(self, traversal: &T) {
|
fn traverse_postorder<T: PostorderFlowTraversal>(self, traversal: &T) {
|
||||||
for kid in child_iter(self) {
|
for kid in child_iter_mut(self) {
|
||||||
kid.traverse_postorder(traversal);
|
kid.traverse_postorder(traversal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1296,7 +1296,7 @@ impl Flow for InlineFlow {
|
||||||
let _scope = layout_debug_scope!("inline::bubble_inline_sizes {:x}", self.base.debug_id());
|
let _scope = layout_debug_scope!("inline::bubble_inline_sizes {:x}", self.base.debug_id());
|
||||||
|
|
||||||
let writing_mode = self.base.writing_mode;
|
let writing_mode = self.base.writing_mode;
|
||||||
for kid in self.base.child_iter() {
|
for kid in self.base.child_iter_mut() {
|
||||||
flow::mut_base(kid).floats = Floats::new(writing_mode);
|
flow::mut_base(kid).floats = Floats::new(writing_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1398,7 +1398,7 @@ impl Flow for InlineFlow {
|
||||||
// If there are any inline-block kids, propagate explicit block and inline
|
// If there are any inline-block kids, propagate explicit block and inline
|
||||||
// sizes down to them.
|
// sizes down to them.
|
||||||
let block_container_explicit_block_size = self.base.block_container_explicit_block_size;
|
let block_container_explicit_block_size = self.base.block_container_explicit_block_size;
|
||||||
for kid in self.base.child_iter() {
|
for kid in self.base.child_iter_mut() {
|
||||||
let kid_base = flow::mut_base(kid);
|
let kid_base = flow::mut_base(kid);
|
||||||
|
|
||||||
kid_base.block_container_inline_size = inline_size;
|
kid_base.block_container_inline_size = inline_size;
|
||||||
|
@ -1568,7 +1568,7 @@ impl Flow for InlineFlow {
|
||||||
|
|
||||||
// Assign block sizes for any inline-block descendants.
|
// Assign block sizes for any inline-block descendants.
|
||||||
let thread_id = self.base.thread_id;
|
let thread_id = self.base.thread_id;
|
||||||
for kid in self.base.child_iter() {
|
for kid in self.base.child_iter_mut() {
|
||||||
if flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) ||
|
if flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) ||
|
||||||
flow::base(kid).flags.is_float() {
|
flow::base(kid).flags.is_float() {
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -1425,7 +1425,7 @@ impl LayoutThread {
|
||||||
debug!("reflowing all nodes!");
|
debug!("reflowing all nodes!");
|
||||||
flow::mut_base(flow).restyle_damage.insert(REFLOW | REPAINT);
|
flow::mut_base(flow).restyle_damage.insert(REFLOW | REPAINT);
|
||||||
|
|
||||||
for child in flow::child_iter(flow) {
|
for child in flow::child_iter_mut(flow) {
|
||||||
LayoutThread::reflow_all_nodes(child);
|
LayoutThread::reflow_all_nodes(child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ trait ParallelPreorderFlowTraversal : PreorderFlowTraversal {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Possibly enqueue the children.
|
// Possibly enqueue the children.
|
||||||
for kid in flow::child_iter(flow) {
|
for kid in flow::child_iter_mut(flow) {
|
||||||
had_children = true;
|
had_children = true;
|
||||||
discovered_child_flows.push(borrowed_flow_to_unsafe_flow(kid));
|
discovered_child_flows.push(borrowed_flow_to_unsafe_flow(kid));
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ pub fn traverse_flow_tree_preorder(root: &mut FlowRef,
|
||||||
assign_inline_sizes.process(flow);
|
assign_inline_sizes.process(flow);
|
||||||
}
|
}
|
||||||
|
|
||||||
for kid in flow::child_iter(flow) {
|
for kid in flow::child_iter_mut(flow) {
|
||||||
doit(kid, assign_inline_sizes, assign_block_sizes);
|
doit(kid, assign_inline_sizes, assign_block_sizes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ pub fn iterate_through_flow_tree_fragment_border_boxes(root: &mut FlowRef,
|
||||||
stacking_context_position: &Point2D<Au>) {
|
stacking_context_position: &Point2D<Au>) {
|
||||||
flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position);
|
flow.iterate_through_fragment_border_boxes(iterator, level, stacking_context_position);
|
||||||
|
|
||||||
for kid in flow::mut_base(flow).child_iter() {
|
for kid in flow::mut_base(flow).child_iter_mut() {
|
||||||
let stacking_context_position =
|
let stacking_context_position =
|
||||||
if kid.is_block_flow() && kid.as_block().fragment.establishes_stacking_context() {
|
if kid.is_block_flow() && kid.as_block().fragment.establishes_stacking_context() {
|
||||||
let margin = Point2D::new(kid.as_block().fragment.margin.inline_start, Au(0));
|
let margin = Point2D::new(kid.as_block().fragment.margin.inline_start, Au(0));
|
||||||
|
@ -125,7 +125,7 @@ pub fn store_overflow(layout_context: &LayoutContext, flow: &mut Flow) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
for mut kid in flow::mut_base(flow).child_iter() {
|
for mut kid in flow::mut_base(flow).child_iter_mut() {
|
||||||
store_overflow(layout_context, kid);
|
store_overflow(layout_context, kid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ pub fn guess_float_placement(flow: &mut Flow) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut floats_in = SpeculatedFloatPlacement::compute_floats_in_for_first_child(flow);
|
let mut floats_in = SpeculatedFloatPlacement::compute_floats_in_for_first_child(flow);
|
||||||
for kid in flow::mut_base(flow).child_iter() {
|
for kid in flow::mut_base(flow).child_iter_mut() {
|
||||||
floats_in.compute_floats_in(kid);
|
floats_in.compute_floats_in(kid);
|
||||||
flow::mut_base(kid).speculated_float_placement_in = floats_in;
|
flow::mut_base(kid).speculated_float_placement_in = floats_in;
|
||||||
guess_float_placement(kid);
|
guess_float_placement(kid);
|
||||||
|
|
|
@ -230,7 +230,7 @@ impl Flow for TableFlow {
|
||||||
// part of the table, which we don't want to do—it belongs to the table wrapper instead.
|
// part of the table, which we don't want to do—it belongs to the table wrapper instead.
|
||||||
|
|
||||||
// Get column inline sizes from colgroups
|
// Get column inline sizes from colgroups
|
||||||
for kid in self.block_flow.base.child_iter().filter(|kid| kid.is_table_colgroup()) {
|
for kid in self.block_flow.base.child_iter_mut().filter(|kid| kid.is_table_colgroup()) {
|
||||||
for specified_inline_size in &kid.as_mut_table_colgroup().inline_sizes {
|
for specified_inline_size in &kid.as_mut_table_colgroup().inline_sizes {
|
||||||
self.column_intrinsic_inline_sizes.push(ColumnIntrinsicInlineSize {
|
self.column_intrinsic_inline_sizes.push(ColumnIntrinsicInlineSize {
|
||||||
minimum_length: match *specified_inline_size {
|
minimum_length: match *specified_inline_size {
|
||||||
|
@ -704,7 +704,7 @@ impl TableLikeFlow for BlockFlow {
|
||||||
|
|
||||||
// At this point, `current_block_offset` is at the content edge of our box. Now iterate
|
// At this point, `current_block_offset` is at the content edge of our box. Now iterate
|
||||||
// over children.
|
// over children.
|
||||||
for kid in self.base.child_iter() {
|
for kid in self.base.child_iter_mut() {
|
||||||
// Account for spacing or collapsed borders.
|
// Account for spacing or collapsed borders.
|
||||||
if kid.is_table_row() {
|
if kid.is_table_row() {
|
||||||
has_rows = true;
|
has_rows = true;
|
||||||
|
@ -762,7 +762,7 @@ impl TableLikeFlow for BlockFlow {
|
||||||
|
|
||||||
// Write in the size of the relative containing block for children. (This information
|
// Write in the size of the relative containing block for children. (This information
|
||||||
// is also needed to handle RTL.)
|
// is also needed to handle RTL.)
|
||||||
for kid in self.base.child_iter() {
|
for kid in self.base.child_iter_mut() {
|
||||||
flow::mut_base(kid).early_absolute_position_info = EarlyAbsolutePositionInfo {
|
flow::mut_base(kid).early_absolute_position_info = EarlyAbsolutePositionInfo {
|
||||||
relative_containing_block_size: self.fragment.content_box().size,
|
relative_containing_block_size: self.fragment.content_box().size,
|
||||||
relative_containing_block_mode: self.fragment.style().writing_mode,
|
relative_containing_block_mode: self.fragment.style().writing_mode,
|
||||||
|
@ -801,7 +801,7 @@ struct TableRowIterator<'a> {
|
||||||
impl<'a> TableRowIterator<'a> {
|
impl<'a> TableRowIterator<'a> {
|
||||||
fn new(base: &'a mut BaseFlow) -> Self {
|
fn new(base: &'a mut BaseFlow) -> Self {
|
||||||
TableRowIterator {
|
TableRowIterator {
|
||||||
kids: base.child_iter(),
|
kids: base.child_iter_mut(),
|
||||||
grandkids: None,
|
grandkids: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -822,7 +822,7 @@ impl<'a> Iterator for TableRowIterator<'a> {
|
||||||
match self.kids.next() {
|
match self.kids.next() {
|
||||||
Some(kid) => {
|
Some(kid) => {
|
||||||
if kid.is_table_rowgroup() {
|
if kid.is_table_rowgroup() {
|
||||||
self.grandkids = Some(flow::mut_base(kid).child_iter());
|
self.grandkids = Some(flow::mut_base(kid).child_iter_mut());
|
||||||
self.next()
|
self.next()
|
||||||
} else if kid.is_table_row() {
|
} else if kid.is_table_row() {
|
||||||
Some(kid.as_mut_table_row())
|
Some(kid.as_mut_table_row())
|
||||||
|
|
|
@ -108,7 +108,7 @@ impl TableRowFlow {
|
||||||
// cells).
|
// cells).
|
||||||
let mut max_block_size = Au(0);
|
let mut max_block_size = Au(0);
|
||||||
let thread_id = self.block_flow.base.thread_id;
|
let thread_id = self.block_flow.base.thread_id;
|
||||||
for kid in self.block_flow.base.child_iter() {
|
for kid in self.block_flow.base.child_iter_mut() {
|
||||||
kid.place_float_if_applicable(layout_context);
|
kid.place_float_if_applicable(layout_context);
|
||||||
if !flow::base(kid).flags.is_float() {
|
if !flow::base(kid).flags.is_float() {
|
||||||
kid.assign_block_size_for_inorder_child_if_necessary(layout_context, thread_id);
|
kid.assign_block_size_for_inorder_child_if_necessary(layout_context, thread_id);
|
||||||
|
@ -148,7 +148,7 @@ impl TableRowFlow {
|
||||||
self.block_flow.base.position.size.block = block_size;
|
self.block_flow.base.position.size.block = block_size;
|
||||||
|
|
||||||
// Assign the block-size of kid fragments, which is the same value as own block-size.
|
// Assign the block-size of kid fragments, which is the same value as own block-size.
|
||||||
for kid in self.block_flow.base.child_iter() {
|
for kid in self.block_flow.base.child_iter_mut() {
|
||||||
let child_table_cell = kid.as_mut_table_cell();
|
let child_table_cell = kid.as_mut_table_cell();
|
||||||
{
|
{
|
||||||
let kid_fragment = child_table_cell.mut_fragment();
|
let kid_fragment = child_table_cell.mut_fragment();
|
||||||
|
@ -244,7 +244,7 @@ impl Flow for TableRowFlow {
|
||||||
self.preliminary_collapsed_borders.reset(CollapsedBorder::new());
|
self.preliminary_collapsed_borders.reset(CollapsedBorder::new());
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut iterator = self.block_flow.base.child_iter().enumerate().peekable();
|
let mut iterator = self.block_flow.base.child_iter_mut().enumerate().peekable();
|
||||||
while let Some((i, kid)) = iterator.next() {
|
while let Some((i, kid)) = iterator.next() {
|
||||||
assert!(kid.is_table_cell());
|
assert!(kid.is_table_cell());
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ impl TableWrapperFlow {
|
||||||
}
|
}
|
||||||
fn border_padding_and_spacing(&mut self) -> (Au, Au) {
|
fn border_padding_and_spacing(&mut self) -> (Au, Au) {
|
||||||
let (mut table_border_padding, mut spacing) = (Au(0), Au(0));
|
let (mut table_border_padding, mut spacing) = (Au(0), Au(0));
|
||||||
for kid in self.block_flow.base.child_iter() {
|
for kid in self.block_flow.base.child_iter_mut() {
|
||||||
if kid.is_table() {
|
if kid.is_table() {
|
||||||
let kid_table = kid.as_table();
|
let kid_table = kid.as_table();
|
||||||
spacing = kid_table.total_horizontal_spacing();
|
spacing = kid_table.total_horizontal_spacing();
|
||||||
|
@ -95,7 +95,7 @@ impl TableWrapperFlow {
|
||||||
// padding will affect where we place the child. This is an odd artifact of the way that
|
// padding will affect where we place the child. This is an odd artifact of the way that
|
||||||
// tables are separated into table flows and table wrapper flows.
|
// tables are separated into table flows and table wrapper flows.
|
||||||
let available_inline_size = self.block_flow.fragment.border_box.size.inline;
|
let available_inline_size = self.block_flow.fragment.border_box.size.inline;
|
||||||
for kid in self.block_flow.base.child_iter() {
|
for kid in self.block_flow.base.child_iter_mut() {
|
||||||
if !kid.is_table() {
|
if !kid.is_table() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -308,7 +308,7 @@ impl Flow for TableWrapperFlow {
|
||||||
|
|
||||||
fn bubble_inline_sizes(&mut self) {
|
fn bubble_inline_sizes(&mut self) {
|
||||||
// Get the intrinsic column inline-sizes info from the table flow.
|
// Get the intrinsic column inline-sizes info from the table flow.
|
||||||
for kid in self.block_flow.base.child_iter() {
|
for kid in self.block_flow.base.child_iter_mut() {
|
||||||
debug_assert!(kid.is_table_caption() || kid.is_table());
|
debug_assert!(kid.is_table_caption() || kid.is_table());
|
||||||
if kid.is_table() {
|
if kid.is_table() {
|
||||||
self.column_intrinsic_inline_sizes = kid.column_intrinsic_inline_sizes().clone()
|
self.column_intrinsic_inline_sizes = kid.column_intrinsic_inline_sizes().clone()
|
||||||
|
|
|
@ -226,7 +226,7 @@ impl<'a> BuildDisplayList<'a> {
|
||||||
self.state.pop_stacking_context_id();
|
self.state.pop_stacking_context_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
for kid in flow::child_iter(flow) {
|
for kid in flow::child_iter_mut(flow) {
|
||||||
self.traverse(kid);
|
self.traverse(kid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue