From a9218457d2518ea0527a4ed6b9952a499d164d2b Mon Sep 17 00:00:00 2001 From: Brian Birtles Date: Wed, 24 Feb 2016 15:42:33 +0900 Subject: [PATCH] Bug 1239945 part 2 - Drop CommonAnimationManager::ContentOrAncestorHasAnimation; r=dholbert This was added in bug 780692 to work around assertions that arose due to the inconsistent state introduced by mini-flushes. However, that workaround no longer seems necessary. In particular, the crashtest for bug 813372 no longer reports failed assertions when we remove this method and nor do any other tests. I'm not sure exactly what changed about how we do mini-flushes but I suspect it was bug 960465 or one of the related follow-ups. --- layout/base/RestyleManager.cpp | 8 +++----- layout/style/AnimationCommon.h | 13 ------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index a7111597f9cc..e73b060133bd 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -988,11 +988,9 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList) #ifdef DEBUG // reget frame from content since it may have been regenerated... if (changeData->mContent) { - if (!CommonAnimationManager::ContentOrAncestorHasAnimation(changeData->mContent)) { - nsIFrame* frame = changeData->mContent->GetPrimaryFrame(); - if (frame) { - DebugVerifyStyleTree(frame); - } + nsIFrame* frame = changeData->mContent->GetPrimaryFrame(); + if (frame) { + DebugVerifyStyleTree(frame); } } else if (!changeData->mFrame || changeData->mFrame->GetType() != nsGkAtoms::viewportFrame) { diff --git a/layout/style/AnimationCommon.h b/layout/style/AnimationCommon.h index f92c5a4f2334..ce38d3a15a13 100644 --- a/layout/style/AnimationCommon.h +++ b/layout/style/AnimationCommon.h @@ -44,19 +44,6 @@ public: */ void Disconnect(); - // 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; - } - static bool ExtractComputedValueForTransition( nsCSSProperty aProperty, nsStyleContext* aStyleContext,