Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(786)

Unified Diff: Source/core/editing/EditingStyle.cpp

Issue 42543007: StyleResolver should update RuleSets lazily. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());

Powered by Google App Engine
This is Rietveld 408576698