зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1203009 part 5 - Remove IsUsingCustomCompositeOrder; r=heycam
This commit is contained in:
Родитель
25e9bf79fe
Коммит
1bb17c4634
|
@ -268,14 +268,6 @@ public:
|
|||
* Returns true if this Animation has a lower composite order than aOther.
|
||||
*/
|
||||
virtual bool HasLowerCompositeOrderThan(const Animation& aOther) const;
|
||||
/**
|
||||
* Returns true if this Animation is involved in some sort of
|
||||
* custom composite ordering (such as the ordering defined for CSS
|
||||
* animations or CSS transitions).
|
||||
*
|
||||
* When this is true, this class will not update the sequence number.
|
||||
*/
|
||||
virtual bool IsUsingCustomCompositeOrder() const { return false; }
|
||||
|
||||
void SetIsRunningOnCompositor() { mIsRunningOnCompositor = true; }
|
||||
void ClearIsRunningOnCompositor() { mIsRunningOnCompositor = false; }
|
||||
|
|
|
@ -141,22 +141,18 @@ CSSAnimation::HasLowerCompositeOrderThan(const Animation& aOther) const
|
|||
return false;
|
||||
}
|
||||
|
||||
// 2. CSS animations using custom composite ordering (i.e. those that
|
||||
// correspond to an animation-name property) sort lower than other CSS
|
||||
// animations (e.g. those created or kept-alive by script).
|
||||
if (!IsUsingCustomCompositeOrder()) {
|
||||
return !aOther.IsUsingCustomCompositeOrder() ?
|
||||
// 2. CSS animations that correspond to an animation-name property sort lower
|
||||
// than other CSS animations (e.g. those created or kept-alive by script).
|
||||
if (!IsTiedToMarkup()) {
|
||||
return !otherAnimation->IsTiedToMarkup() ?
|
||||
Animation::HasLowerCompositeOrderThan(aOther) :
|
||||
false;
|
||||
}
|
||||
if (!aOther.IsUsingCustomCompositeOrder()) {
|
||||
if (!otherAnimation->IsTiedToMarkup()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 3. Sort by document order
|
||||
MOZ_ASSERT(mOwningElement.IsSet() && otherAnimation->mOwningElement.IsSet(),
|
||||
"Animations using custom composite order should have an "
|
||||
"owning element");
|
||||
if (!mOwningElement.Equals(otherAnimation->mOwningElement)) {
|
||||
return mOwningElement.LessThan(otherAnimation->mOwningElement);
|
||||
}
|
||||
|
|
|
@ -122,20 +122,15 @@ public:
|
|||
bool IsStylePaused() const { return mIsStylePaused; }
|
||||
|
||||
bool HasLowerCompositeOrderThan(const Animation& aOther) const override;
|
||||
bool IsUsingCustomCompositeOrder() const override
|
||||
{
|
||||
return mOwningElement.IsSet();
|
||||
}
|
||||
|
||||
void SetAnimationIndex(uint64_t aIndex)
|
||||
{
|
||||
MOZ_ASSERT(IsUsingCustomCompositeOrder());
|
||||
MOZ_ASSERT(IsTiedToMarkup());
|
||||
mAnimationIndex = aIndex;
|
||||
}
|
||||
void CopyAnimationIndex(const CSSAnimation& aOther)
|
||||
{
|
||||
MOZ_ASSERT(IsUsingCustomCompositeOrder() &&
|
||||
aOther.IsUsingCustomCompositeOrder());
|
||||
MOZ_ASSERT(IsTiedToMarkup() && aOther.IsTiedToMarkup());
|
||||
mAnimationIndex = aOther.mAnimationIndex;
|
||||
}
|
||||
|
||||
|
@ -147,6 +142,9 @@ public:
|
|||
{
|
||||
mOwningElement = aElement;
|
||||
}
|
||||
// True for animations that are generated from CSS markup and continue to
|
||||
// reflect changes to that markup.
|
||||
bool IsTiedToMarkup() const { return mOwningElement.IsSet(); }
|
||||
|
||||
// Is this animation currently in effect for the purposes of computing
|
||||
// mWinsInCascade. (In general, this can be computed from the timing
|
||||
|
|
|
@ -199,19 +199,16 @@ CSSTransition::HasLowerCompositeOrderThan(const Animation& aOther) const
|
|||
|
||||
// 2. CSS transitions that correspond to a transition-property property sort
|
||||
// lower than CSS transitions owned by script.
|
||||
if (!IsUsingCustomCompositeOrder()) {
|
||||
return !aOther.IsUsingCustomCompositeOrder() ?
|
||||
if (!IsTiedToMarkup()) {
|
||||
return !otherTransition->IsTiedToMarkup() ?
|
||||
Animation::HasLowerCompositeOrderThan(aOther) :
|
||||
false;
|
||||
}
|
||||
if (!aOther.IsUsingCustomCompositeOrder()) {
|
||||
if (!otherTransition->IsTiedToMarkup()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 3. Sort by document order
|
||||
MOZ_ASSERT(mOwningElement.IsSet() && otherTransition->mOwningElement.IsSet(),
|
||||
"Transitions using custom composite order should have an owning "
|
||||
"element");
|
||||
if (!mOwningElement.Equals(otherTransition->mOwningElement)) {
|
||||
return mOwningElement.LessThan(otherTransition->mOwningElement);
|
||||
}
|
||||
|
|
|
@ -133,14 +133,9 @@ public:
|
|||
nsCSSProperty TransitionProperty() const;
|
||||
|
||||
bool HasLowerCompositeOrderThan(const Animation& aOther) const override;
|
||||
bool IsUsingCustomCompositeOrder() const override
|
||||
{
|
||||
return mOwningElement.IsSet();
|
||||
}
|
||||
|
||||
void SetCreationSequence(uint64_t aIndex)
|
||||
{
|
||||
MOZ_ASSERT(IsUsingCustomCompositeOrder());
|
||||
MOZ_ASSERT(IsTiedToMarkup());
|
||||
mAnimationIndex = aIndex;
|
||||
}
|
||||
|
||||
|
@ -152,6 +147,9 @@ public:
|
|||
{
|
||||
mOwningElement = aElement;
|
||||
}
|
||||
// True for transitions that are generated from CSS markup and continue to
|
||||
// reflect changes to that markup.
|
||||
bool IsTiedToMarkup() const { return mOwningElement.IsSet(); }
|
||||
|
||||
protected:
|
||||
virtual ~CSSTransition()
|
||||
|
|
Загрузка…
Ссылка в новой задаче