diff options
Diffstat (limited to 'components/layout/table_cell.rs')
-rw-r--r-- | components/layout/table_cell.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/components/layout/table_cell.rs b/components/layout/table_cell.rs index 280e86408cb..0a4e7d05e24 100644 --- a/components/layout/table_cell.rs +++ b/components/layout/table_cell.rs @@ -17,7 +17,7 @@ use wrapper::ThreadSafeLayoutNode; use servo_util::geometry::Au; use std::fmt; -use style::ComputedValues; +use style::{ColSpanUnsignedIntegerAttribute, ComputedValues}; use sync::Arc; /// A table formatting context. @@ -25,13 +25,17 @@ use sync::Arc; pub struct TableCellFlow { /// Data common to all block flows. pub block_flow: BlockFlow, + /// The column span of this cell. + pub column_span: u32, } impl TableCellFlow { pub fn from_node_and_fragment(node: &ThreadSafeLayoutNode, fragment: Fragment) -> TableCellFlow { TableCellFlow { - block_flow: BlockFlow::from_node_and_fragment(node, fragment) + block_flow: BlockFlow::from_node_and_fragment(node, fragment), + column_span: node.get_unsigned_integer_attribute(ColSpanUnsignedIntegerAttribute) + .unwrap_or(1), } } |