Index: Source/core/editing/EditingStyle.cpp |
diff --git a/Source/core/editing/EditingStyle.cpp b/Source/core/editing/EditingStyle.cpp |
index 57b233270e1e2cc3ad7ffd490baa6a28ab508ac3..b9eef1a54076a00ac118ca6d1127847e86f5d798 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()); |