mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix inline margins of in flow blocks in 2020
This commit is contained in:
parent
48a4a82a49
commit
f24e8d0557
1 changed files with 4 additions and 7 deletions
|
@ -369,16 +369,13 @@ fn layout_in_flow_non_replaced_block_level<'a>(
|
|||
*s = LengthOrAuto::LengthPercentage(inline_margins / 2.);
|
||||
*e = LengthOrAuto::LengthPercentage(inline_margins / 2.);
|
||||
},
|
||||
(s @ &mut LengthOrAuto::Auto, _) => {
|
||||
*s = LengthOrAuto::LengthPercentage(inline_margins);
|
||||
(s @ &mut LengthOrAuto::Auto, &mut LengthOrAuto::LengthPercentage(e)) => {
|
||||
*s = LengthOrAuto::LengthPercentage(inline_margins - e);
|
||||
},
|
||||
(_, e @ &mut LengthOrAuto::Auto) => {
|
||||
*e = LengthOrAuto::LengthPercentage(inline_margins);
|
||||
},
|
||||
(_, e @ _) => {
|
||||
(&mut LengthOrAuto::LengthPercentage(s), e) => {
|
||||
// Either the inline-end margin is auto,
|
||||
// or we’re over-constrained and we do as if it were.
|
||||
*e = LengthOrAuto::LengthPercentage(inline_margins);
|
||||
*e = LengthOrAuto::LengthPercentage(inline_margins - s);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue