Bug 1407463 - Drop unused pseudo atom argument from GetBaseContextForElement. r?heycam draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 11 Oct 2017 10:00:37 +0900
changeset 678287 8abb6023c6d31f0ba38db39d0f3d41f392017947
parent 678286 d6ca42d98a8e51c71232419eb40cac3be4d40521
child 735273 61603a1c6f38981c7a85df62c264512f2f655b6a
push id83864
push userhikezoe@mozilla.com
push dateWed, 11 Oct 2017 01:00:54 +0000
reviewersheycam
bugs1407463
milestone58.0a1
Bug 1407463 - Drop unused pseudo atom argument from GetBaseContextForElement. r?heycam MozReview-Commit-ID: JJ2Jh1I6y4h
dom/animation/KeyframeEffectReadOnly.cpp
layout/style/ServoStyleSet.cpp
layout/style/ServoStyleSet.h
layout/style/nsComputedDOMStyle.cpp
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -552,17 +552,16 @@ KeyframeEffectReadOnly::EnsureBaseStyle(
     return;
   }
 
   if (!aBaseStyleContext) {
     aBaseStyleContext =
       aPresContext->StyleSet()->AsServo()->GetBaseContextForElement(
           mTarget->mElement,
           aPresContext,
-          nullptr,
           aPseudoType,
           aComputedStyle);
   }
   RefPtr<RawServoAnimationValue> baseValue =
     Servo_ComputedValues_ExtractAnimationValue(aBaseStyleContext,
                                                aProperty.mProperty).Consume();
   mBaseStyleValuesForServo.Put(aProperty.mProperty, baseValue);
 }
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -1214,17 +1214,16 @@ ServoStyleSet::GetAnimationValues(
                            mRawSet.get(),
                            &aAnimationValues);
 }
 
 already_AddRefed<ServoStyleContext>
 ServoStyleSet::GetBaseContextForElement(
   Element* aElement,
   nsPresContext* aPresContext,
-  nsAtom* aPseudoTag,
   CSSPseudoElementType aPseudoType,
   const ServoStyleContext* aStyle)
 {
   // Servo_StyleSet_GetBaseComputedValuesForElement below won't handle ignoring
   // existing element data for bfcached documents. (See comment in
   // ResolveStyleLazily about these bfcache issues.)
   MOZ_RELEASE_ASSERT(!aElement->OwnerDoc()->GetBFCacheEntry(),
              "GetBaseContextForElement does not support documents in the "
--- a/layout/style/ServoStyleSet.h
+++ b/layout/style/ServoStyleSet.h
@@ -384,17 +384,16 @@ public:
   nsCSSCounterStyleRule* CounterStyleRuleForName(nsAtom* aName);
 
   // Get all the currently-active font feature values set.
   already_AddRefed<gfxFontFeatureValueSet> BuildFontFeatureValueSet();
 
   already_AddRefed<ServoStyleContext>
   GetBaseContextForElement(dom::Element* aElement,
                            nsPresContext* aPresContext,
-                           nsAtom* aPseudoTag,
                            CSSPseudoElementType aPseudoType,
                            const ServoStyleContext* aStyle);
 
   /**
    * Resolve style for a given declaration block with/without the parent style.
    * If the parent style is not specified, the document default computed values
    * is used.
    */
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -710,17 +710,17 @@ nsComputedDOMStyle::DoGetStyleContextNoF
           if (presContext && presContext->StyleSet()->IsGecko()) {
             nsStyleSet* styleSet = presContext->StyleSet()->AsGecko();
             return styleSet->ResolveStyleByRemovingAnimation(
                      aElement, result->AsGecko(),
                      eRestyle_AllHintsWithAnimations);
           } else {
             return presContext->StyleSet()->AsServo()->
               GetBaseContextForElement(aElement, presContext,
-                                       aPseudo, pseudoType, result->AsServo());
+                                       pseudoType, result->AsServo());
           }
         }
 
         // this function returns an addrefed style context
         RefPtr<nsStyleContext> ret = result;
         return ret.forget();
       }
     }
@@ -743,17 +743,17 @@ nsComputedDOMStyle::DoGetStyleContextNoF
                                : StyleRuleInclusion::All;
     RefPtr<ServoStyleContext> result =
        servoSet->ResolveStyleLazily(aElement, pseudoType, rules);
     if (aAnimationFlag == eWithAnimation) {
       return result.forget();
     }
 
     return servoSet->GetBaseContextForElement(aElement, presContext,
-                                              aPseudo, pseudoType, result);
+                                              pseudoType, result);
   }
 
   RefPtr<GeckoStyleContext> parentContext;
   nsIContent* parent = aPseudo ? aElement : aElement->GetParent();
   // Don't resolve parent context for document fragments.
   if (parent && parent->IsElement()) {
     RefPtr<nsStyleContext> p =
       GetStyleContextNoFlush(parent->AsElement(), nullptr,