Change LengthOrPercentage to make use of NoCalcLength

This commit is contained in:
Ravi Shankar 2017-01-23 15:04:41 +05:30
parent 377a23df50
commit 590c9579f0
10 changed files with 61 additions and 60 deletions

View file

@ -236,8 +236,7 @@ impl MediaExpressionValue {
nsMediaFeature_ValueType::eLength => {
debug_assert!(css_value.mUnit == nsCSSUnit::eCSSUnit_Pixel);
let pixels = css_value.float_unchecked();
Some(MediaExpressionValue::Length(
specified::Length::Absolute(Au::from_f32_px(pixels))))
Some(MediaExpressionValue::Length(specified::Length::from_px(pixels)))
}
nsMediaFeature_ValueType::eInteger => {
let i = css_value.integer_unchecked();