Bug 1406284 - Remove unused parent context argument. r?heycam
MozReview-Commit-ID: A1yIOZ1bWjY
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -551,17 +551,16 @@ KeyframeEffectReadOnly::EnsureBaseStyle(
if (!hasAdditiveValues) {
return;
}
if (!aBaseStyleContext) {
aBaseStyleContext =
aPresContext->StyleSet()->AsServo()->GetBaseContextForElement(
mTarget->mElement,
- nullptr,
aPresContext,
nullptr,
aPseudoType,
aComputedStyle);
}
RefPtr<RawServoAnimationValue> baseValue =
Servo_ComputedValues_ExtractAnimationValue(aBaseStyleContext,
aProperty.mProperty).Consume();
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -339,17 +339,17 @@ already_AddRefed<ServoStyleContext>
ServoStyleSet::ResolveStyleFor(Element* aElement,
ServoStyleContext* aParentContext,
LazyComputeBehavior aMayCompute)
{
RefPtr<ServoStyleContext> computedValues;
if (aMayCompute == LazyComputeBehavior::Allow) {
PreTraverseSync();
return ResolveStyleLazilyInternal(
- aElement, CSSPseudoElementType::NotPseudo, nullptr, aParentContext);
+ aElement, CSSPseudoElementType::NotPseudo, nullptr);
}
return ResolveServoStyle(aElement);
}
/**
* Clears any stale Servo element data that might existing in the specified
* element's document. Upon destruction, asserts that the element and all
@@ -618,17 +618,17 @@ ServoStyleSet::ResolveStyleLazily(Elemen
// undisplayed element with the caller's style set's rules, but inherit from
// values that were computed with the style set from the target element's
// hidden-by-the-bfcache-entry pres shell.
bool ignoreExistingStyles = aElement->OwnerDoc()->GetBFCacheEntry();
AutoClearStaleData guard(aElement);
PreTraverseSync();
return ResolveStyleLazilyInternal(aElement, aPseudoType, aPseudoTag,
- nullptr, aRuleInclusion,
+ aRuleInclusion,
ignoreExistingStyles);
}
already_AddRefed<ServoStyleContext>
ServoStyleSet::ResolveInheritingAnonymousBoxStyle(nsIAtom* aPseudoTag,
ServoStyleContext* aParentContext)
{
MOZ_ASSERT(nsCSSAnonBoxes::IsAnonBox(aPseudoTag) &&
@@ -1215,17 +1215,16 @@ ServoStyleSet::GetAnimationValues(
aStyleContext,
mRawSet.get(),
&aAnimationValues);
}
already_AddRefed<ServoStyleContext>
ServoStyleSet::GetBaseContextForElement(
Element* aElement,
- ServoStyleContext* aParentContext,
nsPresContext* aPresContext,
nsIAtom* 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.)
@@ -1332,17 +1331,16 @@ ServoStyleSet::ClearNonInheritingStyleCo
ptr = nullptr;
}
}
already_AddRefed<ServoStyleContext>
ServoStyleSet::ResolveStyleLazilyInternal(Element* aElement,
CSSPseudoElementType aPseudoType,
nsIAtom* aPseudoTag,
- const ServoStyleContext* aParentContext,
StyleRuleInclusion aRuleInclusion,
bool aIgnoreExistingStyles)
{
mPresContext->EffectCompositor()->PreTraverse(aElement, aPseudoType);
MOZ_ASSERT(!StylistNeedsUpdate());
AutoSetInServoTraversal guard(this);
--- a/layout/style/ServoStyleSet.h
+++ b/layout/style/ServoStyleSet.h
@@ -384,17 +384,16 @@ public:
nsCSSCounterStyleRule* CounterStyleRuleForName(nsIAtom* aName);
// Get all the currently-active font feature values set.
already_AddRefed<gfxFontFeatureValueSet> BuildFontFeatureValueSet();
already_AddRefed<ServoStyleContext>
GetBaseContextForElement(dom::Element* aElement,
- ServoStyleContext* aParentContext,
nsPresContext* aPresContext,
nsIAtom* 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
@@ -555,17 +554,16 @@ private:
* This should only be called if StylistNeedsUpdate returns true.
*/
void UpdateStylist();
already_AddRefed<ServoStyleContext>
ResolveStyleLazilyInternal(dom::Element* aElement,
CSSPseudoElementType aPseudoType,
nsIAtom* aPseudoTag,
- const ServoStyleContext* aParentContext,
StyleRuleInclusion aRules =
StyleRuleInclusion::All,
bool aIgnoreExistingStyles = false);
void RunPostTraversalTasks();
void PrependSheetOfType(SheetType aType,
ServoStyleSheet* aSheet);
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -709,17 +709,17 @@ nsComputedDOMStyle::DoGetStyleContextNoF
MOZ_ASSERT(presContext, "Should have a prescontext if we have a frame");
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, nullptr, presContext,
+ GetBaseContextForElement(aElement, presContext,
aPseudo, pseudoType, result->AsServo());
}
}
// this function returns an addrefed style context
RefPtr<nsStyleContext> ret = result;
return ret.forget();
}
@@ -742,17 +742,17 @@ nsComputedDOMStyle::DoGetStyleContextNoF
? StyleRuleInclusion::DefaultOnly
: StyleRuleInclusion::All;
RefPtr<ServoStyleContext> result =
servoSet->ResolveStyleLazily(aElement, pseudoType, aPseudo, rules);
if (aAnimationFlag == eWithAnimation) {
return result.forget();
}
- return servoSet->GetBaseContextForElement(aElement, nullptr, presContext,
+ return servoSet->GetBaseContextForElement(aElement, presContext,
aPseudo, 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 =