mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1085769: Merge ContentOrAncestorHasAnimation/Transition r=birtles
This commit is contained in:
parent
3e883018cf
commit
7d60c708ba
@ -878,8 +878,7 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
||||
#ifdef DEBUG
|
||||
// reget frame from content since it may have been regenerated...
|
||||
if (changeData->mContent) {
|
||||
if (!nsAnimationManager::ContentOrAncestorHasAnimation(changeData->mContent) &&
|
||||
!nsTransitionManager::ContentOrAncestorHasTransition(changeData->mContent)) {
|
||||
if (!css::CommonAnimationManager::ContentOrAncestorHasAnimation(changeData->mContent)) {
|
||||
nsIFrame* frame = changeData->mContent->GetPrimaryFrame();
|
||||
if (frame) {
|
||||
DebugVerifyStyleTree(frame);
|
||||
|
@ -79,6 +79,19 @@ public:
|
||||
nsCSSPseudoElements::Type aPseudoType,
|
||||
bool aCreateIfNeeded);
|
||||
|
||||
// Returns true if aContent or any of its ancestors has an animation
|
||||
// or transition.
|
||||
static bool ContentOrAncestorHasAnimation(nsIContent* aContent) {
|
||||
do {
|
||||
if (aContent->GetProperty(nsGkAtoms::animationsProperty) ||
|
||||
aContent->GetProperty(nsGkAtoms::transitionsProperty)) {
|
||||
return true;
|
||||
}
|
||||
} while ((aContent = aContent->GetParent()));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Notify this manager that one of its collections of animation players,
|
||||
// has been updated.
|
||||
void NotifyCollectionUpdated(AnimationPlayerCollection& aCollection);
|
||||
|
@ -161,17 +161,6 @@ public:
|
||||
aContent, nsGkAtoms::animationsProperty, aProperty);
|
||||
}
|
||||
|
||||
// Returns true if aContent or any of its ancestors has an animation.
|
||||
static bool ContentOrAncestorHasAnimation(nsIContent* aContent) {
|
||||
do {
|
||||
if (aContent->GetProperty(nsGkAtoms::animationsProperty)) {
|
||||
return true;
|
||||
}
|
||||
} while ((aContent = aContent->GetParent()));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void UpdateStyleAndEvents(mozilla::AnimationPlayerCollection* aEA,
|
||||
mozilla::TimeStamp aRefreshTime,
|
||||
mozilla::EnsureStyleRuleFlags aFlags);
|
||||
|
@ -99,23 +99,6 @@ public:
|
||||
|
||||
typedef mozilla::AnimationPlayerCollection AnimationPlayerCollection;
|
||||
|
||||
static AnimationPlayerCollection*
|
||||
GetTransitions(nsIContent* aContent) {
|
||||
return static_cast<AnimationPlayerCollection*>
|
||||
(aContent->GetProperty(nsGkAtoms::transitionsProperty));
|
||||
}
|
||||
|
||||
// Returns true if aContent or any of its ancestors has a transition.
|
||||
static bool ContentOrAncestorHasTransition(nsIContent* aContent) {
|
||||
do {
|
||||
if (GetTransitions(aContent)) {
|
||||
return true;
|
||||
}
|
||||
} while ((aContent = aContent->GetParent()));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static AnimationPlayerCollection*
|
||||
GetAnimationsForCompositor(nsIContent* aContent, nsCSSProperty aProperty)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user