mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Use CSSPixelLength in LengthOrPercentage{*}.
Replace Au with CSSPixelLength in LengthOrPercentage, LengthOrPercentageOrAuto, and LengthOrPercentageOrNone.
This commit is contained in:
parent
535c1e3c6f
commit
b89286e8e7
25 changed files with 109 additions and 118 deletions
|
@ -1480,11 +1480,10 @@ ${helpers.predefined_type(
|
|||
}
|
||||
|
||||
// Converts computed LengthOrPercentageOrNumber into computed
|
||||
// LengthOrPercentage. Number maps into Length
|
||||
// LengthOrPercentage. Number maps into Length (pixel unit)
|
||||
fn lopon_to_lop(value: &ComputedLoPoNumber) -> ComputedLoP {
|
||||
use app_units::Au;
|
||||
match *value {
|
||||
Either::First(number) => ComputedLoP::Length(Au::from_f32_px(number)),
|
||||
Either::First(number) => ComputedLoP::Length(ComputedLength::new(number)),
|
||||
Either::Second(length_or_percentage) => length_or_percentage,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue