servo: Merge #17903 - stylo: Implement ToCss for SpecifiedOperation::{InterpolateMatrix|AccumulateMatrix} (from BorisChiou:stylo/animation/interpolatematrix_to_css); r=birtles

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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9eed902d2ef692439ad78202e4cd25accb8fdf04

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : ed8c9ba23ed8800d35e8ed26bcc3c740c3ecfb0f
This commit is contained in:
Boris Chiou 2017-07-28 23:55:55 -05:00
parent 1adc8dcedb
commit fc53b467e0

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))
}
}
}
}