Auto merge of #18078 - hiikezoe:vertical-align-animation, r=boris

Make vertical-align animatable between percentage and percentage or l…

…ength.

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1387949

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/18078)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-14 22:07:31 -05:00 committed by GitHub
commit 0aba7442a6

View file

@ -943,10 +943,10 @@ impl Animatable for VerticalAlign {
#[inline]
fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
match (*self, *other) {
(VerticalAlign::LengthOrPercentage(LengthOrPercentage::Length(ref this)),
VerticalAlign::LengthOrPercentage(LengthOrPercentage::Length(ref other))) => {
(VerticalAlign::LengthOrPercentage(ref this),
VerticalAlign::LengthOrPercentage(ref other)) => {
this.add_weighted(other, self_portion, other_portion).map(|value| {
VerticalAlign::LengthOrPercentage(LengthOrPercentage::Length(value))
VerticalAlign::LengthOrPercentage(value)
})
}
_ => Err(()),