mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Make vertical-align animatable between percentage and percentage or length.
This commit is contained in:
parent
5c9ba6e631
commit
03c5462cf5
1 changed files with 3 additions and 3 deletions
|
@ -943,10 +943,10 @@ impl Animatable for VerticalAlign {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
|
fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
|
||||||
match (*self, *other) {
|
match (*self, *other) {
|
||||||
(VerticalAlign::LengthOrPercentage(LengthOrPercentage::Length(ref this)),
|
(VerticalAlign::LengthOrPercentage(ref this),
|
||||||
VerticalAlign::LengthOrPercentage(LengthOrPercentage::Length(ref other))) => {
|
VerticalAlign::LengthOrPercentage(ref other)) => {
|
||||||
this.add_weighted(other, self_portion, other_portion).map(|value| {
|
this.add_weighted(other, self_portion, other_portion).map(|value| {
|
||||||
VerticalAlign::LengthOrPercentage(LengthOrPercentage::Length(value))
|
VerticalAlign::LengthOrPercentage(value)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
_ => Err(()),
|
_ => Err(()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue