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

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

Issue 2345583005: Add use counter for CSS zoom:reset and zoom:document. (Closed)
Patch Set: merge Created 4 years, 3 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 | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index 10f70dfae877c978858694ede4870cf67fa41850..c13aaa1d3caca3decbb465e06aa979d474b70ad2 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1081,11 +1081,16 @@ static CSSValue* consumeZoom(CSSParserTokenRange& range, const CSSParserContext&
if (!zoom)
zoom = consumeNumber(range, ValueRangeNonNegative);
}
- if (zoom && context.useCounter()
- && !(token.id() == CSSValueNormal
+ if (zoom && context.useCounter()) {
+ if (!(token.id() == CSSValueNormal
|| (token.type() == NumberToken && zoom->getDoubleValue() == 1)
|| (token.type() == PercentageToken && zoom->getDoubleValue() == 100)))
- context.useCounter()->count(UseCounter::CSSZoomNotEqualToOne);
+ context.useCounter()->count(UseCounter::CSSZoomNotEqualToOne);
+ if (token.id() == CSSValueReset)
+ context.useCounter()->count(UseCounter::CSSZoomReset);
+ if (token.id() == CSSValueDocument)
+ context.useCounter()->count(UseCounter::CSSZoomDocument);
+ }
return zoom;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698