Closed
Bug 1465066
Opened 6 years ago
Closed 6 years ago
Cleanup transform animation.
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
Details
Attachments
(1 file)
The recent changes we made to it allows for it to be cleaner.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8981415 [details] Bug 1465066: Cleanup transform animation. https://reviewboard.mozilla.org/r/247540/#review253816 Thanks for doing this! I did forget to merge the empty list cases into the function in bug 1464647. ::: servo/components/style/properties/helpers/animated_properties.mako.rs:2542 (Diff revision 2) > + let already_mismatched = matches!( > + longer[0], > + TransformOperation::InterpolateMatrix { .. } | > + TransformOperation::AccumulateMatrix { .. } > + ); At first glance I didn't understand why we need the InterpolationMatrix|AccumulateMatrix check in the function, but yeah it's the case that the length mismatches but the first nth operations matches (nth == the shorter list length). In such cases, we should bail out before extending the shorter list, I guess? Extending identity matrices shouldn't cause any issues but..
Attachment #8981415 -
Flags: review?(hikezoe) → review+
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #3) > Comment on attachment 8981415 [details] > Bug 1465066: Cleanup transform animation. > > https://reviewboard.mozilla.org/r/247540/#review253816 > > Thanks for doing this! I did forget to merge the empty list cases into the > function in bug 1464647. > > ::: > servo/components/style/properties/helpers/animated_properties.mako.rs:2542 > (Diff revision 2) > > + let already_mismatched = matches!( > > + longer[0], > > + TransformOperation::InterpolateMatrix { .. } | > > + TransformOperation::AccumulateMatrix { .. } > > + ); > > At first glance I didn't understand why we need the > InterpolationMatrix|AccumulateMatrix check in the function, but yeah it's > the case that the length mismatches but the first nth operations matches > (nth == the shorter list length). In such cases, we should bail out before > extending the shorter list, I guess? Extending identity matrices shouldn't > cause any issues but.. I thought it wouldn't be needed either but it is. We cannot really treat InterpolateMatrix { .. } as matched, because then we fail to interpolate it and return an error instead when we interpolate it with, let's say, `none`. We do need to extend it though, or at least we were doing that already. This was caught by: dom/animation/test/style/test_interpolation-from-interpolatematrix-to-none.html
Comment 5•6 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #4) > (In reply to Hiroyuki Ikezoe (:hiro) from comment #3) > > Comment on attachment 8981415 [details] > > Bug 1465066: Cleanup transform animation. > > > > https://reviewboard.mozilla.org/r/247540/#review253816 > > > > Thanks for doing this! I did forget to merge the empty list cases into the > > function in bug 1464647. > > > > ::: > > servo/components/style/properties/helpers/animated_properties.mako.rs:2542 > > (Diff revision 2) > > > + let already_mismatched = matches!( > > > + longer[0], > > > + TransformOperation::InterpolateMatrix { .. } | > > > + TransformOperation::AccumulateMatrix { .. } > > > + ); > > > > At first glance I didn't understand why we need the > > InterpolationMatrix|AccumulateMatrix check in the function, but yeah it's > > the case that the length mismatches but the first nth operations matches > > (nth == the shorter list length). In such cases, we should bail out before > > extending the shorter list, I guess? Extending identity matrices shouldn't > > cause any issues but.. > > I thought it wouldn't be needed either but it is. We cannot really treat > InterpolateMatrix { .. } as matched, because then we fail to interpolate it > and return an error instead when we interpolate it with, let's say, `none`. > > We do need to extend it though, or at least we were doing that already. This > was caught by: > dom/animation/test/style/test_interpolation-from-interpolatematrix-to-none. > html Oh I see. emtpry list slips through iter().zip() check, right? Ok, that's fair.
Updated•6 years ago
|
Priority: -- → P3
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/0b2331837a98 Cleanup transform animation. r=hiro
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0b2331837a98
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•