Bug 996796 patch 13 - Fix the pseudo element information created by ResolveStyleWithReplacement. r=heycam
authorL. David Baron <dbaron@dbaron.org>
Sat, 02 Aug 2014 19:37:45 -0700
changeset 197594 119416a35fa8915d77ed85debbf5f278b3b7702a
parent 197593 d13154302d771e887b710acb6c610f55bd32d0f0
child 197595 7ee0ebcf0602424536cac46089f649f448bd14e5
push id27249
push userryanvm@gmail.com
push dateMon, 04 Aug 2014 20:14:35 +0000
treeherdermozilla-central@7f81be7db528 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs996796, 960465
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 996796 patch 13 - Fix the pseudo element information created by ResolveStyleWithReplacement. r=heycam Note that we're not yet using this code for style contexts that have pseudo-elements, since we don't run transitions or animations on pseudo-elements on the compositor thread. But bug 960465 will (with some more work) start doing so.
layout/style/nsStyleSet.cpp
--- a/layout/style/nsStyleSet.cpp
+++ b/layout/style/nsStyleSet.cpp
@@ -1447,17 +1447,18 @@ nsStyleSet::ResolveStyleWithReplacement(
     // parent in non-link cases; all we need to pass in is if this link
     // is visited.
     if (aOldStyleContext->RelevantLinkVisited()) {
       flags |= eIsVisitedLink;
     }
   }
 
   return GetContext(aNewParentContext, ruleNode, visitedRuleNode,
-                    nullptr, nsCSSPseudoElements::ePseudo_NotPseudoElement,
+                    aOldStyleContext->GetPseudo(),
+                    aOldStyleContext->GetPseudoType(),
                     nullptr, flags);
 }
 
 
 already_AddRefed<nsStyleContext>
 nsStyleSet::ResolveStyleForNonElement(nsStyleContext* aParentContext)
 {
   return GetContext(aParentContext, mRuleTree, nullptr,