servo: Merge #18078 - Make vertical-align animatable between percentage and percentage or l… (from hiikezoe:vertical-align-animation); r=boris

…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

Source-Repo: https://github.com/servo/servo
Source-Revision: 0aba7442a6e59084762ecd49889c33457a90917b

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 6ededdf1ba11fce5b6a1e965b0c295237f3af524
This commit is contained in:
Hiroyuki Ikezoe 2017-08-14 22:07:31 -05:00
Родитель 357fdca523
Коммит 1317fd83f1
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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(()),