mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #16837 - servo:illegal_floating_point_literal_pattern, r=emilio
Fix future illegal_floating_point_literal_pattern warnings. They make component/style fail to build, because of `#[deny(warnings)]` <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16837) <!-- Reviewable:end -->
This commit is contained in:
commit
b6f5d65bbd
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