Bug 1260655 - Add a copy constructor and copy assignment operator to Keyframe; r=heycam
authorBrian Birtles <birtles@gmail.com>
Thu, 31 Mar 2016 16:26:52 +0900
changeset 316349 77d2df1822a966b3bae9b8c3a890a081445f21cf
parent 316348 bd357fbe96883c012177047b9ab10ebb1b8ce944
child 316350 d846bcdce3e9e8a192042f51834627da6253908e
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1260655, 1263500
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. Bug 1263500 tracks doing something more efficient on those platforms. 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;
   }