2017-10-27 20:33:53 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
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/. */
|
2009-10-08 07:22:42 +04:00
|
|
|
|
|
|
|
/* Code to start and animate CSS transitions. */
|
|
|
|
|
|
|
|
#ifndef nsTransitionManager_h_
|
|
|
|
#define nsTransitionManager_h_
|
|
|
|
|
2016-10-19 09:16:51 +03:00
|
|
|
#include "mozilla/ComputedTiming.h"
|
2016-01-06 05:04:05 +03:00
|
|
|
#include "mozilla/EffectCompositor.h" // For EffectCompositor::CascadeLevel
|
2015-04-21 04:22:09 +03:00
|
|
|
#include "mozilla/dom/Animation.h"
|
2018-05-07 05:07:06 +03:00
|
|
|
#include "mozilla/dom/KeyframeEffect.h"
|
2011-04-12 10:18:43 +04:00
|
|
|
#include "AnimationCommon.h"
|
2018-01-27 15:17:27 +03:00
|
|
|
#include "nsISupportsImpl.h"
|
2009-10-08 07:22:42 +04:00
|
|
|
|
2015-04-28 09:48:35 +03:00
|
|
|
class nsIGlobalObject;
|
2009-10-08 07:22:42 +04:00
|
|
|
class nsPresContext;
|
2016-08-17 04:46:58 +03:00
|
|
|
class nsCSSPropertyIDSet;
|
2012-07-31 21:28:21 +04:00
|
|
|
|
2014-06-27 03:57:12 +04:00
|
|
|
namespace mozilla {
|
2018-03-22 21:20:41 +03:00
|
|
|
class ComputedStyle;
|
2016-02-17 23:37:00 +03:00
|
|
|
enum class CSSPseudoElementType : uint8_t;
|
2016-04-01 03:27:57 +03:00
|
|
|
struct Keyframe;
|
2014-06-27 03:57:12 +04:00
|
|
|
struct StyleTransition;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace mozilla
|
2014-06-27 03:57:12 +04:00
|
|
|
|
2012-07-31 21:28:21 +04:00
|
|
|
/*****************************************************************************
|
|
|
|
* Per-Element data *
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2014-06-27 03:57:12 +04:00
|
|
|
namespace mozilla {
|
|
|
|
|
2018-05-07 05:08:59 +03:00
|
|
|
struct ElementPropertyTransition : public dom::KeyframeEffect
|
2012-07-31 21:28:21 +04:00
|
|
|
{
|
2014-08-10 11:06:52 +04:00
|
|
|
ElementPropertyTransition(nsIDocument* aDocument,
|
2016-04-28 18:22:44 +03:00
|
|
|
Maybe<OwningAnimationTarget>& aTarget,
|
2016-01-19 13:33:56 +03:00
|
|
|
const TimingParams &aTiming,
|
2017-03-09 07:33:15 +03:00
|
|
|
AnimationValue aStartForReversingTest,
|
2016-05-05 10:41:03 +03:00
|
|
|
double aReversePortion,
|
|
|
|
const KeyframeEffectParams& aEffectOptions)
|
2018-05-07 05:08:59 +03:00
|
|
|
: dom::KeyframeEffect(aDocument, aTarget, aTiming, aEffectOptions)
|
2016-02-19 10:43:06 +03:00
|
|
|
, mStartForReversingTest(aStartForReversingTest)
|
2016-01-19 13:33:56 +03:00
|
|
|
, mReversePortion(aReversePortion)
|
2014-10-02 10:14:15 +04:00
|
|
|
{ }
|
2014-07-16 04:02:30 +04:00
|
|
|
|
2015-06-09 05:13:53 +03:00
|
|
|
ElementPropertyTransition* AsTransition() override { return this; }
|
|
|
|
const ElementPropertyTransition* AsTransition() const override
|
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
2014-05-15 03:38:37 +04:00
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID TransitionProperty() const {
|
2016-05-13 03:40:52 +03:00
|
|
|
MOZ_ASSERT(mKeyframes.Length() == 2,
|
|
|
|
"Transitions should have exactly two animation keyframes. "
|
2015-04-14 03:11:44 +03:00
|
|
|
"Perhaps we are using an un-initialized transition?");
|
2016-05-13 03:40:52 +03:00
|
|
|
MOZ_ASSERT(mKeyframes[0].mPropertyValues.Length() == 1,
|
2016-04-21 11:05:46 +03:00
|
|
|
"Transitions should have exactly one property in their first "
|
|
|
|
"frame");
|
2016-05-13 03:40:52 +03:00
|
|
|
return mKeyframes[0].mPropertyValues[0].mProperty;
|
2015-04-14 03:11:44 +03:00
|
|
|
}
|
|
|
|
|
2017-03-09 07:33:15 +03:00
|
|
|
AnimationValue ToValue() const {
|
2016-04-21 11:05:46 +03:00
|
|
|
// If we failed to generate properties from the transition frames,
|
|
|
|
// return a null value but also show a warning since we should be
|
|
|
|
// detecting that kind of situation in advance and not generating a
|
|
|
|
// transition in the first place.
|
|
|
|
if (mProperties.Length() < 1 ||
|
|
|
|
mProperties[0].mSegments.Length() < 1) {
|
|
|
|
NS_WARNING("Failed to generate transition property values");
|
2017-03-09 07:33:15 +03:00
|
|
|
return AnimationValue();
|
2016-04-21 11:05:46 +03:00
|
|
|
}
|
2017-03-09 07:33:15 +03:00
|
|
|
return mProperties[0].mSegments[0].mToValue;
|
2016-02-19 10:43:06 +03:00
|
|
|
}
|
2016-04-21 11:05:46 +03:00
|
|
|
|
2012-07-31 21:28:21 +04:00
|
|
|
// This is the start value to be used for a check for whether a
|
2014-04-03 09:57:27 +04:00
|
|
|
// transition is being reversed. Normally the same as
|
|
|
|
// mProperties[0].mSegments[0].mFromValue, except when this transition
|
|
|
|
// started as the reversal of another in-progress transition.
|
|
|
|
// Needed so we can handle two reverses in a row.
|
2017-03-09 07:33:15 +03:00
|
|
|
AnimationValue mStartForReversingTest;
|
2012-07-31 21:28:21 +04:00
|
|
|
// Likewise, the portion (in value space) of the "full" reversed
|
|
|
|
// transition that we're actually covering. For example, if a :hover
|
|
|
|
// effect has a transition that moves the element 10px to the right
|
|
|
|
// (by changing 'left' from 0px to 10px), and the mouse moves in to
|
|
|
|
// the element (starting the transition) but then moves out after the
|
|
|
|
// transition has advanced 4px, the second transition (from 10px/4px
|
|
|
|
// to 0px) will have mReversePortion of 0.4. (If the mouse then moves
|
|
|
|
// in again when the transition is back to 2px, the mReversePortion
|
|
|
|
// for the third transition (from 0px/2px to 10px) will be 0.8.
|
|
|
|
double mReversePortion;
|
2012-07-31 21:28:22 +04:00
|
|
|
|
2012-07-31 21:28:21 +04:00
|
|
|
// Compute the portion of the *value* space that we should be through
|
2014-07-16 04:02:32 +04:00
|
|
|
// at the current time. (The input to the transition timing function
|
2012-07-31 21:28:21 +04:00
|
|
|
// has time units, the output has value units.)
|
2014-07-16 04:02:32 +04:00
|
|
|
double CurrentValuePortion() const;
|
2016-05-24 23:51:57 +03:00
|
|
|
|
|
|
|
// For a new transition interrupting an existing transition on the
|
|
|
|
// compositor, update the start value to match the value of the replaced
|
|
|
|
// transitions at the current time.
|
|
|
|
void UpdateStartValueFromReplacedTransition();
|
|
|
|
|
|
|
|
struct ReplacedTransitionProperties {
|
|
|
|
TimeDuration mStartTime;
|
|
|
|
double mPlaybackRate;
|
|
|
|
TimingParams mTiming;
|
|
|
|
Maybe<ComputedTimingFunction> mTimingFunction;
|
2017-03-09 07:33:15 +03:00
|
|
|
AnimationValue mFromValue, mToValue;
|
2016-05-24 23:51:57 +03:00
|
|
|
};
|
|
|
|
Maybe<ReplacedTransitionProperties> mReplacedTransition;
|
2012-07-31 21:28:21 +04:00
|
|
|
};
|
2012-07-31 21:28:22 +04:00
|
|
|
|
2015-06-30 04:00:39 +03:00
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class CSSTransition final : public Animation
|
2014-11-17 07:45:57 +03:00
|
|
|
{
|
|
|
|
public:
|
2015-04-28 11:21:58 +03:00
|
|
|
explicit CSSTransition(nsIGlobalObject* aGlobal)
|
|
|
|
: dom::Animation(aGlobal)
|
2016-10-19 09:16:51 +03:00
|
|
|
, mPreviousTransitionPhase(TransitionPhase::Idle)
|
2015-09-15 05:20:33 +03:00
|
|
|
, mNeedsNewAnimationIndexWhenRun(false)
|
2016-07-28 06:20:13 +03:00
|
|
|
, mTransitionProperty(eCSSProperty_UNKNOWN)
|
2014-11-17 07:45:57 +03: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
|
|
|
CSSTransition* AsCSSTransition() override { return this; }
|
|
|
|
const CSSTransition* AsCSSTransition() const override { return this; }
|
2014-11-17 07:45:57 +03:00
|
|
|
|
2015-07-01 06:27:48 +03:00
|
|
|
// CSSTransition interface
|
2015-07-01 09:19:04 +03:00
|
|
|
void GetTransitionProperty(nsString& aRetVal) const;
|
2015-07-01 06:27:48 +03:00
|
|
|
|
|
|
|
// Animation interface overrides
|
2017-11-21 11:10:59 +03:00
|
|
|
AnimationPlayState PlayStateFromJS() const override;
|
|
|
|
bool PendingFromJS() const override;
|
|
|
|
void PlayFromJS(ErrorResult& aRv) override;
|
2014-11-17 07:45:58 +03:00
|
|
|
|
2014-12-04 19:28:38 +03:00
|
|
|
// A variant of Play() that avoids posting style updates since this method
|
|
|
|
// is expected to be called whilst already updating style.
|
2015-05-19 08:00:48 +03:00
|
|
|
void PlayFromStyle()
|
|
|
|
{
|
|
|
|
ErrorResult rv;
|
2016-05-31 03:42:37 +03:00
|
|
|
PlayNoUpdate(rv, Animation::LimitBehavior::Continue);
|
2015-05-19 08:00:48 +03:00
|
|
|
// play() should not throw when LimitBehavior is Continue
|
|
|
|
MOZ_ASSERT(!rv.Failed(), "Unexpected exception playing transition");
|
|
|
|
}
|
2014-12-04 19:28:38 +03:00
|
|
|
|
2015-06-09 05:13:53 +03:00
|
|
|
void CancelFromStyle() override
|
|
|
|
{
|
2015-09-15 05:20:56 +03:00
|
|
|
// The animation index to use for compositing will be established when
|
|
|
|
// this transition next transitions out of the idle state but we still
|
|
|
|
// update it now so that the sort order of this transition remains
|
|
|
|
// defined until that moment.
|
|
|
|
//
|
|
|
|
// See longer explanation in CSSAnimation::CancelFromStyle.
|
|
|
|
mAnimationIndex = sNextAnimationIndex++;
|
|
|
|
mNeedsNewAnimationIndexWhenRun = true;
|
|
|
|
|
2015-06-09 05:13:53 +03:00
|
|
|
Animation::CancelFromStyle();
|
2016-01-13 01:54:53 +03:00
|
|
|
|
|
|
|
// It is important we do this *after* calling CancelFromStyle().
|
|
|
|
// This is because CancelFromStyle() will end up posting a restyle and
|
|
|
|
// that restyle should target the *transitions* level of the cascade.
|
|
|
|
// However, once we clear the owning element, CascadeLevel() will begin
|
|
|
|
// returning CascadeLevel::Animations.
|
|
|
|
mOwningElement = OwningElementRef();
|
2015-06-09 05:13:54 +03:00
|
|
|
}
|
|
|
|
|
2018-05-07 05:15:16 +03:00
|
|
|
void SetEffectFromStyle(AnimationEffect* aEffect);
|
2016-08-24 09:36:14 +03:00
|
|
|
|
2015-07-29 04:57:40 +03:00
|
|
|
void Tick() override;
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID TransitionProperty() const;
|
2017-03-09 07:33:15 +03:00
|
|
|
AnimationValue ToValue() const;
|
2015-06-09 05:13:54 +03:00
|
|
|
|
2016-01-14 04:24:24 +03:00
|
|
|
bool HasLowerCompositeOrderThan(const CSSTransition& aOther) const;
|
2016-01-06 05:04:05 +03:00
|
|
|
EffectCompositor::CascadeLevel CascadeLevel() const override
|
|
|
|
{
|
|
|
|
return IsTiedToMarkup() ?
|
|
|
|
EffectCompositor::CascadeLevel::Transitions :
|
|
|
|
EffectCompositor::CascadeLevel::Animations;
|
|
|
|
}
|
2016-01-06 05:04:05 +03:00
|
|
|
|
2015-06-09 05:13:54 +03:00
|
|
|
void SetCreationSequence(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:53 +03:00
|
|
|
}
|
|
|
|
|
2015-06-09 05:13:54 +03:00
|
|
|
// Sets the owning element which is used for determining the composite
|
|
|
|
// oder of CSSTransition 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 transitions 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
|
|
|
|
2016-05-24 23:51:57 +03:00
|
|
|
// Return the animation current time based on a given TimeStamp, a given
|
|
|
|
// start time and a given playbackRate on a given timeline. This is useful
|
|
|
|
// when we estimate the current animated value running on the compositor
|
|
|
|
// because the animation on the compositor may be running ahead while
|
|
|
|
// main-thread is busy.
|
|
|
|
static Nullable<TimeDuration> GetCurrentTimeAt(
|
|
|
|
const DocumentTimeline& aTimeline,
|
|
|
|
const TimeStamp& aBaseTime,
|
|
|
|
const TimeDuration& aStartTime,
|
|
|
|
double aPlaybackRate);
|
|
|
|
|
2018-01-17 12:05:03 +03:00
|
|
|
void MaybeQueueCancelEvent(const StickyTimeDuration& aActiveTime) override {
|
2016-12-20 10:03:29 +03:00
|
|
|
QueueEvents(aActiveTime);
|
|
|
|
}
|
|
|
|
|
2014-11-17 07:45:57 +03:00
|
|
|
protected:
|
2015-06-09 05:13:53 +03:00
|
|
|
virtual ~CSSTransition()
|
|
|
|
{
|
2015-06-09 05:13:54 +03:00
|
|
|
MOZ_ASSERT(!mOwningElement.IsSet(), "Owning element should be cleared "
|
|
|
|
"before a CSS transition is destroyed");
|
2015-06-09 05:13:53 +03:00
|
|
|
}
|
2014-11-17 07:45:58 +03:00
|
|
|
|
2015-09-15 05:20:56 +03:00
|
|
|
// Animation overrides
|
|
|
|
void UpdateTiming(SeekFlag aSeekFlag,
|
|
|
|
SyncNotifyFlag aSyncNotifyFlag) override;
|
2015-06-09 05:13:53 +03:00
|
|
|
|
2018-01-17 12:05:03 +03:00
|
|
|
void QueueEvents(const StickyTimeDuration& activeTime = StickyTimeDuration());
|
2015-07-29 04:57:40 +03:00
|
|
|
|
2016-12-20 10:03:29 +03:00
|
|
|
|
|
|
|
enum class TransitionPhase;
|
|
|
|
|
2015-06-09 05:13:53 +03:00
|
|
|
// The (pseudo-)element whose computed transition-property refers to this
|
|
|
|
// transition (if any).
|
2015-09-15 05:20:33 +03:00
|
|
|
//
|
|
|
|
// This is used for determining the relative composite order of transitions
|
|
|
|
// generated from CSS markup.
|
|
|
|
//
|
|
|
|
// Typically this will be the same as the target element of the keyframe
|
|
|
|
// effect associated with this transition. However, it can differ in the
|
|
|
|
// following circumstances:
|
|
|
|
//
|
|
|
|
// a) If script removes or replaces the effect of this transition,
|
|
|
|
// b) If this transition is cancelled (e.g. by updating the
|
|
|
|
// transition-property or removing the owning element from the document),
|
|
|
|
// c) If this object is generated from script using the CSSTransition
|
|
|
|
// constructor.
|
|
|
|
//
|
|
|
|
// For (b) and (c) the owning element will return !IsSet().
|
2015-06-09 05:13:54 +03:00
|
|
|
OwningElementRef mOwningElement;
|
2015-07-29 04:57:40 +03:00
|
|
|
|
2016-10-19 09:16:51 +03:00
|
|
|
// The 'transition phase' used to determine which transition events need
|
|
|
|
// to be queued on this tick.
|
|
|
|
// See: https://drafts.csswg.org/css-transitions-2/#transition-phase
|
|
|
|
enum class TransitionPhase {
|
2017-01-25 09:43:57 +03:00
|
|
|
Idle = static_cast<int>(ComputedTiming::AnimationPhase::Idle),
|
2016-10-19 09:16:51 +03:00
|
|
|
Before = static_cast<int>(ComputedTiming::AnimationPhase::Before),
|
|
|
|
Active = static_cast<int>(ComputedTiming::AnimationPhase::Active),
|
|
|
|
After = static_cast<int>(ComputedTiming::AnimationPhase::After),
|
|
|
|
Pending
|
|
|
|
};
|
|
|
|
TransitionPhase mPreviousTransitionPhase;
|
2015-09-15 05:20:33 +03:00
|
|
|
|
|
|
|
// When true, indicates that when this transition next leaves the idle state,
|
|
|
|
// its animation index should be updated.
|
|
|
|
bool mNeedsNewAnimationIndexWhenRun;
|
2016-07-28 06:20:13 +03:00
|
|
|
|
|
|
|
// Store the transition property and to-value here since we need that
|
|
|
|
// information in order to determine if there is an existing transition
|
|
|
|
// for a given style change. We can't store that information on the
|
|
|
|
// ElementPropertyTransition (effect) however since it can be replaced
|
|
|
|
// using the Web Animations API.
|
|
|
|
nsCSSPropertyID mTransitionProperty;
|
2017-03-09 07:33:15 +03:00
|
|
|
AnimationValue mTransitionToValue;
|
2014-11-17 07:45:57 +03:00
|
|
|
};
|
|
|
|
|
2015-06-30 04:00:39 +03:00
|
|
|
} // namespace dom
|
2015-07-29 04:57:40 +03:00
|
|
|
|
2016-03-09 06:55:39 +03:00
|
|
|
template <>
|
|
|
|
struct AnimationTypeTraits<dom::CSSTransition>
|
|
|
|
{
|
2017-10-03 01:05:19 +03:00
|
|
|
static nsAtom* ElementPropertyAtom()
|
2016-03-09 06:55:39 +03:00
|
|
|
{
|
|
|
|
return nsGkAtoms::transitionsProperty;
|
|
|
|
}
|
2017-10-03 01:05:19 +03:00
|
|
|
static nsAtom* BeforePropertyAtom()
|
2016-03-09 06:55:39 +03:00
|
|
|
{
|
|
|
|
return nsGkAtoms::transitionsOfBeforeProperty;
|
|
|
|
}
|
2017-10-03 01:05:19 +03:00
|
|
|
static nsAtom* AfterPropertyAtom()
|
2016-03-09 06:55:39 +03:00
|
|
|
{
|
|
|
|
return nsGkAtoms::transitionsOfAfterProperty;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2014-06-27 03:57:12 +04:00
|
|
|
} // namespace mozilla
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsTransitionManager final
|
2018-01-27 15:17:27 +03:00
|
|
|
: public mozilla::CommonAnimationManager<mozilla::dom::CSSTransition>
|
2011-04-12 10:18:43 +04:00
|
|
|
{
|
2009-10-08 07:22:42 +04:00
|
|
|
public:
|
2014-09-01 07:36:37 +04:00
|
|
|
explicit nsTransitionManager(nsPresContext *aPresContext)
|
2018-01-27 15:17:27 +03:00
|
|
|
: mozilla::CommonAnimationManager<mozilla::dom::CSSTransition>(aPresContext)
|
2011-04-12 10:18:43 +04:00
|
|
|
{
|
|
|
|
}
|
2009-12-23 22:10:31 +03:00
|
|
|
|
2018-04-17 01:28:00 +03:00
|
|
|
~nsTransitionManager() final = default;
|
2015-07-29 04:57:39 +03:00
|
|
|
|
2016-03-09 06:55:39 +03:00
|
|
|
typedef mozilla::AnimationCollection<mozilla::dom::CSSTransition>
|
|
|
|
CSSTransitionCollection;
|
2014-06-27 03:57:12 +04:00
|
|
|
|
2017-04-12 11:33:44 +03:00
|
|
|
/**
|
|
|
|
* Update transitions for stylo.
|
|
|
|
*/
|
|
|
|
bool UpdateTransitions(
|
|
|
|
mozilla::dom::Element *aElement,
|
|
|
|
mozilla::CSSPseudoElementType aPseudoType,
|
2018-04-10 01:03:00 +03:00
|
|
|
const mozilla::ComputedStyle& aOldStyle,
|
|
|
|
const mozilla::ComputedStyle& aNewStyle);
|
2017-04-12 11:33:44 +03:00
|
|
|
|
2014-11-20 05:48:41 +03:00
|
|
|
protected:
|
2015-07-29 04:57:40 +03:00
|
|
|
|
2016-03-09 06:55:39 +03:00
|
|
|
typedef nsTArray<RefPtr<mozilla::dom::CSSTransition>>
|
|
|
|
OwningCSSTransitionPtrArray;
|
|
|
|
|
2017-04-12 11:33:44 +03:00
|
|
|
// Update transitions. This will start new transitions,
|
|
|
|
// replace existing transitions, and stop existing transitions
|
|
|
|
// as needed. aDisp and aElement must be non-null.
|
2016-04-12 02:53:00 +03:00
|
|
|
// aElementTransitions is the collection of current transitions, and it
|
|
|
|
// could be a nullptr if we don't have any transitions.
|
2018-04-10 01:03:00 +03:00
|
|
|
bool DoUpdateTransitions(const nsStyleDisplay& aDisp,
|
|
|
|
mozilla::dom::Element* aElement,
|
|
|
|
mozilla::CSSPseudoElementType aPseudoType,
|
|
|
|
CSSTransitionCollection*& aElementTransitions,
|
|
|
|
const mozilla::ComputedStyle& aOldStyle,
|
|
|
|
const mozilla::ComputedStyle& aNewStyle);
|
|
|
|
|
2018-05-12 11:51:48 +03:00
|
|
|
// Returns whether the transition actually started.
|
|
|
|
bool ConsiderInitiatingTransition(nsCSSPropertyID aProperty,
|
2018-04-10 01:03:00 +03:00
|
|
|
const nsStyleDisplay& aStyleDisplay,
|
|
|
|
uint32_t transitionIdx,
|
|
|
|
mozilla::dom::Element* aElement,
|
|
|
|
mozilla::CSSPseudoElementType aPseudoType,
|
|
|
|
CSSTransitionCollection*& aElementTransitions,
|
|
|
|
const mozilla::ComputedStyle& aOldStyle,
|
|
|
|
const mozilla::ComputedStyle& aNewStyle,
|
2018-05-12 11:51:48 +03:00
|
|
|
nsCSSPropertyIDSet& aPropertiesChecked);
|
2009-10-08 07:22:42 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* !defined(nsTransitionManager_h_) */
|