mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
style: Fix servo build.
This also fixes a bunch of calc handling issues and such. Also remove tests that no longer compile and are covered by WPT.
This commit is contained in:
parent
ca503b4908
commit
4a31509215
17 changed files with 199 additions and 436 deletions
|
@ -154,11 +154,22 @@ impl Flow for MulticolFlow {
|
|||
this_fragment_is_empty: true,
|
||||
available_block_size: {
|
||||
let style = &self.block_flow.fragment.style;
|
||||
if let LengthOrPercentageOrAuto::Length(length) = style.content_block_size() {
|
||||
Au::from(length)
|
||||
} else if let LengthOrPercentageOrNone::Length(length) = style.max_block_size() {
|
||||
Au::from(length)
|
||||
} else {
|
||||
let size = match style.content_block_size() {
|
||||
LengthOrPercentageOrAuto::Auto => None,
|
||||
LengthOrPercentageOrAuto::LengthOrPercentage(ref lp) => {
|
||||
lp.maybe_to_used_value(None)
|
||||
}
|
||||
};
|
||||
let size = size.or_else(|| {
|
||||
match style.max_block_size() {
|
||||
LengthOrPercentageOrNone::None => None,
|
||||
LengthOrPercentageOrNone::LengthOrPercentage(ref lp) => {
|
||||
lp.maybe_to_used_value(None)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
size.unwrap_or_else(|| {
|
||||
// FIXME: do column balancing instead
|
||||
// FIXME: (until column balancing) substract margins/borders/padding
|
||||
LogicalSize::from_physical(
|
||||
|
@ -166,7 +177,7 @@ impl Flow for MulticolFlow {
|
|||
ctx.shared_context().viewport_size(),
|
||||
)
|
||||
.block
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue