mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
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:
commit
0b4ea018b0
32 changed files with 569 additions and 139 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue