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

Unified Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp

Issue 2671173002: Change CSSParserContext to have a Document handle (vs UseCounter). (Closed)
Patch Set: fix trace and import Created 3 years, 10 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: third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp
index 1222ac6029cd67225e5e20e99cccf0e232439a43..f5189aee3c238de2a87f01bf66e02bd0be6ba470 100644
--- a/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp
@@ -17,24 +17,21 @@ bool validWidthOrHeightKeyword(CSSValueID id, const CSSParserContext* context) {
id == CSSValueWebkitFillAvailable || id == CSSValueWebkitFitContent ||
id == CSSValueMinContent || id == CSSValueMaxContent ||
id == CSSValueFitContent) {
- if (context->isUseCounterRecordingEnabled()) {
- UseCounter* useCounter = context->useCounter();
- switch (id) {
- case CSSValueWebkitMinContent:
- useCounter->count(UseCounter::CSSValuePrefixedMinContent);
- break;
- case CSSValueWebkitMaxContent:
- useCounter->count(UseCounter::CSSValuePrefixedMaxContent);
- break;
- case CSSValueWebkitFillAvailable:
- useCounter->count(UseCounter::CSSValuePrefixedFillAvailable);
- break;
- case CSSValueWebkitFitContent:
- useCounter->count(UseCounter::CSSValuePrefixedFitContent);
- break;
- default:
- break;
- }
+ switch (id) {
+ case CSSValueWebkitMinContent:
+ context->count(UseCounter::CSSValuePrefixedMinContent);
+ break;
+ case CSSValueWebkitMaxContent:
+ context->count(UseCounter::CSSValuePrefixedMaxContent);
+ break;
+ case CSSValueWebkitFillAvailable:
+ context->count(UseCounter::CSSValuePrefixedFillAvailable);
+ break;
+ case CSSValueWebkitFitContent:
+ context->count(UseCounter::CSSValuePrefixedFitContent);
+ break;
+ default:
+ break;
}
return true;
}

Powered by Google App Engine
This is Rietveld 408576698