mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add Multicolumn support block fragmentation.
This commit is contained in:
parent
359b984348
commit
5498b54347
10 changed files with 373 additions and 51 deletions
|
@ -161,6 +161,8 @@ pub enum SpecificFragmentInfo {
|
|||
TableColumn(TableColumnFragmentInfo),
|
||||
TableRow,
|
||||
TableWrapper,
|
||||
Multicol,
|
||||
MulticolColumn,
|
||||
UnscannedText(UnscannedTextFragmentInfo),
|
||||
}
|
||||
|
||||
|
@ -178,6 +180,8 @@ impl SpecificFragmentInfo {
|
|||
SpecificFragmentInfo::TableColumn(_) |
|
||||
SpecificFragmentInfo::TableRow |
|
||||
SpecificFragmentInfo::TableWrapper |
|
||||
SpecificFragmentInfo::Multicol |
|
||||
SpecificFragmentInfo::MulticolColumn |
|
||||
SpecificFragmentInfo::UnscannedText(_) |
|
||||
SpecificFragmentInfo::Generic => return RestyleDamage::empty(),
|
||||
SpecificFragmentInfo::InlineAbsoluteHypothetical(ref info) => &info.flow_ref,
|
||||
|
@ -206,6 +210,8 @@ impl SpecificFragmentInfo {
|
|||
SpecificFragmentInfo::TableColumn(_) => "SpecificFragmentInfo::TableColumn",
|
||||
SpecificFragmentInfo::TableRow => "SpecificFragmentInfo::TableRow",
|
||||
SpecificFragmentInfo::TableWrapper => "SpecificFragmentInfo::TableWrapper",
|
||||
SpecificFragmentInfo::Multicol => "SpecificFragmentInfo::Multicol",
|
||||
SpecificFragmentInfo::MulticolColumn => "SpecificFragmentInfo::MulticolColumn",
|
||||
SpecificFragmentInfo::UnscannedText(_) => "SpecificFragmentInfo::UnscannedText",
|
||||
}
|
||||
}
|
||||
|
@ -912,7 +918,8 @@ impl Fragment {
|
|||
SpecificFragmentInfo::GeneratedContent(_) |
|
||||
SpecificFragmentInfo::Iframe(_) |
|
||||
SpecificFragmentInfo::Image(_) |
|
||||
SpecificFragmentInfo::InlineAbsolute(_) => {
|
||||
SpecificFragmentInfo::InlineAbsolute(_) |
|
||||
SpecificFragmentInfo::Multicol => {
|
||||
QuantitiesIncludedInIntrinsicInlineSizes::all()
|
||||
}
|
||||
SpecificFragmentInfo::Table | SpecificFragmentInfo::TableCell => {
|
||||
|
@ -948,7 +955,8 @@ impl Fragment {
|
|||
SpecificFragmentInfo::TableColumn(_) |
|
||||
SpecificFragmentInfo::UnscannedText(_) |
|
||||
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) |
|
||||
SpecificFragmentInfo::InlineBlock(_) => {
|
||||
SpecificFragmentInfo::InlineBlock(_) |
|
||||
SpecificFragmentInfo::MulticolColumn => {
|
||||
QuantitiesIncludedInIntrinsicInlineSizes::empty()
|
||||
}
|
||||
}
|
||||
|
@ -1308,6 +1316,8 @@ impl Fragment {
|
|||
SpecificFragmentInfo::TableColumn(_) |
|
||||
SpecificFragmentInfo::TableRow |
|
||||
SpecificFragmentInfo::TableWrapper |
|
||||
SpecificFragmentInfo::Multicol |
|
||||
SpecificFragmentInfo::MulticolColumn |
|
||||
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => {}
|
||||
SpecificFragmentInfo::InlineBlock(ref info) => {
|
||||
let block_flow = info.flow_ref.as_block();
|
||||
|
@ -1409,6 +1419,8 @@ impl Fragment {
|
|||
SpecificFragmentInfo::TableCell |
|
||||
SpecificFragmentInfo::TableRow |
|
||||
SpecificFragmentInfo::TableWrapper |
|
||||
SpecificFragmentInfo::Multicol |
|
||||
SpecificFragmentInfo::MulticolColumn |
|
||||
SpecificFragmentInfo::InlineBlock(_) |
|
||||
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) |
|
||||
SpecificFragmentInfo::InlineAbsolute(_) => Au(0),
|
||||
|
@ -1667,7 +1679,9 @@ impl Fragment {
|
|||
SpecificFragmentInfo::Table |
|
||||
SpecificFragmentInfo::TableCell |
|
||||
SpecificFragmentInfo::TableRow |
|
||||
SpecificFragmentInfo::TableWrapper => return,
|
||||
SpecificFragmentInfo::TableWrapper |
|
||||
SpecificFragmentInfo::Multicol |
|
||||
SpecificFragmentInfo::MulticolColumn => return,
|
||||
SpecificFragmentInfo::TableColumn(_) => {
|
||||
panic!("Table column fragments do not have inline size")
|
||||
}
|
||||
|
@ -1759,7 +1773,9 @@ impl Fragment {
|
|||
SpecificFragmentInfo::Table |
|
||||
SpecificFragmentInfo::TableCell |
|
||||
SpecificFragmentInfo::TableRow |
|
||||
SpecificFragmentInfo::TableWrapper => return,
|
||||
SpecificFragmentInfo::TableWrapper |
|
||||
SpecificFragmentInfo::Multicol |
|
||||
SpecificFragmentInfo::MulticolColumn => return,
|
||||
SpecificFragmentInfo::TableColumn(_) => {
|
||||
panic!("Table column fragments do not have block size")
|
||||
}
|
||||
|
@ -1977,6 +1993,7 @@ impl Fragment {
|
|||
SpecificFragmentInfo::InlineBlock(_) |
|
||||
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) |
|
||||
SpecificFragmentInfo::InlineAbsolute(_) |
|
||||
SpecificFragmentInfo::MulticolColumn |
|
||||
SpecificFragmentInfo::TableWrapper => false,
|
||||
SpecificFragmentInfo::Canvas(_) |
|
||||
SpecificFragmentInfo::Generic |
|
||||
|
@ -1988,6 +2005,7 @@ impl Fragment {
|
|||
SpecificFragmentInfo::TableCell |
|
||||
SpecificFragmentInfo::TableColumn(_) |
|
||||
SpecificFragmentInfo::TableRow |
|
||||
SpecificFragmentInfo::Multicol |
|
||||
SpecificFragmentInfo::UnscannedText(_) => true,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue