mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #5480 - SimonSapin:multicol, r=pcwalton
This add some properties to the style system and a new flow type, but the larger issues of dealing with fragmentation in the flow tree is still an open question. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5480) <!-- Reviewable:end -->
This commit is contained in:
commit
1e150140bd
15 changed files with 388 additions and 125 deletions
|
@ -56,9 +56,11 @@ pub struct TableWrapperFlow {
|
|||
}
|
||||
|
||||
impl TableWrapperFlow {
|
||||
pub fn from_node_and_fragment(node: &ThreadSafeLayoutNode, fragment: Fragment)
|
||||
pub fn from_node_and_fragment(node: &ThreadSafeLayoutNode,
|
||||
fragment: Fragment,
|
||||
float_kind: Option<FloatKind>)
|
||||
-> TableWrapperFlow {
|
||||
let mut block_flow = BlockFlow::from_node_and_fragment(node, fragment);
|
||||
let mut block_flow = BlockFlow::from_node_and_fragment(node, fragment, float_kind);
|
||||
let table_layout = if block_flow.fragment().style().get_table().table_layout ==
|
||||
table_layout::T::fixed {
|
||||
TableLayout::Fixed
|
||||
|
@ -71,25 +73,6 @@ impl TableWrapperFlow {
|
|||
table_layout: table_layout
|
||||
}
|
||||
}
|
||||
|
||||
pub fn float_from_node_and_fragment(node: &ThreadSafeLayoutNode,
|
||||
fragment: Fragment,
|
||||
float_kind: FloatKind)
|
||||
-> TableWrapperFlow {
|
||||
let mut block_flow = BlockFlow::float_from_node_and_fragment(node, fragment, float_kind);
|
||||
let table_layout = if block_flow.fragment().style().get_table().table_layout ==
|
||||
table_layout::T::fixed {
|
||||
TableLayout::Fixed
|
||||
} else {
|
||||
TableLayout::Auto
|
||||
};
|
||||
TableWrapperFlow {
|
||||
block_flow: block_flow,
|
||||
column_intrinsic_inline_sizes: vec!(),
|
||||
table_layout: table_layout
|
||||
}
|
||||
}
|
||||
|
||||
fn border_padding_and_spacing(&mut self) -> (Au, Au) {
|
||||
let (mut table_border_padding, mut spacing) = (Au(0), Au(0));
|
||||
for kid in self.block_flow.base.child_iter() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue