Bug 1203009 part 2 - Remove {CSSAnimation,CSSTransition}::OwningElement() getter; r=heycam

This doesn't really save us much, but we don't need this method so we may
as well drop it.
This commit is contained in:
Brian Birtles 2015-09-15 11:20:33 +09:00
Родитель 3d0a063444
Коммит f64b384fb1
4 изменённых файлов: 39 добавлений и 43 удалений

Просмотреть файл

@ -154,11 +154,11 @@ CSSAnimation::HasLowerCompositeOrderThan(const Animation& aOther) const
}
// 3. Sort by document order
MOZ_ASSERT(mOwningElement.IsSet() && otherAnimation->OwningElement().IsSet(),
MOZ_ASSERT(mOwningElement.IsSet() && otherAnimation->mOwningElement.IsSet(),
"Animations using custom composite order should have an "
"owning element");
if (!mOwningElement.Equals(otherAnimation->OwningElement())) {
return mOwningElement.LessThan(otherAnimation->OwningElement());
if (!mOwningElement.Equals(otherAnimation->mOwningElement)) {
return mOwningElement.LessThan(otherAnimation->mOwningElement);
}
// 4. (Same element and pseudo): Sort by position in animation-name

Просмотреть файл

@ -125,28 +125,10 @@ public:
mAnimationIndex = aOther.mAnimationIndex;
}
// Returns the element or pseudo-element whose animation-name property
// this CSSAnimation corresponds to (if any). 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 returned owning element will return !IsSet().
const OwningElementRef& OwningElement() const { return mOwningElement; }
// Sets the owning element which is used for determining the composite
// order of CSSAnimation objects generated from CSS markup.
//
// @see OwningElement()
// @see mOwningElement
void SetOwningElement(const OwningElementRef& aElement)
{
mOwningElement = aElement;
@ -171,6 +153,22 @@ protected:
// The (pseudo-)element whose computed animation-name refers to this
// animation (if any).
//
// 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().
OwningElementRef mOwningElement;
// When combining animation-play-state with play() / pause() the following

Просмотреть файл

@ -197,11 +197,11 @@ CSSTransition::HasLowerCompositeOrderThan(const Animation& aOther) const
}
// 3. Sort by document order
MOZ_ASSERT(mOwningElement.IsSet() && otherTransition->OwningElement().IsSet(),
MOZ_ASSERT(mOwningElement.IsSet() && otherTransition->mOwningElement.IsSet(),
"Transitions using custom composite order should have an owning "
"element");
if (!mOwningElement.Equals(otherTransition->OwningElement())) {
return mOwningElement.LessThan(otherTransition->OwningElement());
if (!mOwningElement.Equals(otherTransition->mOwningElement)) {
return mOwningElement.LessThan(otherTransition->mOwningElement);
}
// 4. (Same element and pseudo): Sort by transition generation

Просмотреть файл

@ -134,27 +134,10 @@ public:
mAnimationIndex = aIndex;
}
// Returns the element or pseudo-element whose transition-property property
// this CSSTransition corresponds to (if any). 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 returned owning element will return !IsSet().
const OwningElementRef& OwningElement() const { return mOwningElement; }
// Sets the owning element which is used for determining the composite
// oder of CSSTransition objects generated from CSS markup.
//
// @see OwningElement()
// @see mOwningElement
void SetOwningElement(const OwningElementRef& aElement)
{
mOwningElement = aElement;
@ -174,6 +157,21 @@ protected:
// The (pseudo-)element whose computed transition-property refers to this
// transition (if any).
//
// 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().
OwningElementRef mOwningElement;
bool mWasFinishedOnLastTick;