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

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

Issue 1278103002: Oilpan: tidy up some inter-stack object references. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use STACK_ALLOCATED() more often Created 5 years, 4 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/SharedStyleFinder.h ('k') | Source/core/css/resolver/StyleResolverParentScope.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/SharedStyleFinder.cpp
diff --git a/Source/core/css/resolver/SharedStyleFinder.cpp b/Source/core/css/resolver/SharedStyleFinder.cpp
index e1a5a7e069a570f4e3d76b30b495ac075e39be6c..198ac8fcf60f06ad1825b02a425d0bf71c7a8977 100644
--- a/Source/core/css/resolver/SharedStyleFinder.cpp
+++ b/Source/core/css/resolver/SharedStyleFinder.cpp
@@ -285,7 +285,7 @@ bool SharedStyleFinder::documentContainsValidCandidate() const
inline Element* SharedStyleFinder::findElementForStyleSharing() const
{
- StyleSharingList& styleSharingList = m_styleResolver.styleSharingList();
+ StyleSharingList& styleSharingList = m_styleResolver->styleSharingList();
for (StyleSharingList::iterator it = styleSharingList.begin(); it != styleSharingList.end(); ++it) {
Element& candidate = **it;
if (!canShareStyleWithElement(candidate))
@@ -297,7 +297,7 @@ inline Element* SharedStyleFinder::findElementForStyleSharing() const
}
return &candidate;
}
- m_styleResolver.addToStyleSharingList(element());
+ m_styleResolver->addToStyleSharingList(element());
return 0;
}
@@ -305,13 +305,13 @@ bool SharedStyleFinder::matchesRuleSet(RuleSet* ruleSet)
{
if (!ruleSet)
return false;
- ElementRuleCollector collector(m_context, m_styleResolver.selectorFilter());
+ ElementRuleCollector collector(m_context, m_styleResolver->selectorFilter());
return collector.hasAnyMatchingRules(ruleSet);
}
ComputedStyle* SharedStyleFinder::findSharedStyle()
{
- INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleLookups, 1);
+ INCREMENT_STYLE_STATS_COUNTER(*m_styleResolver, sharedStyleLookups, 1);
if (!element().supportsStyleSharing())
return 0;
@@ -322,26 +322,26 @@ ComputedStyle* SharedStyleFinder::findSharedStyle()
Element* shareElement = findElementForStyleSharing();
if (!shareElement) {
- if (m_styleResolver.stats() && m_styleResolver.stats()->allCountersEnabled() && documentContainsValidCandidate())
- INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleMissed, 1);
+ if (m_styleResolver->stats() && m_styleResolver->stats()->allCountersEnabled() && documentContainsValidCandidate())
+ INCREMENT_STYLE_STATS_COUNTER(*m_styleResolver, sharedStyleMissed, 1);
return 0;
}
- INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleFound, 1);
+ INCREMENT_STYLE_STATS_COUNTER(*m_styleResolver, sharedStyleFound, 1);
if (matchesRuleSet(m_siblingRuleSet)) {
- INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleRejectedBySiblingRules, 1);
+ INCREMENT_STYLE_STATS_COUNTER(*m_styleResolver, sharedStyleRejectedBySiblingRules, 1);
return 0;
}
if (matchesRuleSet(m_uncommonAttributeRuleSet)) {
- INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleRejectedByUncommonAttributeRules, 1);
+ INCREMENT_STYLE_STATS_COUNTER(*m_styleResolver, sharedStyleRejectedByUncommonAttributeRules, 1);
return 0;
}
// Tracking child index requires unique style for each node. This may get set by the sibling rule match above.
if (!element().parentElementOrShadowRoot()->childrenSupportStyleSharing()) {
- INCREMENT_STYLE_STATS_COUNTER(m_styleResolver, sharedStyleRejectedByParent, 1);
+ INCREMENT_STYLE_STATS_COUNTER(*m_styleResolver, sharedStyleRejectedByParent, 1);
return 0;
}
« no previous file with comments | « Source/core/css/resolver/SharedStyleFinder.h ('k') | Source/core/css/resolver/StyleResolverParentScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698