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

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

Issue 1285263005: Add use counter for prefixed intrinsic size keywords (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: use a switch 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 | « no previous file | Source/core/frame/UseCounter.h » ('j') | 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 bf6ae705ab3d0d4eafd47a67cdc7bfefe7e9422b..21e7592f12137bc8c49b9615544380c06bc7b72f 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -371,10 +371,28 @@ bool CSSPropertyParser::validWidthOrHeight(CSSParserValue* value, Units unitless
int id = value->id;
if (id == CSSValueIntrinsic || id == CSSValueMinIntrinsic || id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent || id == CSSValueWebkitFillAvailable || id == CSSValueWebkitFitContent) {
if (m_context.useCounter()) {
- if (value->id == CSSValueIntrinsic)
+ switch (value->id) {
+ case CSSValueIntrinsic:
m_context.useCounter()->count(UseCounter::LegacyCSSValueIntrinsic);
- else if (value->id == CSSValueMinIntrinsic)
+ break;
+ case CSSValueMinIntrinsic:
m_context.useCounter()->count(UseCounter::LegacyCSSValueMinIntrinsic);
+ break;
+ case CSSValueWebkitMinContent:
+ m_context.useCounter()->count(UseCounter::CSSValuePrefixedMinContent);
+ break;
+ case CSSValueWebkitMaxContent:
+ m_context.useCounter()->count(UseCounter::CSSValuePrefixedMaxContent);
+ break;
+ case CSSValueWebkitFillAvailable:
+ m_context.useCounter()->count(UseCounter::CSSValuePrefixedFillAvailable);
+ break;
+ case CSSValueWebkitFitContent:
+ m_context.useCounter()->count(UseCounter::CSSValuePrefixedFitContent);
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
}
return true;
}
« no previous file with comments | « no previous file | Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698