mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Refactor Flow::from_fragment
-style constructors to be
consistent.
This commit is contained in:
parent
e888b76534
commit
be252371ea
11 changed files with 35 additions and 15 deletions
|
@ -46,10 +46,19 @@ pub struct TableCellFlow {
|
|||
}
|
||||
|
||||
impl TableCellFlow {
|
||||
pub fn from_fragment(fragment: Fragment) -> TableCellFlow {
|
||||
TableCellFlow {
|
||||
block_flow: BlockFlow::from_fragment(fragment),
|
||||
collapsed_borders: CollapsedBordersForCell::new(),
|
||||
column_span: 1,
|
||||
visible: true,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_node_fragment_and_visibility_flag<N: ThreadSafeLayoutNode>(
|
||||
node: &N, fragment: Fragment, visible: bool) -> TableCellFlow {
|
||||
TableCellFlow {
|
||||
block_flow: BlockFlow::from_fragment(fragment, None),
|
||||
block_flow: BlockFlow::from_fragment(fragment),
|
||||
collapsed_borders: CollapsedBordersForCell::new(),
|
||||
column_span: node.get_colspan(),
|
||||
visible: visible,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue