diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2014-12-11 14:22:20 -0800 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2014-12-11 14:24:55 -0800 |
commit | 3cddaf8da69b147f4808019ccdfca12b5f293a40 (patch) | |
tree | 0bddd5028e5c4b4933ba1566f1b483fd7dcc45c8 /components/layout/flow.rs | |
parent | 512d55ecefac4c5f7f6fc52ad5cedb7f2664b0c9 (diff) | |
download | servo-3cddaf8da69b147f4808019ccdfca12b5f293a40.tar.gz servo-3cddaf8da69b147f4808019ccdfca12b5f293a40.zip |
layout: Make table layout idempotent.
By "idempotent" I mean that later passes do not stomp on data from
earlier passes, so that we can run the passes individually for
incremental reflow. The main change here was to stop overwriting the
"minimum inline-size" field of each column with the column's computed
inline-size.
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r-- | components/layout/flow.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs index 598a8717cdb..5435cacbe67 100644 --- a/components/layout/flow.rs +++ b/components/layout/flow.rs @@ -38,7 +38,7 @@ use incremental::{RECONSTRUCT_FLOW, REFLOW, REFLOW_OUT_OF_FLOW, RestyleDamage}; use inline::InlineFlow; use model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo}; use parallel::FlowParallelInfo; -use table::{ColumnInlineSize, TableFlow}; +use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, TableFlow}; use table_caption::TableCaptionFlow; use table_cell::TableCellFlow; use table_colgroup::TableColGroupFlow; @@ -163,10 +163,16 @@ pub trait Flow: fmt::Show + ToString + Sync { panic!("called as_table_cell() on a non-tablecell flow") } - /// If this is a table row or table rowgroup or table flow, returns column inline-sizes. - /// Fails otherwise. - fn column_inline_sizes<'a>(&'a mut self) -> &'a mut Vec<ColumnInlineSize> { - panic!("called column_inline_sizes() on non-table flow") + /// If this is a table row, table rowgroup, or table flow, returns column intrinsic + /// inline-sizes. Fails otherwise. + fn column_intrinsic_inline_sizes<'a>(&'a mut self) -> &'a mut Vec<ColumnIntrinsicInlineSize> { + panic!("called column_intrinsic_inline_sizes() on non-table flow") + } + + /// If this is a table row, table rowgroup, or table flow, returns column computed + /// inline-sizes. Fails otherwise. + fn column_computed_inline_sizes<'a>(&'a mut self) -> &'a mut Vec<ColumnComputedInlineSize> { + panic!("called column_intrinsic_inline_sizes() on non-table flow") } // Main methods |