Bug 1324700 - Call PreTraverseSync() before calling ResolveStyleLazily() in ResolveTransientStyle(). r?heycam
MozReview-Commit-ID: 5KMELNYZJnq
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -417,16 +417,18 @@ ServoStyleSet::ResolvePseudoElementStyle
aType == CSSPseudoElementType::after;
return GetContext(computedValues.forget(), aParentContext, pseudoTag, aType,
isBeforeOrAfter ? aOriginatingElement : nullptr);
}
already_AddRefed<nsStyleContext>
ServoStyleSet::ResolveTransientStyle(Element* aElement, CSSPseudoElementType aType)
{
+ PreTraverseSync();
+
nsIAtom* pseudoTag = nullptr;
if (aType != CSSPseudoElementType::NotPseudo) {
pseudoTag = nsCSSPseudoElements::GetPseudoAtom(aType);
}
RefPtr<ServoComputedValues> computedValues =
ResolveStyleLazily(aElement, pseudoTag);