Bug 1078122 part 7 - Add method to Animation to get the target element and pseudo; r=dholbert
authorBrian Birtles <birtles@gmail.com>
Mon, 20 Oct 2014 13:55:47 +0900
changeset 211181 6e807f0f41c6d41321777daea6479fb5da65cfd5
parent 211180 082d6d6cf6acc5ddf442784cf425da0f68efd20e
child 211182 1a66dbf7d8e10bb1393d6f6ab07b2120db563880
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersdholbert
bugs1078122
milestone36.0a1
Bug 1078122 part 7 - Add method to Animation to get the target element and pseudo; r=dholbert
dom/animation/Animation.h
--- a/dom/animation/Animation.h
+++ b/dom/animation/Animation.h
@@ -172,16 +172,24 @@ public:
     // returns animations targetting Elements so this should never
     // be called for an animation that targets a pseudo-element.
     MOZ_ASSERT(mPseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement,
                "Requesting the target of an Animation that targets a"
                " pseudo-element is not yet supported.");
     return mTarget;
   }
 
+  // Temporary workaround to return both the target element and pseudo-type
+  // until we implement PseudoElement.
+  void GetTarget(Element*& aTarget,
+                 nsCSSPseudoElements::Type& aPseudoType) const {
+    aTarget = mTarget;
+    aPseudoType = mPseudoType;
+  }
+
   void SetParentTime(Nullable<TimeDuration> aParentTime);
 
   const AnimationTiming& Timing() const {
     return mTiming;
   }
   AnimationTiming& Timing() {
     return mTiming;
   }