servo: Merge #17903 - stylo: Implement ToCss for SpecifiedOperation::{InterpolateMatrix|AccumulateMatrix} (from BorisChiou:stylo/animation/interpolatematrix_to_css); r=birtles
authorBoris Chiou <boris.chiou@gmail.com>
Fri, 28 Jul 2017 23:55:55 -0500
changeset 420514 57339111e7b97390b5094c082fe314dbeb9a6f6e
parent 420513 7f4229cbc66563ced5b3277f58fc30295cfeb685
child 420515 f83e9b59ab26a20e6a981566a7e262a4b7ef39b4
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs17903, 1381386
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
servo/components/style/properties/longhand/box.mako.rs
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -974,17 +974,24 @@
                 SpecifiedOperation::Rotate(theta) => write!(dest, "rotate({})", Css(theta)),
                 SpecifiedOperation::RotateX(theta) => write!(dest, "rotateX({})", Css(theta)),
                 SpecifiedOperation::RotateY(theta) => write!(dest, "rotateY({})", Css(theta)),
                 SpecifiedOperation::RotateZ(theta) => write!(dest, "rotateZ({})", Css(theta)),
                 SpecifiedOperation::Rotate3D(x, y, z, theta) => write!(
                     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))
+                }
             }
         }
     }
 
     #[derive(Clone, Debug, HasViewportPercentage, PartialEq)]
     #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
     pub struct SpecifiedValue(Vec<SpecifiedOperation>);