Bug 1260655 - Add a copy constructor and copy assignment operator to Keyframe; r?heycam draft
authorBrian Birtles <birtles@gmail.com>
Thu, 31 Mar 2016 16:26:52 +0900
changeset 346367 93c55010671bd8f3e2a010691793e056fbcd6248
parent 345761 9714d2a5e256541ea9737a24b4463d66be0df7ae
child 346368 32341a1fa4fb7119424de9552114c604c0f0dd43
push id14365
push userbbirtles@mozilla.com
push dateFri, 01 Apr 2016 00:25:02 +0000
reviewersheycam
bugs1260655
milestone48.0a1
Bug 1260655 - Add a copy constructor and copy assignment operator to Keyframe; r?heycam It turns out that std::stable_sort on Mac and Android use this. MozReview-Commit-ID: 3tGbnoW67QP
dom/animation/KeyframeEffect.h
--- a/dom/animation/KeyframeEffect.h
+++ b/dom/animation/KeyframeEffect.h
@@ -83,20 +83,23 @@ struct PropertyValuePair
  *
  * When the target element or style context changes, however, we rebuild these
  * per-property arrays from the original list of keyframes objects. As a result,
  * these objects represent the master definition of the effect's values.
  */
 struct Keyframe
 {
   Keyframe() = default;
+  Keyframe(const Keyframe& aOther) = default;
   Keyframe(Keyframe&& aOther)
   {
     *this = Move(aOther);
   }
+
+  Keyframe& operator=(const Keyframe& aOther) = default;
   Keyframe& operator=(Keyframe&& aOther)
   {
     mOffset         = aOther.mOffset;
     mComputedOffset = aOther.mComputedOffset;
     mTimingFunction = Move(aOther.mTimingFunction);
     mPropertyValues = Move(aOther.mPropertyValues);
     return *this;
   }