mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix future illegal_floating_point_literal_pattern warnings.
They make component/style fail to build, because of `#[deny(warnings)]`
This commit is contained in:
parent
58253f545b
commit
8c9e5d9f9d
4 changed files with 23 additions and 19 deletions
|
@ -143,16 +143,19 @@ impl MarginCollapseInfo {
|
|||
may_collapse_through = may_collapse_through &&
|
||||
match fragment.style().content_block_size() {
|
||||
LengthOrPercentageOrAuto::Auto => true,
|
||||
LengthOrPercentageOrAuto::Length(Au(0)) => true,
|
||||
LengthOrPercentageOrAuto::Percentage(0.) => true,
|
||||
LengthOrPercentageOrAuto::Percentage(_) if
|
||||
containing_block_size.is_none() => true,
|
||||
_ => false,
|
||||
LengthOrPercentageOrAuto::Length(Au(v)) => v == 0,
|
||||
LengthOrPercentageOrAuto::Percentage(v) => {
|
||||
v == 0. || containing_block_size.is_none()
|
||||
}
|
||||
LengthOrPercentageOrAuto::Calc(_) => false,
|
||||
};
|
||||
|
||||
if may_collapse_through {
|
||||
match fragment.style().min_block_size() {
|
||||
LengthOrPercentage::Length(Au(0)) | LengthOrPercentage::Percentage(0.) => {
|
||||
LengthOrPercentage::Length(Au(0)) => {
|
||||
FinalMarginState::MarginsCollapseThrough
|
||||
},
|
||||
LengthOrPercentage::Percentage(v) if v == 0. => {
|
||||
FinalMarginState::MarginsCollapseThrough
|
||||
},
|
||||
_ => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue