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

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

Issue 1051573003: Add metrics for intrinsic and min-intrinsic CSS values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 8 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 c9ec88e6836504bb9d2725ae7c53ac7ff11adee9..cde10ab5d8640f5352411ce48b7efcf14174f7b5 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -374,8 +374,15 @@ static bool isGeneratedImageValue(CSSParserValue* val)
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 (id == CSSValueIntrinsic || id == CSSValueMinIntrinsic || id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent || id == CSSValueWebkitFillAvailable || id == CSSValueWebkitFitContent) {
+ if (m_context.useCounter()) {
+ if (value->id == CSSValueIntrinsic)
+ m_context.useCounter()->count(UseCounter::LegacyCSSValueIntrinsic);
+ else if (value->id == CSSValueMinIntrinsic)
+ m_context.useCounter()->count(UseCounter::LegacyCSSValueMinIntrinsic);
+ }
return true;
+ }
return !id && validUnit(value, FLength | FPercent | FNonNeg | unitless);
}
« 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