Index: Source/core/css/resolver/StyleResolver.cpp |
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp |
index 84ca02401779ee2153e0c113180e7206415665d3..9f27cf9878bd8ea6619a5f66d384cb519c2159e3 100644 |
--- a/Source/core/css/resolver/StyleResolver.cpp |
+++ b/Source/core/css/resolver/StyleResolver.cpp |
@@ -267,6 +267,7 @@ void StyleResolver::collectFeatures() |
m_styleTree.collectFeaturesTo(m_features); |
m_siblingRuleSet = makeRuleSet(m_features.siblingRules); |
+ m_descendantRuleSet = makeRuleSet(m_features.descendantRules); |
m_uncommonAttributeRuleSet = makeRuleSet(m_features.uncommonAttributeRules); |
} |
@@ -612,7 +613,7 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS |
StyleResolverState state(document(), element, defaultParent, regionForStyling); |
if (sharingBehavior == AllowStyleSharing && !state.distributedToInsertionPoint() && state.parentStyle()) { |
- SharedStyleFinder styleFinder(m_features, m_siblingRuleSet.get(), m_uncommonAttributeRuleSet.get(), this); |
+ SharedStyleFinder styleFinder(m_features, m_siblingRuleSet.get(), m_uncommonAttributeRuleSet.get(), m_descendantRuleSet.get(), this); |
RefPtr<RenderStyle> sharedStyle = styleFinder.locateSharedStyle(state.elementContext()); |
if (sharedStyle) |
return sharedStyle.release(); |