Auto merge of #18117 - servo:we-are-leaving-babylon, r=emilio

Move more CSS values to their own submodules

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18117)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-16 20:26:22 -05:00 committed by GitHub
commit 575bcf3989
7 changed files with 489 additions and 420 deletions

View file

@ -867,27 +867,6 @@ impl Animatable for i32 {
}
}
/// https://drafts.csswg.org/css-transitions/#animtype-number
impl Animatable for Angle {
#[inline]
fn add_weighted(&self, other: &Angle, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
match (*self, *other) {
% for angle_type in [ 'Degree', 'Gradian', 'Turn' ]:
(Angle::${angle_type}(val1), Angle::${angle_type}(val2)) => {
Ok(Angle::${angle_type}(
try!(val1.add_weighted(&val2, self_portion, other_portion))
))
}
% endfor
_ => {
self.radians()
.add_weighted(&other.radians(), self_portion, other_portion)
.map(Angle::from_radians)
}
}
}
}
/// https://drafts.csswg.org/css-transitions/#animtype-visibility
impl Animatable for Visibility {
#[inline]