style: Move MozLength and MaxLength into generics.

Move MozLength and MaxLength into generics, and drop the manual implementation
of ToComputedValue.

Differential Revision: https://phabricator.services.mozilla.com/D8291
This commit is contained in:
Boris Chiou 2018-10-16 01:07:41 +00:00 committed by Emilio Cobos Álvarez
parent 53eb6cd667
commit c9d39b2b19
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 89 additions and 118 deletions

View file

@ -35,7 +35,7 @@ use values::animated::effects::Filter as AnimatedFilter;
use values::computed::{Angle, CalcLengthOrPercentage};
use values::computed::{ClipRect, Context};
use values::computed::{Length, LengthOrPercentage, LengthOrPercentageOrAuto};
use values::computed::{LengthOrPercentageOrNone, MaxLength};
use values::computed::LengthOrPercentageOrNone;
use values::computed::{NonNegativeNumber, Number, NumberOrPercentage, Percentage};
use values::computed::length::NonNegativeLengthOrPercentage;
use values::computed::ToComputedValue;
@ -893,11 +893,6 @@ impl ToAnimatedZero for LengthOrPercentageOrNone {
}
}
impl ToAnimatedZero for MaxLength {
#[inline]
fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
}
impl ToAnimatedZero for FontWeight {
#[inline]
fn to_animated_zero(&self) -> Result<Self, ()> {