flow::Flow should follow *_mut naming conventions

Fixes #7148
This commit is contained in:
Corey Farwell 2015-08-12 14:39:27 -04:00
parent 3d0951cf25
commit 6aaada64dc
15 changed files with 128 additions and 138 deletions

View file

@ -191,19 +191,19 @@ impl Flow for TableFlow {
FlowClass::Table
}
fn as_table<'a>(&'a mut self) -> &'a mut TableFlow {
fn as_mut_table<'a>(&'a mut self) -> &'a mut TableFlow {
self
}
fn as_immutable_table<'a>(&'a self) -> &'a TableFlow {
fn as_table<'a>(&'a self) -> &'a TableFlow {
self
}
fn as_block<'a>(&'a mut self) -> &'a mut BlockFlow {
fn as_mut_block<'a>(&'a mut self) -> &'a mut BlockFlow {
&mut self.block_flow
}
fn as_immutable_block(&self) -> &BlockFlow {
fn as_block(&self) -> &BlockFlow {
&self.block_flow
}
@ -263,7 +263,7 @@ impl Flow for TableFlow {
let mut iterator = self.block_flow.base.child_iter().peekable();
while let Some(kid) = iterator.next() {
if kid.is_table_colgroup() {
for specified_inline_size in &kid.as_table_colgroup().inline_sizes {
for specified_inline_size in &kid.as_mut_table_colgroup().inline_sizes {
self.column_intrinsic_inline_sizes.push(ColumnIntrinsicInlineSize {
minimum_length: match *specified_inline_size {
LengthOrPercentageOrAuto::Auto |
@ -293,12 +293,12 @@ impl Flow for TableFlow {
Some(next_sibling) => {
if next_sibling.is_table_rowgroup() {
NextBlockCollapsedBorders::FromNextRow(
&next_sibling.as_immutable_table_rowgroup()
&next_sibling.as_table_rowgroup()
.preliminary_collapsed_borders
.block_start)
} else {
NextBlockCollapsedBorders::FromNextRow(
&next_sibling.as_immutable_table_row()
&next_sibling.as_table_row()
.preliminary_collapsed_borders
.block_start)
}
@ -310,7 +310,7 @@ impl Flow for TableFlow {
}
};
perform_border_collapse_for_row(
kid.as_table_row(),
kid.as_mut_table_row(),
table_inline_collapsed_borders.as_ref().unwrap(),
previous_collapsed_block_end_borders,
next_collapsed_borders_in_block_direction,
@ -330,12 +330,12 @@ impl Flow for TableFlow {
Some(grandkid_next_sibling) => {
if grandkid_next_sibling.is_table_rowgroup() {
NextBlockCollapsedBorders::FromNextRow(
&grandkid_next_sibling.as_immutable_table_rowgroup()
&grandkid_next_sibling.as_table_rowgroup()
.preliminary_collapsed_borders
.block_start)
} else {
NextBlockCollapsedBorders::FromNextRow(
&grandkid_next_sibling.as_immutable_table_row()
&grandkid_next_sibling.as_table_row()
.preliminary_collapsed_borders
.block_start)
}
@ -359,7 +359,7 @@ impl Flow for TableFlow {
self.table_layout);
if collapsing_borders {
perform_border_collapse_for_row(
grandkid.as_table_row(),
grandkid.as_mut_table_row(),
table_inline_collapsed_borders.as_ref().unwrap(),
previous_collapsed_block_end_borders,
next_collapsed_borders_in_block_direction,
@ -480,12 +480,12 @@ impl Flow for TableFlow {
column_computed_inline_sizes,
&spacing_per_cell);
if child_flow.is_table_row() {
let child_table_row = child_flow.as_table_row();
let child_table_row = child_flow.as_mut_table_row();
child_table_row.populate_collapsed_border_spacing(
collapsed_inline_direction_border_widths_for_table,
&mut collapsed_block_direction_border_widths_for_table);
} else if child_flow.is_table_rowgroup() {
let child_table_rowgroup = child_flow.as_table_rowgroup();
let child_table_rowgroup = child_flow.as_mut_table_rowgroup();
child_table_rowgroup.populate_collapsed_border_spacing(
collapsed_inline_direction_border_widths_for_table,
&mut collapsed_block_direction_border_widths_for_table);