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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 16194002: Make ScopedStyleResolver use apply-author-styles of a given element's treescope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rewrite layout test Created 7 years, 7 months 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
« no previous file with comments | « Source/core/css/resolver/ScopedStyleResolver.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 2216bae31b28effd064782d13f7ea4033d271d0f..04ab882e1df779cea1a30f05dbcfc36f6dc5717a 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -452,17 +452,16 @@ void StyleResolver::matchScopedAuthorRules(ElementRuleCollector& collector, bool
return;
}
- Vector<std::pair<ScopedStyleResolver*, bool>, 8> stack;
+ Vector<ScopedStyleResolver*, 8> stack;
m_styleTree.resolveScopeStyles(m_state.element(), stack);
if (stack.isEmpty())
return;
- for (int i = stack.size() - 1; i >= 0; --i) {
- ScopedStyleResolver* scopeResolver = stack.at(i).first;
- bool applyAuthorStyles = stack.at(i).second;
- scopeResolver->matchAuthorRules(collector, includeEmptyRules, applyAuthorStyles);
- }
- matchHostRules(stack.first().first, collector, includeEmptyRules);
+ bool applyAuthorStyles = m_state.element()->treeScope()->applyAuthorStyles();
+ for (int i = stack.size() - 1; i >= 0; --i)
+ stack.at(i)->matchAuthorRules(collector, includeEmptyRules, applyAuthorStyles);
+
+ matchHostRules(stack.first(), collector, includeEmptyRules);
}
void StyleResolver::matchAuthorRules(ElementRuleCollector& collector, bool includeEmptyRules)
« no previous file with comments | « Source/core/css/resolver/ScopedStyleResolver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698