Auto merge of #20034 - Manishearth:table-backgrounds, r=mbrubeck

Handle table cell backgrounds during display list generation for <table>

Fixes #19788

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20034)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-02-21 12:00:03 -05:00 committed by GitHub
commit 0b4ea018b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 569 additions and 139 deletions

View file

@ -1408,6 +1408,16 @@ impl Fragment {
}
}
/// If this is a Column fragment, get the col span
///
/// Panics for non-column fragments
pub fn column_span(&self) -> u32 {
match self.specific {
SpecificFragmentInfo::TableColumn(col_fragment) => max(col_fragment.span, 1),
_ => panic!("non-table-column fragment inside table column?!"),
}
}
/// Returns true if this element can be split. This is true for text fragments, unless
/// `white-space: pre` or `white-space: nowrap` is set.
pub fn can_split(&self) -> bool {