mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 880596 part 4 - Reuse ElementAnimation::HasAnimationOfProperty; r=dbaron
Now that ElementTransitionProperty inherits from ElementAnimation, ElementTransitions::HasAnimationOfProperty can re-use ElementAnimation::HasAnimationOfProperty in its definition of ElementTransitions::HasAnimationOfProperty. Similarly, in nsDisplayList::AddAnimationsAndTransitionsToLayer we can use this method rather than drilling down to the appropriate segment by hand.
This commit is contained in:
parent
e503422f93
commit
217cb32ecc
@ -464,10 +464,8 @@ nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer(Layer* aLayer,
|
||||
if (et) {
|
||||
for (uint32_t tranIdx = 0; tranIdx < et->mPropertyTransitions.Length(); tranIdx++) {
|
||||
ElementPropertyTransition* pt = &et->mPropertyTransitions[tranIdx];
|
||||
MOZ_ASSERT(pt->mProperties.Length() == 1,
|
||||
"Should have one animation property for a transition");
|
||||
if (pt->mProperties[0].mProperty != aProperty ||
|
||||
!pt->IsRunningAt(currentTime)) {
|
||||
if (!(pt->HasAnimationOfProperty(aProperty) &&
|
||||
pt->IsRunningAt(currentTime))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -137,9 +137,7 @@ ElementTransitions::HasAnimationOfProperty(nsCSSProperty aProperty) const
|
||||
{
|
||||
for (uint32_t tranIdx = mPropertyTransitions.Length(); tranIdx-- != 0; ) {
|
||||
const ElementPropertyTransition& pt = mPropertyTransitions[tranIdx];
|
||||
MOZ_ASSERT(pt.mProperties.Length() == 1,
|
||||
"Should have one animation property for a transition");
|
||||
if (aProperty == pt.mProperties[0].mProperty && !pt.IsRemovedSentinel()) {
|
||||
if (pt.HasAnimationOfProperty(aProperty) && !pt.IsRemovedSentinel()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user