Bug 1159082 - Rename *Readonly animation interfaces to *ReadOnly. r=smaug

This commit is contained in:
Brian Birtles 2015-04-30 09:06:43 -04:00
parent 723de82abc
commit fb73e3f8ee
25 changed files with 76 additions and 159 deletions

View File

@ -39,7 +39,7 @@ Animation::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
// ---------------------------------------------------------------------------
void
Animation::SetEffect(KeyframeEffectReadonly* aEffect)
Animation::SetEffect(KeyframeEffectReadOnly* aEffect)
{
if (mEffect) {
mEffect->SetParentTime(Nullable<TimeDuration>());

View File

@ -12,7 +12,7 @@
#include "mozilla/TimeStamp.h" // for TimeStamp, TimeDuration
#include "mozilla/dom/AnimationBinding.h" // for AnimationPlayState
#include "mozilla/dom/DocumentTimeline.h" // for DocumentTimeline
#include "mozilla/dom/KeyframeEffect.h" // for KeyframeEffectReadonly
#include "mozilla/dom/KeyframeEffect.h" // for KeyframeEffectReadOnly
#include "mozilla/dom/Promise.h" // for Promise
#include "nsCSSProperty.h" // for nsCSSProperty
@ -86,8 +86,8 @@ public:
// Animation interface methods
KeyframeEffectReadonly* GetEffect() const { return mEffect; }
void SetEffect(KeyframeEffectReadonly* aEffect);
KeyframeEffectReadOnly* GetEffect() const { return mEffect; }
void SetEffect(KeyframeEffectReadOnly* aEffect);
DocumentTimeline* Timeline() const { return mTimeline; }
Nullable<TimeDuration> GetStartTime() const { return mStartTime; }
void SetStartTime(const Nullable<TimeDuration>& aNewStartTime);
@ -318,7 +318,7 @@ protected:
AnimationCollection* GetCollection() const;
nsRefPtr<DocumentTimeline> mTimeline;
nsRefPtr<KeyframeEffectReadonly> mEffect;
nsRefPtr<KeyframeEffectReadOnly> mEffect;
// The beginning of the delay period.
Nullable<TimeDuration> mStartTime; // Timeline timescale
Nullable<TimeDuration> mHoldTime; // Animation timescale

View File

@ -3,18 +3,18 @@
* 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/. */
#include "mozilla/dom/AnimationEffectReadonly.h"
#include "mozilla/dom/AnimationEffectReadonlyBinding.h"
#include "mozilla/dom/AnimationEffectReadOnly.h"
#include "mozilla/dom/AnimationEffectReadOnlyBinding.h"
namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AnimationEffectReadonly, mParent)
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AnimationEffectReadOnly, mParent)
NS_IMPL_CYCLE_COLLECTING_ADDREF(AnimationEffectReadonly)
NS_IMPL_CYCLE_COLLECTING_RELEASE(AnimationEffectReadonly)
NS_IMPL_CYCLE_COLLECTING_ADDREF(AnimationEffectReadOnly)
NS_IMPL_CYCLE_COLLECTING_RELEASE(AnimationEffectReadOnly)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AnimationEffectReadonly)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AnimationEffectReadOnly)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END

View File

@ -14,18 +14,18 @@
namespace mozilla {
namespace dom {
class AnimationEffectReadonly
class AnimationEffectReadOnly
: public nsISupports
, public nsWrapperCache
{
protected:
virtual ~AnimationEffectReadonly() { }
virtual ~AnimationEffectReadOnly() { }
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AnimationEffectReadonly)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AnimationEffectReadOnly)
explicit AnimationEffectReadonly(nsISupports* aParent)
explicit AnimationEffectReadOnly(nsISupports* aParent)
: mParent(aParent)
{
}

View File

@ -1,23 +0,0 @@
/* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
/* 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/. */
#include "mozilla/dom/AnimationEffectReadonly.h"
#include "mozilla/dom/AnimationEffectReadonlyBinding.h"
namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AnimationEffectReadonly, mParent)
NS_IMPL_CYCLE_COLLECTING_ADDREF(AnimationEffectReadonly)
NS_IMPL_CYCLE_COLLECTING_RELEASE(AnimationEffectReadonly)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AnimationEffectReadonly)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
} // namespace dom
} // namespace mozilla

View File

@ -1,42 +0,0 @@
/* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
/* 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/. */
#ifndef mozilla_dom_AnimationEffect_h
#define mozilla_dom_AnimationEffect_h
#include "nsISupports.h"
#include "nsWrapperCache.h"
#include "nsCycleCollectionParticipant.h"
#include "nsCOMPtr.h"
namespace mozilla {
namespace dom {
class AnimationEffectReadonly
: public nsISupports
, public nsWrapperCache
{
protected:
virtual ~AnimationEffectReadonly() { }
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AnimationEffectReadonly)
explicit AnimationEffectReadonly(nsISupports* aParent)
: mParent(aParent)
{
}
nsISupports* GetParentObject() const { return mParent; }
protected:
nsCOMPtr<nsISupports> mParent;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_AnimationEffect_h

View File

@ -59,35 +59,35 @@ const double ComputedTiming::kNullTimeFraction = PositiveInfinity<double>();
namespace dom {
NS_IMPL_CYCLE_COLLECTION_INHERITED(KeyframeEffectReadonly,
AnimationEffectReadonly,
NS_IMPL_CYCLE_COLLECTION_INHERITED(KeyframeEffectReadOnly,
AnimationEffectReadOnly,
mTarget)
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(KeyframeEffectReadonly,
AnimationEffectReadonly)
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(KeyframeEffectReadOnly,
AnimationEffectReadOnly)
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(KeyframeEffectReadonly)
NS_INTERFACE_MAP_END_INHERITING(AnimationEffectReadonly)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(KeyframeEffectReadOnly)
NS_INTERFACE_MAP_END_INHERITING(AnimationEffectReadOnly)
NS_IMPL_ADDREF_INHERITED(KeyframeEffectReadonly, AnimationEffectReadonly)
NS_IMPL_RELEASE_INHERITED(KeyframeEffectReadonly, AnimationEffectReadonly)
NS_IMPL_ADDREF_INHERITED(KeyframeEffectReadOnly, AnimationEffectReadOnly)
NS_IMPL_RELEASE_INHERITED(KeyframeEffectReadOnly, AnimationEffectReadOnly)
JSObject*
KeyframeEffectReadonly::WrapObject(JSContext* aCx,
KeyframeEffectReadOnly::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto)
{
return KeyframeEffectReadonlyBinding::Wrap(aCx, this, aGivenProto);
return KeyframeEffectReadOnlyBinding::Wrap(aCx, this, aGivenProto);
}
void
KeyframeEffectReadonly::SetParentTime(Nullable<TimeDuration> aParentTime)
KeyframeEffectReadOnly::SetParentTime(Nullable<TimeDuration> aParentTime)
{
mParentTime = aParentTime;
}
ComputedTiming
KeyframeEffectReadonly::GetComputedTimingAt(
KeyframeEffectReadOnly::GetComputedTimingAt(
const Nullable<TimeDuration>& aLocalTime,
const AnimationTiming& aTiming)
{
@ -217,7 +217,7 @@ KeyframeEffectReadonly::GetComputedTimingAt(
}
StickyTimeDuration
KeyframeEffectReadonly::ActiveDuration(const AnimationTiming& aTiming)
KeyframeEffectReadOnly::ActiveDuration(const AnimationTiming& aTiming)
{
if (aTiming.mIterationCount == mozilla::PositiveInfinity<float>()) {
// An animation that repeats forever has an infinite active duration
@ -234,7 +234,7 @@ KeyframeEffectReadonly::ActiveDuration(const AnimationTiming& aTiming)
// http://w3c.github.io/web-animations/#in-play
bool
KeyframeEffectReadonly::IsInPlay(const Animation& aAnimation) const
KeyframeEffectReadOnly::IsInPlay(const Animation& aAnimation) const
{
if (IsFinishedTransition() ||
aAnimation.PlayState() == AnimationPlayState::Finished) {
@ -246,7 +246,7 @@ KeyframeEffectReadonly::IsInPlay(const Animation& aAnimation) const
// http://w3c.github.io/web-animations/#current
bool
KeyframeEffectReadonly::IsCurrent(const Animation& aAnimation) const
KeyframeEffectReadOnly::IsCurrent(const Animation& aAnimation) const
{
if (IsFinishedTransition() ||
aAnimation.PlayState() == AnimationPlayState::Finished) {
@ -259,7 +259,7 @@ KeyframeEffectReadonly::IsCurrent(const Animation& aAnimation) const
}
bool
KeyframeEffectReadonly::IsInEffect() const
KeyframeEffectReadOnly::IsInEffect() const
{
if (IsFinishedTransition()) {
return false;
@ -270,7 +270,7 @@ KeyframeEffectReadonly::IsInEffect() const
}
const AnimationProperty*
KeyframeEffectReadonly::GetAnimationOfProperty(nsCSSProperty aProperty) const
KeyframeEffectReadOnly::GetAnimationOfProperty(nsCSSProperty aProperty) const
{
for (size_t propIdx = 0, propEnd = mProperties.Length();
propIdx != propEnd; ++propIdx) {
@ -286,7 +286,7 @@ KeyframeEffectReadonly::GetAnimationOfProperty(nsCSSProperty aProperty) const
}
bool
KeyframeEffectReadonly::HasAnimationOfProperties(
KeyframeEffectReadOnly::HasAnimationOfProperties(
const nsCSSProperty* aProperties,
size_t aPropertyCount) const
{
@ -299,7 +299,7 @@ KeyframeEffectReadonly::HasAnimationOfProperties(
}
void
KeyframeEffectReadonly::ComposeStyle(
KeyframeEffectReadOnly::ComposeStyle(
nsRefPtr<css::AnimValuesStyleRule>& aStyleRule,
nsCSSPropertySet& aSetProperties)
{

View File

@ -15,7 +15,7 @@
#include "mozilla/StickyTimeDuration.h"
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/AnimationEffectReadonly.h"
#include "mozilla/dom/AnimationEffectReadOnly.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/Nullable.h"
#include "nsSMILKeySpline.h"
@ -185,15 +185,15 @@ struct ElementPropertyTransition;
namespace dom {
class KeyframeEffectReadonly : public AnimationEffectReadonly
class KeyframeEffectReadOnly : public AnimationEffectReadOnly
{
public:
KeyframeEffectReadonly(nsIDocument* aDocument,
KeyframeEffectReadOnly(nsIDocument* aDocument,
Element* aTarget,
nsCSSPseudoElements::Type aPseudoType,
const AnimationTiming &aTiming,
const nsSubstring& aName)
: AnimationEffectReadonly(aDocument)
: AnimationEffectReadOnly(aDocument)
, mTarget(aTarget)
, mTiming(aTiming)
, mName(aName)
@ -204,8 +204,8 @@ public:
}
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(KeyframeEffectReadonly,
AnimationEffectReadonly)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(KeyframeEffectReadOnly,
AnimationEffectReadOnly)
virtual JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
@ -215,7 +215,7 @@ public:
return nullptr;
}
// KeyframeEffectReadonly interface
// KeyframeEffectReadOnly interface
Element* GetTarget() const {
// Currently we only implement Element.getAnimations() which only
// returns animations targetting Elements so this should never
@ -332,7 +332,7 @@ public:
nsCSSPropertySet& aSetProperties);
protected:
virtual ~KeyframeEffectReadonly() { }
virtual ~KeyframeEffectReadOnly() { }
nsCOMPtr<Element> mTarget;
Nullable<TimeDuration> mParentTime;

View File

@ -9,7 +9,7 @@ MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
EXPORTS.mozilla.dom += [
'Animation.h',
'AnimationEffectReadonly.h',
'AnimationEffectReadOnly.h',
'AnimationTimeline.h',
'DocumentTimeline.h',
'KeyframeEffect.h',
@ -22,7 +22,7 @@ EXPORTS.mozilla += [
UNIFIED_SOURCES += [
'Animation.cpp',
'AnimationEffectReadonly.cpp',
'AnimationEffectReadOnly.cpp',
'AnimationTimeline.cpp',
'DocumentTimeline.cpp',
'KeyframeEffect.cpp',

View File

@ -345,7 +345,7 @@ void
nsAnimationReceiver::RecordAnimationMutation(Animation* aAnimation,
AnimationMutation aMutationType)
{
KeyframeEffectReadonly* effect = aAnimation->GetEffect();
KeyframeEffectReadOnly* effect = aAnimation->GetEffect();
if (!effect) {
return;
}

View File

@ -218,7 +218,7 @@ nsNodeUtils::ContentRemoved(nsINode* aContainer,
static inline Element*
GetTarget(Animation* aAnimation)
{
KeyframeEffectReadonly* effect = aAnimation->GetEffect();
KeyframeEffectReadOnly* effect = aAnimation->GetEffect();
if (!effect) {
return nullptr;
}

View File

@ -88,7 +88,7 @@ DOMInterfaces = {
'concrete': False
},
'AnimationEffectReadonly': {
'AnimationEffectReadOnly': {
'concrete': False
},

View File

@ -132,7 +132,7 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "Animation", pref: "dom.animations-api.core.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "AnimationEffectReadonly", pref: "dom.animations-api.core.enabled"},
{name: "AnimationEffectReadOnly", pref: "dom.animations-api.core.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
"AnimationEvent",
// IMPORTANT: Do not change this list without review from a DOM peer!
@ -651,7 +651,7 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"KeyboardEvent",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "KeyframeEffectReadonly", pref: "dom.animations-api.core.enabled"},
{name: "KeyframeEffectReadOnly", pref: "dom.animations-api.core.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
"LocalMediaStream",
// IMPORTANT: Do not change this list without review from a DOM peer!

View File

@ -16,7 +16,7 @@ enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" };
interface Animation {
// Bug 1049975: Make 'effect' writeable
[Pure]
readonly attribute AnimationEffectReadonly? effect;
readonly attribute AnimationEffectReadOnly? effect;
readonly attribute AnimationTimeline timeline;
[BinaryName="startTimeAsDouble"]
attribute double? startTime;

View File

@ -11,8 +11,8 @@
*/
[Func="nsDocument::IsWebAnimationsEnabled"]
interface AnimationEffectReadonly {
interface AnimationEffectReadOnly {
// Not yet implemented:
// readonly attribute AnimationEffectTimingReadonly timing;
// readonly attribute AnimationEffectTimingReadOnly timing;
// readonly attribute ComputedTimingProperties computedTiming;
};

View File

@ -1,18 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/.
*
* The origin of this IDL file is
* http://w3c.github.io/web-animations/#animationeffectreadonly
*
* Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
[Func="nsDocument::IsWebAnimationsEnabled"]
interface AnimationEffectReadonly {
// Not yet implemented:
// readonly attribute AnimationEffectTimingReadonly timing;
// readonly attribute ComputedTimingProperties computedTiming;
};

View File

@ -12,7 +12,7 @@
[HeaderFile="mozilla/dom/KeyframeEffect.h",
Func="nsDocument::IsWebAnimationsEnabled"]
interface KeyframeEffectReadonly : AnimationEffectReadonly {
interface KeyframeEffectReadOnly : AnimationEffectReadOnly {
readonly attribute Element? target;
readonly attribute DOMString name;
// Not yet implemented:

View File

@ -23,7 +23,7 @@ WEBIDL_FILES = [
'AnalyserNode.webidl',
'Animatable.webidl',
'Animation.webidl',
'AnimationEffectReadonly.webidl',
'AnimationEffectReadOnly.webidl',
'AnimationEvent.webidl',
'AnimationTimeline.webidl',
'AnonymousContent.webidl',

View File

@ -13,7 +13,7 @@
#include "gfxPoint.h" // for gfxPoint, gfxSize
#include "mozilla/StyleAnimationValue.h" // for StyleAnimationValue, etc
#include "mozilla/WidgetUtils.h" // for ComputeTransformForRotation
#include "mozilla/dom/KeyframeEffect.h" // for KeyframeEffectReadonly
#include "mozilla/dom/KeyframeEffect.h" // for KeyframeEffectReadOnly
#include "mozilla/gfx/BaseRect.h" // for BaseRect
#include "mozilla/gfx/Point.h" // for RoundedToInt, PointTyped
#include "mozilla/gfx/Rect.h" // for RoundedToInt, RectTyped
@ -474,7 +474,7 @@ SampleAnimations(Layer* aLayer, TimeStamp aPoint)
timing.mFillMode = NS_STYLE_ANIMATION_FILL_MODE_BOTH;
ComputedTiming computedTiming =
dom::KeyframeEffectReadonly::GetComputedTimingAt(
dom::KeyframeEffectReadOnly::GetComputedTimingAt(
Nullable<TimeDuration>(elapsedDuration), timing);
MOZ_ASSERT(0.0 <= computedTiming.mTimeFraction &&

View File

@ -426,7 +426,7 @@ AddAnimationsForProperty(nsIFrame* aFrame, nsCSSProperty aProperty,
if (!anim->IsPlaying()) {
continue;
}
dom::KeyframeEffectReadonly* effect = anim->GetEffect();
dom::KeyframeEffectReadOnly* effect = anim->GetEffect();
MOZ_ASSERT(effect, "A playing animation should have an effect");
const AnimationProperty* property =
effect->GetAnimationOfProperty(aProperty);

View File

@ -505,7 +505,7 @@ GetMinAndMaxScaleForAnimationProperty(nsIContent* aContent,
if (!anim->GetEffect() || anim->GetEffect()->IsFinishedTransition()) {
continue;
}
dom::KeyframeEffectReadonly* effect = anim->GetEffect();
dom::KeyframeEffectReadOnly* effect = anim->GetEffect();
for (size_t propIdx = effect->Properties().Length(); propIdx-- != 0; ) {
AnimationProperty& prop = effect->Properties()[propIdx];
if (prop.mProperty == eCSSProperty_transform) {

View File

@ -30,7 +30,7 @@
using mozilla::layers::Layer;
using mozilla::dom::Animation;
using mozilla::dom::KeyframeEffectReadonly;
using mozilla::dom::KeyframeEffectReadOnly;
namespace mozilla {
@ -601,7 +601,7 @@ AnimationCollection::CanPerformOnCompositorThread(
continue;
}
const KeyframeEffectReadonly* effect = anim->GetEffect();
const KeyframeEffectReadOnly* effect = anim->GetEffect();
MOZ_ASSERT(effect, "A playing animation should have an effect");
for (size_t propIdx = 0, propEnd = effect->Properties().Length();
@ -620,7 +620,7 @@ AnimationCollection::CanPerformOnCompositorThread(
continue;
}
const KeyframeEffectReadonly* effect = anim->GetEffect();
const KeyframeEffectReadOnly* effect = anim->GetEffect();
MOZ_ASSERT(effect, "A playing animation should have an effect");
existsProperty = existsProperty || effect->Properties().Length() > 0;
@ -673,7 +673,7 @@ bool
AnimationCollection::HasAnimationOfProperty(nsCSSProperty aProperty) const
{
for (size_t animIdx = mAnimations.Length(); animIdx-- != 0; ) {
const KeyframeEffectReadonly* effect = mAnimations[animIdx]->GetEffect();
const KeyframeEffectReadOnly* effect = mAnimations[animIdx]->GetEffect();
if (effect && effect->HasAnimationOfProperty(aProperty) &&
!effect->IsFinishedTransition()) {
return true;
@ -922,7 +922,7 @@ AnimationCollection::HasCurrentAnimationsForProperties(
{
for (size_t animIdx = mAnimations.Length(); animIdx-- != 0; ) {
const Animation& anim = *mAnimations[animIdx];
const KeyframeEffectReadonly* effect = anim.GetEffect();
const KeyframeEffectReadOnly* effect = anim.GetEffect();
if (effect &&
effect->IsCurrent(anim) &&
effect->HasAnimationOfProperties(aProperties, aPropertyCount)) {

View File

@ -26,7 +26,7 @@ using namespace mozilla;
using namespace mozilla::css;
using mozilla::dom::Animation;
using mozilla::dom::AnimationPlayState;
using mozilla::dom::KeyframeEffectReadonly;
using mozilla::dom::KeyframeEffectReadOnly;
using mozilla::CSSAnimation;
mozilla::dom::Promise*
@ -352,8 +352,8 @@ nsAnimationManager::CheckAnimationRule(nsStyleContext* aStyleContext,
// Update the old from the new so we can keep the original object
// identity (and any expando properties attached to it).
if (oldAnim->GetEffect() && newAnim->GetEffect()) {
KeyframeEffectReadonly* oldEffect = oldAnim->GetEffect();
KeyframeEffectReadonly* newEffect = newAnim->GetEffect();
KeyframeEffectReadOnly* oldEffect = oldAnim->GetEffect();
KeyframeEffectReadOnly* newEffect = newAnim->GetEffect();
animationChanged =
oldEffect->Timing() != newEffect->Timing() ||
oldEffect->Properties() != newEffect->Properties();
@ -526,8 +526,8 @@ nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext,
timing.mDirection = src.GetDirection();
timing.mFillMode = src.GetFillMode();
nsRefPtr<KeyframeEffectReadonly> destEffect =
new KeyframeEffectReadonly(mPresContext->Document(), aTarget,
nsRefPtr<KeyframeEffectReadOnly> destEffect =
new KeyframeEffectReadOnly(mPresContext->Document(), aTarget,
aStyleContext->GetPseudoType(), timing,
src.GetName());
dest->SetEffect(destEffect);
@ -754,7 +754,7 @@ nsAnimationManager::UpdateCascadeResults(
for (size_t animIdx = aElementAnimations->mAnimations.Length();
animIdx-- != 0; ) {
const Animation* anim = aElementAnimations->mAnimations[animIdx];
const KeyframeEffectReadonly* effect = anim->GetEffect();
const KeyframeEffectReadOnly* effect = anim->GetEffect();
if (!effect) {
continue;
}
@ -802,7 +802,7 @@ nsAnimationManager::UpdateCascadeResults(
animIdx-- != 0; ) {
CSSAnimation* anim =
aElementAnimations->mAnimations[animIdx]->AsCSSAnimation();
KeyframeEffectReadonly* effect = anim->GetEffect();
KeyframeEffectReadOnly* effect = anim->GetEffect();
anim->mInEffectForCascadeResults = anim->IsInEffect();

View File

@ -34,7 +34,7 @@
using mozilla::TimeStamp;
using mozilla::TimeDuration;
using mozilla::dom::Animation;
using mozilla::dom::KeyframeEffectReadonly;
using mozilla::dom::KeyframeEffectReadOnly;
using namespace mozilla;
using namespace mozilla::css;
@ -46,7 +46,7 @@ ElementPropertyTransition::Name() const
const_cast<ElementPropertyTransition*>(this)->mName =
NS_ConvertUTF8toUTF16(nsCSSProps::GetStringValue(TransitionProperty()));
}
return dom::KeyframeEffectReadonly::Name();
return dom::KeyframeEffectReadOnly::Name();
}
double
@ -321,7 +321,7 @@ nsTransitionManager::StyleContextChanged(dom::Element *aElement,
do {
--i;
Animation* anim = animations[i];
dom::KeyframeEffectReadonly* effect = anim->GetEffect();
dom::KeyframeEffectReadOnly* effect = anim->GetEffect();
MOZ_ASSERT(effect && effect->Properties().Length() == 1,
"Should have one animation property for a transition");
MOZ_ASSERT(effect && effect->Properties()[0].mSegments.Length() == 1,
@ -633,7 +633,7 @@ nsTransitionManager::PruneCompletedTransitions(mozilla::dom::Element* aElement,
do {
--i;
Animation* anim = animations[i];
dom::KeyframeEffectReadonly* effect = anim->GetEffect();
dom::KeyframeEffectReadOnly* effect = anim->GetEffect();
if (!effect->IsFinishedTransition()) {
continue;

View File

@ -29,13 +29,13 @@ struct StyleTransition;
namespace mozilla {
struct ElementPropertyTransition : public dom::KeyframeEffectReadonly
struct ElementPropertyTransition : public dom::KeyframeEffectReadOnly
{
ElementPropertyTransition(nsIDocument* aDocument,
dom::Element* aTarget,
nsCSSPseudoElements::Type aPseudoType,
const AnimationTiming &aTiming)
: dom::KeyframeEffectReadonly(aDocument, aTarget, aPseudoType,
: dom::KeyframeEffectReadOnly(aDocument, aTarget, aPseudoType,
aTiming, EmptyString())
{ }