mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
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:
commit
575bcf3989
7 changed files with 489 additions and 420 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue