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

Unified Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 642583006: Don't UseCounter CSS properties on recursive parseValue calls (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index f51ee026fba0fb744abe25c9df85712dc8d5710e..6ef5af8c6fd57d003cfa4ae5e47a74a5666c083c 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -122,7 +122,13 @@ bool CSSPropertyParser::parseValue(CSSPropertyID property, bool important,
WillBeHeapVector<CSSProperty, 256>& parsedProperties, CSSRuleSourceData::Type ruleType)
{
CSSPropertyParser parser(valueList, context, inViewport, parsedProperties, ruleType);
- return parser.parseValue(property, important);
+ bool parseSuccess = parser.parseValue(property, important);
+
+ // This doesn't count UA style sheets
+ if (parseSuccess && context.useCounter())
+ context.useCounter()->count(context, property);
+
+ return parseSuccess;
}
void CSSPropertyParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, PassRefPtrWillBeRawPtr<CSSValue> value, bool important, bool implicit)
@@ -428,10 +434,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId, bool important)
if (!isInternalPropertyAndValueParsingEnabledForMode(m_context.mode()) && isInternalProperty(propId))
return false;
- // We don't count the UA style sheet in our statistics.
- if (m_context.useCounter())
- m_context.useCounter()->count(m_context, propId);
-
if (!m_valueList)
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698