Bug 1324700 - Call PreTraverseSync() before calling ResolveStyleLazily() in ResolveTransientStyle(). r?heycam draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Sat, 15 Apr 2017 07:37:34 +0900
changeset 563184 1eebf5ce5bbd04787d2323c3e38e77714055814e
parent 563183 ac6156eb67929146eb2c2bfa9d0c69ca7eb7f281
child 563185 fe5d6f10d70658e691ae3e6514f5e81142a4697d
push id54220
push userhikezoe@mozilla.com
push dateSat, 15 Apr 2017 04:25:00 +0000
reviewersheycam
bugs1324700
milestone55.0a1
Bug 1324700 - Call PreTraverseSync() before calling ResolveStyleLazily() in ResolveTransientStyle(). r?heycam MozReview-Commit-ID: 5KMELNYZJnq
layout/style/ServoStyleSet.cpp
--- 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);