mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Miscellaneous Servo build fixes.
This commit is contained in:
parent
18cda1567a
commit
e227715aee
12 changed files with 59 additions and 10 deletions
|
@ -117,12 +117,12 @@ impl BoxContentSizes {
|
|||
.auto_is(Length::zero);
|
||||
let max_inline_size = match style.max_box_size().inline {
|
||||
MaxSize::None => None,
|
||||
MaxSize::LengthPercentage(ref lp) => lp.as_length(),
|
||||
MaxSize::LengthPercentage(ref lp) => lp.to_length(),
|
||||
};
|
||||
let clamp = |l: Length| l.clamp_between_extremums(min_inline_size, max_inline_size);
|
||||
|
||||
// Percentages for 'width' are treated as 'auto'
|
||||
let inline_size = inline_size.map(|lp| lp.as_length());
|
||||
let inline_size = inline_size.map(|lp| lp.to_length());
|
||||
// The (inner) min/max-content are only used for 'auto'
|
||||
let mut outer = match inline_size.non_auto().flatten() {
|
||||
None => {
|
||||
|
|
|
@ -59,7 +59,7 @@ impl ComputedValuesExt for ComputedValues {
|
|||
} else {
|
||||
&position.height
|
||||
};
|
||||
matches!(size, Size::LengthPercentage(lp) if lp.0.as_length().is_some())
|
||||
matches!(size, Size::LengthPercentage(lp) if lp.0.to_length().is_some())
|
||||
}
|
||||
|
||||
fn inline_box_offsets_are_both_non_auto(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue