2011-04-12 10:18:44 +04:00
|
|
|
/* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-04-12 10:18:44 +04:00
|
|
|
#ifndef nsAnimationManager_h_
|
|
|
|
#define nsAnimationManager_h_
|
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-09-25 15:21:20 +04:00
|
|
|
#include "mozilla/ContentEvents.h"
|
2015-08-26 15:56:59 +03:00
|
|
|
#include "mozilla/EventForwards.h"
|
2011-04-12 10:18:44 +04:00
|
|
|
#include "AnimationCommon.h"
|
|
|
|
#include "nsCSSPseudoElements.h"
|
2015-04-21 04:22:09 +03:00
|
|
|
#include "mozilla/dom/Animation.h"
|
2013-06-23 16:03:39 +04:00
|
|
|
#include "mozilla/MemoryReporting.h"
|
2011-04-12 10:18:44 +04:00
|
|
|
#include "mozilla/TimeStamp.h"
|
2011-04-12 10:18:44 +04:00
|
|
|
|
2015-04-28 09:48:35 +03:00
|
|
|
class nsIGlobalObject;
|
2013-09-16 05:06:52 +04:00
|
|
|
class nsStyleContext;
|
2011-04-12 10:18:44 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace css {
|
|
|
|
class Declaration;
|
2014-10-20 08:55:46 +04:00
|
|
|
} /* namespace css */
|
2014-12-18 02:42:41 +03:00
|
|
|
namespace dom {
|
|
|
|
class Promise;
|
|
|
|
} /* namespace dom */
|
2011-04-12 10:18:44 +04:00
|
|
|
|
2012-07-31 21:28:21 +04:00
|
|
|
struct AnimationEventInfo {
|
|
|
|
nsRefPtr<mozilla::dom::Element> mElement;
|
2013-09-27 10:20:54 +04:00
|
|
|
mozilla::InternalAnimationEvent mEvent;
|
2012-07-31 21:28:21 +04:00
|
|
|
|
|
|
|
AnimationEventInfo(mozilla::dom::Element *aElement,
|
2014-08-22 16:42:48 +04:00
|
|
|
const nsSubstring& aAnimationName,
|
2015-08-26 15:56:59 +03:00
|
|
|
EventMessage aMessage,
|
2014-09-25 09:25:50 +04:00
|
|
|
const mozilla::StickyTimeDuration& aElapsedTime,
|
2015-07-29 04:57:40 +03:00
|
|
|
nsCSSPseudoElements::Type aPseudoType)
|
2014-02-11 09:35:25 +04:00
|
|
|
: mElement(aElement), mEvent(true, aMessage)
|
2012-07-31 21:28:21 +04:00
|
|
|
{
|
2014-02-11 09:35:25 +04:00
|
|
|
// XXX Looks like nobody initialize WidgetEvent::time
|
|
|
|
mEvent.animationName = aAnimationName;
|
|
|
|
mEvent.elapsedTime = aElapsedTime.ToSeconds();
|
2015-07-29 04:57:40 +03:00
|
|
|
mEvent.pseudoElement = AnimationCollection::PseudoTypeAsString(aPseudoType);
|
2012-07-31 21:28:21 +04:00
|
|
|
}
|
|
|
|
|
2013-09-27 10:20:54 +04:00
|
|
|
// InternalAnimationEvent doesn't support copy-construction, so we need
|
2012-07-31 21:28:21 +04:00
|
|
|
// to ourselves in order to work with nsTArray
|
|
|
|
AnimationEventInfo(const AnimationEventInfo &aOther)
|
2015-08-22 04:34:51 +03:00
|
|
|
: mElement(aOther.mElement)
|
|
|
|
, mEvent(true, aOther.mEvent.mMessage)
|
2012-07-31 21:28:21 +04:00
|
|
|
{
|
2014-02-11 09:35:25 +04:00
|
|
|
mEvent.AssignAnimationEventData(aOther.mEvent, false);
|
2012-07-31 21:28:21 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-06-30 04:00:39 +03:00
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class CSSAnimation final : public Animation
|
2014-10-20 08:55:46 +04:00
|
|
|
{
|
|
|
|
public:
|
2015-04-28 09:48:35 +03:00
|
|
|
explicit CSSAnimation(nsIGlobalObject* aGlobal,
|
2015-07-01 09:19:04 +03:00
|
|
|
const nsSubstring& aAnimationName)
|
2015-04-28 11:21:58 +03:00
|
|
|
: dom::Animation(aGlobal)
|
2015-07-01 09:19:04 +03:00
|
|
|
, mAnimationName(aAnimationName)
|
2014-10-20 08:55:46 +04:00
|
|
|
, mIsStylePaused(false)
|
|
|
|
, mPauseShouldStick(false)
|
2015-09-15 05:20:33 +03:00
|
|
|
, mNeedsNewAnimationIndexWhenRun(false)
|
2015-02-13 18:58:33 +03:00
|
|
|
, mPreviousPhaseOrIteration(PREVIOUS_PHASE_BEFORE)
|
2014-10-20 08:55:46 +04:00
|
|
|
{
|
2015-07-01 09:19:04 +03:00
|
|
|
// We might need to drop this assertion once we add a script-accessible
|
|
|
|
// constructor but for animations generated from CSS markup the
|
|
|
|
// animation-name should never be empty.
|
|
|
|
MOZ_ASSERT(!mAnimationName.IsEmpty(), "animation-name should not be empty");
|
2014-10-20 08:55:46 +04:00
|
|
|
}
|
|
|
|
|
2015-06-30 04:00:39 +03:00
|
|
|
JSObject* WrapObject(JSContext* aCx,
|
|
|
|
JS::Handle<JSObject*> aGivenProto) override;
|
|
|
|
|
2015-06-09 05:13:53 +03:00
|
|
|
CSSAnimation* AsCSSAnimation() override { return this; }
|
|
|
|
const CSSAnimation* AsCSSAnimation() const override { return this; }
|
2014-10-20 08:55:46 +04:00
|
|
|
|
2015-07-01 06:15:42 +03:00
|
|
|
// CSSAnimation interface
|
2015-07-01 09:19:04 +03:00
|
|
|
void GetAnimationName(nsString& aRetVal) const { aRetVal = mAnimationName; }
|
|
|
|
|
|
|
|
// Alternative to GetAnimationName that returns a reference to the member
|
|
|
|
// for more efficient internal usage.
|
|
|
|
const nsString& AnimationName() const { return mAnimationName; }
|
2015-07-01 06:15:42 +03:00
|
|
|
|
|
|
|
// Animation interface overrides
|
2015-06-30 04:00:39 +03:00
|
|
|
virtual Promise* GetReady(ErrorResult& aRv) override;
|
2015-05-19 08:00:48 +03:00
|
|
|
virtual void Play(ErrorResult& aRv, LimitBehavior aLimitBehavior) override;
|
2015-05-19 08:55:26 +03:00
|
|
|
virtual void Pause(ErrorResult& aRv) override;
|
2014-10-20 08:55:46 +04:00
|
|
|
|
2015-06-30 04:00:39 +03:00
|
|
|
virtual AnimationPlayState PlayStateFromJS() const override;
|
2015-05-19 08:00:48 +03:00
|
|
|
virtual void PlayFromJS(ErrorResult& aRv) override;
|
2014-11-17 07:45:58 +03:00
|
|
|
|
2014-10-20 08:55:46 +04:00
|
|
|
void PlayFromStyle();
|
|
|
|
void PauseFromStyle();
|
2015-06-09 05:13:53 +03:00
|
|
|
void CancelFromStyle() override
|
|
|
|
{
|
2015-06-09 05:13:54 +03:00
|
|
|
mOwningElement = OwningElementRef();
|
2015-09-15 05:20:56 +03:00
|
|
|
|
|
|
|
// When an animation is disassociated with style it enters an odd state
|
|
|
|
// where its composite order is undefined until it first transitions
|
|
|
|
// out of the idle state.
|
|
|
|
//
|
|
|
|
// Even if the composite order isn't defined we don't want it to be random
|
|
|
|
// in case we need to determine the order to dispatch events associated
|
|
|
|
// with an animation in this state. To solve this we treat the animation as
|
|
|
|
// if it had been added to the end of the global animation list so that
|
|
|
|
// its sort order is defined. We'll update this index again once the
|
|
|
|
// animation leaves the idle state.
|
|
|
|
mAnimationIndex = sNextAnimationIndex++;
|
|
|
|
mNeedsNewAnimationIndexWhenRun = true;
|
|
|
|
|
2015-06-09 05:13:53 +03:00
|
|
|
Animation::CancelFromStyle();
|
|
|
|
}
|
2014-10-20 08:55:46 +04:00
|
|
|
|
2015-07-29 04:57:39 +03:00
|
|
|
void Tick() override;
|
2015-08-17 07:59:45 +03:00
|
|
|
void QueueEvents();
|
2015-08-31 10:21:55 +03:00
|
|
|
bool HasEndEventToQueue() const override;
|
2015-07-29 04:57:39 +03:00
|
|
|
|
2014-10-20 08:55:46 +04:00
|
|
|
bool IsStylePaused() const { return mIsStylePaused; }
|
|
|
|
|
2015-06-09 05:13:54 +03:00
|
|
|
bool HasLowerCompositeOrderThan(const Animation& aOther) const override;
|
2015-06-09 05:13:54 +03:00
|
|
|
|
|
|
|
void SetAnimationIndex(uint64_t aIndex)
|
|
|
|
{
|
2015-09-15 07:32:12 +03:00
|
|
|
MOZ_ASSERT(IsTiedToMarkup());
|
2015-09-15 05:20:26 +03:00
|
|
|
mAnimationIndex = aIndex;
|
2015-06-09 05:13:54 +03:00
|
|
|
}
|
|
|
|
void CopyAnimationIndex(const CSSAnimation& aOther)
|
|
|
|
{
|
2015-09-15 07:32:12 +03:00
|
|
|
MOZ_ASSERT(IsTiedToMarkup() && aOther.IsTiedToMarkup());
|
2015-09-15 05:20:26 +03:00
|
|
|
mAnimationIndex = aOther.mAnimationIndex;
|
2015-06-09 05:13:54 +03:00
|
|
|
}
|
|
|
|
|
2015-06-09 05:13:54 +03:00
|
|
|
// Sets the owning element which is used for determining the composite
|
|
|
|
// order of CSSAnimation objects generated from CSS markup.
|
2015-06-09 05:13:53 +03:00
|
|
|
//
|
2015-09-15 05:20:33 +03:00
|
|
|
// @see mOwningElement
|
2015-06-09 05:13:54 +03:00
|
|
|
void SetOwningElement(const OwningElementRef& aElement)
|
2015-06-09 05:13:53 +03:00
|
|
|
{
|
2015-06-09 05:13:54 +03:00
|
|
|
mOwningElement = aElement;
|
2015-06-09 05:13:53 +03:00
|
|
|
}
|
2015-09-15 07:32:12 +03:00
|
|
|
// True for animations that are generated from CSS markup and continue to
|
|
|
|
// reflect changes to that markup.
|
|
|
|
bool IsTiedToMarkup() const { return mOwningElement.IsSet(); }
|
2015-06-09 05:13:53 +03:00
|
|
|
|
2015-04-01 01:05:54 +03:00
|
|
|
// Is this animation currently in effect for the purposes of computing
|
|
|
|
// mWinsInCascade. (In general, this can be computed from the timing
|
|
|
|
// function. This boolean remembers the state as of the last time we
|
|
|
|
// called UpdateCascadeResults so we know if it changes and we need to
|
|
|
|
// call UpdateCascadeResults again.)
|
|
|
|
bool mInEffectForCascadeResults;
|
|
|
|
|
2014-10-20 08:55:46 +04:00
|
|
|
protected:
|
2015-06-09 05:13:53 +03:00
|
|
|
virtual ~CSSAnimation()
|
|
|
|
{
|
2015-06-09 05:13:54 +03:00
|
|
|
MOZ_ASSERT(!mOwningElement.IsSet(), "Owning element should be cleared "
|
|
|
|
"before a CSS animation is destroyed");
|
2015-06-09 05:13:53 +03:00
|
|
|
}
|
2015-09-15 05:20:56 +03:00
|
|
|
|
|
|
|
// Animation overrides
|
|
|
|
CommonAnimationManager* GetAnimationManager() const override;
|
|
|
|
void UpdateTiming(SeekFlag aSeekFlag,
|
|
|
|
SyncNotifyFlag aSyncNotifyFlag) override;
|
2014-10-20 08:55:46 +04:00
|
|
|
|
2015-07-01 09:19:04 +03:00
|
|
|
nsString mAnimationName;
|
|
|
|
|
2015-06-09 05:13:53 +03:00
|
|
|
// The (pseudo-)element whose computed animation-name refers to this
|
|
|
|
// animation (if any).
|
2015-09-15 05:20:33 +03:00
|
|
|
//
|
|
|
|
// This is used for determining the relative composite order of animations
|
|
|
|
// generated from CSS markup.
|
|
|
|
//
|
|
|
|
// Typically this will be the same as the target element of the keyframe
|
|
|
|
// effect associated with this animation. However, it can differ in the
|
|
|
|
// following circumstances:
|
|
|
|
//
|
|
|
|
// a) If script removes or replaces the effect of this animation,
|
|
|
|
// b) If this animation is cancelled (e.g. by updating the
|
|
|
|
// animation-name property or removing the owning element from the
|
|
|
|
// document),
|
|
|
|
// c) If this object is generated from script using the CSSAnimation
|
|
|
|
// constructor.
|
|
|
|
//
|
|
|
|
// For (b) and (c) the owning element will return !IsSet().
|
2015-06-09 05:13:54 +03:00
|
|
|
OwningElementRef mOwningElement;
|
2015-06-09 05:13:53 +03:00
|
|
|
|
2014-10-20 08:55:46 +04:00
|
|
|
// When combining animation-play-state with play() / pause() the following
|
|
|
|
// behavior applies:
|
|
|
|
// 1. pause() is sticky and always overrides the underlying
|
|
|
|
// animation-play-state
|
|
|
|
// 2. If animation-play-state is 'paused', play() will temporarily override
|
|
|
|
// it until animation-play-state next becomes 'running'.
|
|
|
|
// 3. Calls to play() trigger finishing behavior but setting the
|
|
|
|
// animation-play-state to 'running' does not.
|
|
|
|
//
|
|
|
|
// This leads to five distinct states:
|
|
|
|
//
|
|
|
|
// A. Running
|
|
|
|
// B. Running and temporarily overriding animation-play-state: paused
|
|
|
|
// C. Paused and sticky overriding animation-play-state: running
|
|
|
|
// D. Paused and sticky overriding animation-play-state: paused
|
|
|
|
// E. Paused by animation-play-state
|
|
|
|
//
|
|
|
|
// C and D may seem redundant but they differ in how to respond to the
|
|
|
|
// sequence: call play(), set animation-play-state: paused.
|
|
|
|
//
|
|
|
|
// C will transition to A then E leaving the animation paused.
|
|
|
|
// D will transition to B then B leaving the animation running.
|
|
|
|
//
|
|
|
|
// A state transition chart is as follows:
|
|
|
|
//
|
|
|
|
// A | B | C | D | E
|
|
|
|
// ---------------------------
|
|
|
|
// play() A | B | A | B | B
|
|
|
|
// pause() C | D | C | D | D
|
|
|
|
// 'running' A | A | C | C | A
|
|
|
|
// 'paused' E | B | D | D | E
|
|
|
|
//
|
2015-04-21 04:22:09 +03:00
|
|
|
// The base class, Animation already provides a boolean value,
|
2014-10-20 08:55:46 +04:00
|
|
|
// mIsPaused which gives us two states. To this we add a further two booleans
|
|
|
|
// to represent the states as follows.
|
|
|
|
//
|
|
|
|
// A. Running
|
|
|
|
// (!mIsPaused; !mIsStylePaused; !mPauseShouldStick)
|
|
|
|
// B. Running and temporarily overriding animation-play-state: paused
|
|
|
|
// (!mIsPaused; mIsStylePaused; !mPauseShouldStick)
|
|
|
|
// C. Paused and sticky overriding animation-play-state: running
|
|
|
|
// (mIsPaused; !mIsStylePaused; mPauseShouldStick)
|
|
|
|
// D. Paused and sticky overriding animation-play-state: paused
|
|
|
|
// (mIsPaused; mIsStylePaused; mPauseShouldStick)
|
|
|
|
// E. Paused by animation-play-state
|
|
|
|
// (mIsPaused; mIsStylePaused; !mPauseShouldStick)
|
|
|
|
//
|
|
|
|
// (That leaves 3 combinations of the boolean values that we never set because
|
|
|
|
// they don't represent valid states.)
|
|
|
|
bool mIsStylePaused;
|
|
|
|
bool mPauseShouldStick;
|
2014-10-20 08:55:47 +04:00
|
|
|
|
2015-09-15 05:20:33 +03:00
|
|
|
// When true, indicates that when this animation next leaves the idle state,
|
|
|
|
// its animation index should be updated.
|
|
|
|
bool mNeedsNewAnimationIndexWhenRun;
|
|
|
|
|
2014-10-20 08:55:47 +04:00
|
|
|
enum {
|
2015-02-13 18:58:33 +03:00
|
|
|
PREVIOUS_PHASE_BEFORE = uint64_t(-1),
|
|
|
|
PREVIOUS_PHASE_AFTER = uint64_t(-2)
|
2014-10-20 08:55:47 +04:00
|
|
|
};
|
2015-02-13 18:58:33 +03:00
|
|
|
// One of the PREVIOUS_PHASE_* constants, or an integer for the iteration
|
2014-10-20 08:55:47 +04:00
|
|
|
// whose start we last notified on.
|
2015-02-13 18:58:33 +03:00
|
|
|
uint64_t mPreviousPhaseOrIteration;
|
2014-10-20 08:55:46 +04:00
|
|
|
};
|
|
|
|
|
2015-06-30 04:00:39 +03:00
|
|
|
} /* namespace dom */
|
2014-10-20 08:55:46 +04:00
|
|
|
} /* namespace mozilla */
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsAnimationManager final
|
2015-07-29 04:57:39 +03:00
|
|
|
: public mozilla::CommonAnimationManager
|
2011-04-12 10:18:44 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-08-20 08:58:22 +04:00
|
|
|
explicit nsAnimationManager(nsPresContext *aPresContext)
|
2015-07-29 04:57:39 +03:00
|
|
|
: mozilla::CommonAnimationManager(aPresContext)
|
2011-04-12 10:18:44 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-07-29 04:57:39 +03:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS(nsAnimationManager)
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
|
2015-04-21 04:22:10 +03:00
|
|
|
void MaybeUpdateCascadeResults(mozilla::AnimationCollection* aCollection);
|
2015-04-01 01:05:54 +03:00
|
|
|
|
2011-04-12 10:18:44 +04:00
|
|
|
// nsIStyleRuleProcessor (parts)
|
2013-06-23 16:03:39 +04:00
|
|
|
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf)
|
2015-03-21 19:28:04 +03:00
|
|
|
const MOZ_MUST_OVERRIDE override;
|
2013-06-23 16:03:39 +04:00
|
|
|
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
|
2015-03-21 19:28:04 +03:00
|
|
|
const MOZ_MUST_OVERRIDE override;
|
2011-04-12 10:18:44 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the style rule that RulesMatching should add for
|
|
|
|
* aStyleContext. This might be different from what RulesMatching
|
|
|
|
* actually added during aStyleContext's construction because the
|
|
|
|
* element's animation-name may have changed. (However, this does
|
|
|
|
* return null during the non-animation restyling phase, as
|
|
|
|
* RulesMatching does.)
|
|
|
|
*
|
|
|
|
* aStyleContext may be a style context for aElement or for its
|
|
|
|
* :before or :after pseudo-element.
|
|
|
|
*/
|
|
|
|
nsIStyleRule* CheckAnimationRule(nsStyleContext* aStyleContext,
|
|
|
|
mozilla::dom::Element* aElement);
|
|
|
|
|
2015-07-29 04:57:39 +03:00
|
|
|
/**
|
|
|
|
* Add a pending event.
|
|
|
|
*/
|
2015-07-29 04:57:39 +03:00
|
|
|
void QueueEvent(mozilla::AnimationEventInfo&& aEventInfo)
|
|
|
|
{
|
|
|
|
mEventDispatcher.QueueEvent(
|
|
|
|
mozilla::Forward<mozilla::AnimationEventInfo>(aEventInfo));
|
|
|
|
}
|
2015-07-29 04:57:39 +03:00
|
|
|
|
2011-04-12 10:18:44 +04:00
|
|
|
/**
|
|
|
|
* Dispatch any pending events. We accumulate animationend and
|
|
|
|
* animationiteration events only during refresh driver notifications
|
|
|
|
* (and dispatch them at the end of such notifications), but we
|
|
|
|
* accumulate animationstart events at other points when style
|
|
|
|
* contexts are created.
|
|
|
|
*/
|
2015-07-29 04:57:39 +03:00
|
|
|
void DispatchEvents() { mEventDispatcher.DispatchEvents(mPresContext); }
|
|
|
|
void ClearEventQueue() { mEventDispatcher.ClearEventQueue(); }
|
2015-07-29 04:57:39 +03:00
|
|
|
|
2015-09-15 00:42:00 +03:00
|
|
|
// Stop animations on the element. This method takes the real element
|
|
|
|
// rather than the element for the generated content for animations on
|
|
|
|
// ::before and ::after.
|
|
|
|
void StopAnimationsForElement(mozilla::dom::Element* aElement,
|
|
|
|
nsCSSPseudoElements::Type aPseudoType);
|
|
|
|
|
2014-11-20 05:48:41 +03:00
|
|
|
protected:
|
2015-07-29 04:57:39 +03:00
|
|
|
virtual ~nsAnimationManager() {}
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIAtom* GetAnimationsAtom() override {
|
2014-11-20 05:48:41 +03:00
|
|
|
return nsGkAtoms::animationsProperty;
|
|
|
|
}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIAtom* GetAnimationsBeforeAtom() override {
|
2014-11-20 05:48:41 +03:00
|
|
|
return nsGkAtoms::animationsOfBeforeProperty;
|
|
|
|
}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIAtom* GetAnimationsAfterAtom() override {
|
2014-11-20 05:48:41 +03:00
|
|
|
return nsGkAtoms::animationsOfAfterProperty;
|
|
|
|
}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool IsAnimationManager() override {
|
2014-11-20 05:48:41 +03:00
|
|
|
return true;
|
|
|
|
}
|
2012-12-12 01:12:43 +04:00
|
|
|
|
2015-07-29 04:57:39 +03:00
|
|
|
mozilla::DelayedEventDispatcher<mozilla::AnimationEventInfo> mEventDispatcher;
|
|
|
|
|
2012-12-12 01:12:43 +04:00
|
|
|
private:
|
2011-04-12 10:18:44 +04:00
|
|
|
void BuildAnimations(nsStyleContext* aStyleContext,
|
2014-10-02 10:14:15 +04:00
|
|
|
mozilla::dom::Element* aTarget,
|
2015-04-28 05:29:13 +03:00
|
|
|
mozilla::dom::AnimationTimeline* aTimeline,
|
2015-04-21 04:22:10 +03:00
|
|
|
mozilla::AnimationPtrArray& aAnimations);
|
2014-04-03 09:57:28 +04:00
|
|
|
bool BuildSegment(InfallibleTArray<mozilla::AnimationPropertySegment>&
|
2014-04-03 09:57:28 +04:00
|
|
|
aSegments,
|
2014-06-27 03:57:11 +04:00
|
|
|
nsCSSProperty aProperty,
|
|
|
|
const mozilla::StyleAnimation& aAnimation,
|
2011-04-12 10:18:44 +04:00
|
|
|
float aFromKey, nsStyleContext* aFromContext,
|
|
|
|
mozilla::css::Declaration* aFromDeclaration,
|
2011-04-23 05:36:23 +04:00
|
|
|
float aToKey, nsStyleContext* aToContext);
|
2011-04-12 10:18:44 +04:00
|
|
|
|
2015-04-01 01:05:54 +03:00
|
|
|
static void UpdateCascadeResults(nsStyleContext* aStyleContext,
|
2015-04-21 04:22:10 +03:00
|
|
|
mozilla::AnimationCollection*
|
2015-04-01 01:05:54 +03:00
|
|
|
aElementAnimations);
|
2011-04-12 10:18:44 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* !defined(nsAnimationManager_h_) */
|