Make computed types hold Percentage instead of bare CSSFloat

This commit is contained in:
Anthony Ramine 2017-06-15 15:01:30 +02:00
parent 4b633c8637
commit 608e7f71a2
22 changed files with 140 additions and 110 deletions

View file

@ -701,7 +701,7 @@ impl<T: Parse> Either<Length, T> {
/// As of today, only `-moz-image-rect` supports percentages without length.
/// This is not a regression, and that's a non-standard extension anyway, so I'm
/// not implementing it for now.
#[derive(Clone, Copy, Debug, HasViewportPercentage, PartialEq)]
#[derive(Clone, Copy, Debug, Default, HasViewportPercentage, PartialEq)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub struct Percentage(pub CSSFloat);