Index: Source/core/editing/EditingStyle.cpp |
diff --git a/Source/core/editing/EditingStyle.cpp b/Source/core/editing/EditingStyle.cpp |
index 358819603f07d364642bd2b3b67c6ba9b47add9a..18ca09b768a4e4f53f2c0ab7745480fe8d6db2d5 100644 |
--- a/Source/core/editing/EditingStyle.cpp |
+++ b/Source/core/editing/EditingStyle.cpp |
@@ -1133,7 +1133,9 @@ void EditingStyle::mergeStyle(const StylePropertySet* style, CSSPropertyOverride |
static PassRefPtr<MutableStylePropertySet> styleFromMatchedRulesForElement(Element* element, unsigned rulesToInclude) |
{ |
RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(); |
- RefPtr<StyleRuleList> matchedRules = element->document().styleResolver()->styleRulesForElement(element, rulesToInclude); |
+ StyleResolver* styleResolver = element->document().styleResolver(); |
+ appendPendingStyleSheetsIfNeeded(styleResolver); |
+ RefPtr<StyleRuleList> matchedRules = styleResolver->styleRulesForElement(element, rulesToInclude); |
if (matchedRules) { |
for (unsigned i = 0; i < matchedRules->m_list.size(); ++i) |
style->mergeAndOverrideOnConflict(matchedRules->m_list[i]->properties()); |