diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2018-02-14 17:17:34 -0800 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2018-02-16 16:01:51 -0800 |
commit | f796823b944e2434a14458283c980eeb3422ba8d (patch) | |
tree | 6ec6f3b513b0859fef7c681c6151c302d328877d /components | |
parent | cfa81e8b79b86d8699eed1cf52f1927d83baf967 (diff) | |
download | servo-f796823b944e2434a14458283c980eeb3422ba8d.tar.gz servo-f796823b944e2434a14458283c980eeb3422ba8d.zip |
Handle rowspan
Diffstat (limited to 'components')
-rw-r--r-- | components/layout/table.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/layout/table.rs b/components/layout/table.rs index 36aa1d10cb8..269267010a6 100644 --- a/components/layout/table.rs +++ b/components/layout/table.rs @@ -1089,6 +1089,16 @@ impl<'table> Iterator for TableCellStyleIterator<'table> { // FIXME We do this awkward .take() followed by shoving it back in // because without NLL the row_info borrow lasts too long if let Some(mut row_info) = self.row_info.take() { + if let Some(rowspan) = row_info.row.incoming_rowspan.get(self.column_index.absolute as usize) { + // we are not allowed to use this column as a starting point. Try the next one. + if *rowspan > 1 { + self.column_index.advance(1, &self.column_styles); + // put row_info back in + self.row_info = Some(row_info); + // try again + return self.next(); + } + } if let Some(cell) = row_info.cell_iterator.next() { let rowgroup_style = row_info.rowgroup.map(|r| r.style()); let row_style = row_info.row.block_flow.fragment.style(); |