From 044369121ccec6bf504e63b4166338cab9eb73bd Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Mon, 11 Jul 2016 17:28:19 +0900 Subject: [PATCH] Bug 1285407 - Part 4: Drop EffectCompositor::MaybeUpdateCascadeResults(Element*, CSSPseudoElementType) because it's essentially the same as another one. r=birtles MozReview-Commit-ID: 2Locox5zmP4 --HG-- extra : rebase_source : 8970da8d3081e959a6ceef84ae6dcaf65718f93e --- dom/animation/EffectCompositor.cpp | 22 +++------------------- dom/animation/EffectCompositor.h | 6 ------ 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/dom/animation/EffectCompositor.cpp b/dom/animation/EffectCompositor.cpp index 76187e3dbf2f..3d1e429da3fe 100644 --- a/dom/animation/EffectCompositor.cpp +++ b/dom/animation/EffectCompositor.cpp @@ -392,7 +392,9 @@ EffectCompositor::AddStyleUpdatesTo(RestyleTracker& aTracker) } for (auto& pseudoElem : elementsToRestyle) { - MaybeUpdateCascadeResults(pseudoElem.mElement, pseudoElem.mPseudoType); + MaybeUpdateCascadeResults(pseudoElem.mElement, + pseudoElem.mPseudoType, + nullptr); ComposeAnimationRule(pseudoElem.mElement, pseudoElem.mPseudoType, @@ -476,24 +478,6 @@ EffectCompositor::MaybeUpdateCascadeResults(Element* aElement, MOZ_ASSERT(!effects->CascadeNeedsUpdate(), "Failed to update cascade state"); } -/* static */ void -EffectCompositor::MaybeUpdateCascadeResults(Element* aElement, - CSSPseudoElementType aPseudoType) -{ - nsStyleContext* styleContext = nullptr; - { - dom::Element* elementToRestyle = GetElementToRestyle(aElement, aPseudoType); - if (elementToRestyle) { - nsIFrame* frame = elementToRestyle->GetPrimaryFrame(); - if (frame) { - styleContext = frame->StyleContext(); - } - } - } - - MaybeUpdateCascadeResults(aElement, aPseudoType, styleContext); -} - namespace { class EffectCompositeOrderComparator { public: diff --git a/dom/animation/EffectCompositor.h b/dom/animation/EffectCompositor.h index 6ce946ac8154..d9a6f68f6dd7 100644 --- a/dom/animation/EffectCompositor.h +++ b/dom/animation/EffectCompositor.h @@ -185,12 +185,6 @@ public: CSSPseudoElementType aPseudoType, nsStyleContext* aStyleContext); - // An overload of MaybeUpdateCascadeResults that uses the style context - // of the primary frame of the specified (pseudo-)element, when available. - static void - MaybeUpdateCascadeResults(dom::Element* aElement, - CSSPseudoElementType aPseudoType); - // Update the mWinsInCascade member for each property in effects targetting // the specified (pseudo-)element. //