mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
style: Move LengthPercentage to its own file.
I'm (sadly) about to make it a bit more complicated to pack it better. So we may as well do this so it is easier to reason about navigate. I also reordered things a bit, and removed some From<> implementations and such. Differential Revision: https://phabricator.services.mozilla.com/D58701
This commit is contained in:
parent
61f3ff1de3
commit
4d5bd94a2b
5 changed files with 566 additions and 568 deletions
|
@ -297,7 +297,7 @@ impl<S: Side> ToComputedValue for PositionComponent<S> {
|
|||
let p = Percentage(1. - length.percentage());
|
||||
let l = -length.unclamped_length();
|
||||
// We represent `<end-side> <length>` as `calc(100% - <length>)`.
|
||||
ComputedLengthPercentage::new_calc(l, p)
|
||||
ComputedLengthPercentage::new_calc(l, Some(p))
|
||||
},
|
||||
PositionComponent::Side(_, Some(ref length)) |
|
||||
PositionComponent::Length(ref length) => length.to_computed_value(context),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue