Auto merge of #17903 - BorisChiou:stylo/animation/interpolatematrix_to_css, r=birtles

stylo: Implement ToCss for SpecifiedOperation::{InterpolateMatrix|AccumulateMatrix}.

DevTools may serialize an InterpolateMatrix or AccumulateMatrix by
KeyframeEffectReadOnly::GetProperties() (from Gecko side), so we have to implement both.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1381386](https://bugzilla.mozilla.org/show_bug.cgi?id=1381386).
- [X] These changes do not require tests because only Chrome-Only API needs this, and the serialization of InterpolateMatrix and AccumulateMatrix are not in the spec.

<!-- 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/17903)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-07-28 23:55:55 -05:00 committed by GitHub
commit 9eed902d2e

View file

@ -979,7 +979,14 @@ ${helpers.predefined_type(
dest, "rotate3d({}, {}, {}, {})",
Css(x), Css(y), Css(z), Css(theta)),
SpecifiedOperation::Perspective(ref length) => write!(dest, "perspective({})", Css(length)),
_ => unreachable!(),
SpecifiedOperation::InterpolateMatrix { ref from_list, ref to_list, progress } => {
write!(dest, "interpolatematrix({}, {}, {})",
Css(from_list), Css(to_list), Css(progress))
},
SpecifiedOperation::AccumulateMatrix { ref from_list, ref to_list, count } => {
write!(dest, "accumulatematrix({}, {}, {})",
Css(from_list), Css(to_list), Css(count))
}
}
}
}