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

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

Issue 29633003: Avoid style sharing with mis-matched descendant selectors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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
Index: Source/core/css/resolver/ScopedStyleResolver.cpp
diff --git a/Source/core/css/resolver/ScopedStyleResolver.cpp b/Source/core/css/resolver/ScopedStyleResolver.cpp
index 3bc70ed09d42c1ab762c5ffee02fab9c954cb112..6e736f183eb51cff64d264fbe93e08e8f35ff653 100644
--- a/Source/core/css/resolver/ScopedStyleResolver.cpp
+++ b/Source/core/css/resolver/ScopedStyleResolver.cpp
@@ -396,6 +396,14 @@ void ScopedStyleResolver::matchAuthorRules(ElementRuleCollector& collector, bool
collector.sortAndTransferMatchedRules();
}
+bool ScopedStyleResolver::matchesAnyAuthorRules(ElementRuleCollector& collector, bool includeEmptyRules, bool applyAuthorStyles)
+{
+ collector.clearMatchedRules();
+ collector.matchedResult().ranges.lastAuthorRule = collector.matchedResult().matchedProperties.size() - 1;
+ collectMatchingAuthorRules(collector, includeEmptyRules, applyAuthorStyles, ignoreCascadeScope);
+ return collector.matchedResult().matchedRules.size();
+}
+
void ScopedStyleResolver::collectMatchingAuthorRules(ElementRuleCollector& collector, bool includeEmptyRules, bool applyAuthorStyles, CascadeScope cascadeScope, CascadeOrder cascadeOrder)
{
if (!m_authorStyle)

Powered by Google App Engine
This is Rietveld 408576698