Bug 1329876 - Stop accepting aTreeMatchContext in the ServoStyleSet methods. r=bz

This makes it clear it's unused.
This commit is contained in:
Bobby Holley 2017-05-18 11:41:13 +02:00
Родитель 9ac08154b7
Коммит cdff82b294
3 изменённых файлов: 17 добавлений и 41 удалений

Просмотреть файл

@ -363,18 +363,6 @@ ServoStyleSet::PrepareAndTraverseSubtree(
return postTraversalRequired;
}
already_AddRefed<nsStyleContext>
ServoStyleSet::ResolveStyleFor(Element* aElement,
nsStyleContext* aParentContext,
LazyComputeBehavior aMayCompute,
TreeMatchContext& aTreeMatchContext)
{
// aTreeMatchContext is used to speed up selector matching,
// but if the element already has a ServoComputedValues computed in
// advance, then we shouldn't need to use it.
return ResolveStyleFor(aElement, aParentContext, aMayCompute);
}
already_AddRefed<nsStyleContext>
ServoStyleSet::ResolveStyleForText(nsIContent* aTextNode,
nsStyleContext* aParentContext)
@ -778,9 +766,13 @@ ServoStyleSet::AddDocStyleSheet(ServoStyleSheet* aSheet,
already_AddRefed<nsStyleContext>
ServoStyleSet::ProbePseudoElementStyle(Element* aOriginatingElement,
CSSPseudoElementType aType,
nsStyleContext* aParentContext)
nsStyleContext* aParentContext,
Element* aPseudoElement)
{
UpdateStylistIfNeeded();
if (aPseudoElement) {
NS_ERROR("stylo: We don't support CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE yet");
}
// NB: We ignore aParentContext, on the assumption that pseudo element styles
// should just inherit from aOriginatingElement's primary style, which Servo
@ -814,19 +806,6 @@ ServoStyleSet::ProbePseudoElementStyle(Element* aOriginatingElement,
isBeforeOrAfter ? aOriginatingElement : nullptr);
}
already_AddRefed<nsStyleContext>
ServoStyleSet::ProbePseudoElementStyle(Element* aOriginatingElement,
CSSPseudoElementType aType,
nsStyleContext* aParentContext,
TreeMatchContext& aTreeMatchContext,
Element* aPseudoElement)
{
if (aPseudoElement) {
NS_ERROR("stylo: We don't support CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE yet");
}
return ProbePseudoElementStyle(aOriginatingElement, aType, aParentContext);
}
nsRestyleHint
ServoStyleSet::HasStateDependentStyle(dom::Element* aElement,
EventStates aStateMask)

Просмотреть файл

@ -119,12 +119,6 @@ public:
nsStyleContext* aParentContext,
LazyComputeBehavior aMayCompute);
already_AddRefed<nsStyleContext>
ResolveStyleFor(dom::Element* aElement,
nsStyleContext* aParentContext,
LazyComputeBehavior aMayCompute,
TreeMatchContext& aTreeMatchContext);
// Get a style context for a text node (which no rules will match).
//
// The returned style context will have nsCSSAnonBoxes::mozText as its pseudo.
@ -216,16 +210,10 @@ public:
nsresult AddDocStyleSheet(ServoStyleSheet* aSheet, nsIDocument* aDocument);
// check whether there is ::before/::after style for an element
already_AddRefed<nsStyleContext>
ProbePseudoElementStyle(dom::Element* aOriginatingElement,
mozilla::CSSPseudoElementType aType,
nsStyleContext* aParentContext);
already_AddRefed<nsStyleContext>
ProbePseudoElementStyle(dom::Element* aOriginatingElement,
mozilla::CSSPseudoElementType aType,
nsStyleContext* aParentContext,
TreeMatchContext& aTreeMatchContext,
dom::Element* aPseudoElement = nullptr);
// Test if style is dependent on content state

Просмотреть файл

@ -91,7 +91,11 @@ StyleSetHandle::Ptr::ResolveStyleFor(dom::Element* aElement,
LazyComputeBehavior aMayCompute,
TreeMatchContext& aTreeMatchContext)
{
FORWARD(ResolveStyleFor, (aElement, aParentContext, aMayCompute, aTreeMatchContext));
if (IsGecko()) {
return AsGecko()->ResolveStyleFor(aElement, aParentContext, aMayCompute, aTreeMatchContext);
} else {
return AsServo()->ResolveStyleFor(aElement, aParentContext, aMayCompute);
}
}
already_AddRefed<nsStyleContext>
@ -231,8 +235,13 @@ StyleSetHandle::Ptr::ProbePseudoElementStyle(dom::Element* aParentElement,
TreeMatchContext& aTreeMatchContext,
dom::Element* aPseudoElement)
{
FORWARD(ProbePseudoElementStyle, (aParentElement, aType, aParentContext,
aTreeMatchContext, aPseudoElement));
if (IsGecko()) {
return AsGecko()->ProbePseudoElementStyle(aParentElement, aType, aParentContext,
aTreeMatchContext, aPseudoElement);
} else {
return AsServo()->ProbePseudoElementStyle(aParentElement, aType, aParentContext,
aPseudoElement);
}
}
nsRestyleHint