Bug 1036300 - Expose AnimationPlayer.timeline; r=bz
authorBrian Birtles <birtles@gmail.com>
Wed, 16 Jul 2014 09:02:33 +0900
changeset 216202 75433ee796dc60054ffb0dc73a79148e5d57514c
parent 216201 713c2e0870f593079211169d4d02e244d0d17e29
child 216203 524dc207d68fafefd5d132ce2ebf045586c10a7d
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1036300
milestone33.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
Bug 1036300 - Expose AnimationPlayer.timeline; r=bz
dom/webidl/AnimationPlayer.webidl
layout/style/AnimationCommon.h
--- a/dom/webidl/AnimationPlayer.webidl
+++ b/dom/webidl/AnimationPlayer.webidl
@@ -7,11 +7,12 @@
  * http://dev.w3.org/fxtf/web-animations/#the-animationtimeline-interface
  *
  * Copyright © 2014 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 [Pref="dom.animations-api.core.enabled"]
 interface AnimationPlayer {
+  readonly attribute AnimationTimeline timeline;
   [Pure] readonly attribute double startTime;
   readonly attribute double currentTime;
 };
--- a/layout/style/AnimationCommon.h
+++ b/layout/style/AnimationCommon.h
@@ -323,20 +323,21 @@ public:
     , mTimeline(aTimeline)
   {
     SetIsDOMBinding();
   }
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(ElementAnimation)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(ElementAnimation)
 
-  mozilla::dom::AnimationTimeline* GetParentObject() const { return mTimeline; }
+  dom::AnimationTimeline* GetParentObject() const { return mTimeline; }
   virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
 
   // AnimationPlayer methods
+  dom::AnimationTimeline* Timeline() const { return mTimeline; }
   double StartTime() const;
   double CurrentTime() const;
 
   // FIXME: If we succeed in moving transition-specific code to a type of
   // AnimationEffect (as per the Web Animations API) we should remove these
   // virtual methods.
   virtual ElementPropertyTransition* AsTransition() { return nullptr; }
   virtual const ElementPropertyTransition* AsTransition() const {