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

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

Issue 1311713004: Add UseCounters for usage of -webkit-text (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase 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 1e56c0fc106751d24769bdb34a22df2352018252..5819283384029df2148867355d9fc1150937455e 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -2329,6 +2329,8 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseColor(const CS
if (isColorKeyword(id)) {
if (!isValueAllowedInMode(id, m_context.mode()))
return nullptr;
+ if (id == CSSValueWebkitText && m_context.useCounter())
+ m_context.useCounter()->count(UseCounter::WebkitTextInColorProperty);
return cssValuePool().createIdentifierValue(id);
}
RGBA32 c = Color::transparent;
@@ -2851,13 +2853,18 @@ bool CSSPropertyParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& p
|| val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueContentBox
|| ((propId == CSSPropertyWebkitBackgroundClip || propId == CSSPropertyWebkitMaskClip)
&& (val->id == CSSValueText || val->id == CSSValueWebkitText))) {
+ if (val->id == CSSValueWebkitText && m_context.useCounter())
+ m_context.useCounter()->count(UseCounter::WebkitTextInClipProperty);
currValue = cssValuePool().createIdentifierValue(val->id);
m_valueList->next();
}
break;
case CSSPropertyBackgroundClip:
- if (parseBackgroundClip(val, currValue))
+ if (parseBackgroundClip(val, currValue)) {
+ if (val->id == CSSValueWebkitText && m_context.useCounter())
+ m_context.useCounter()->count(UseCounter::WebkitTextInClipProperty);
m_valueList->next();
+ }
break;
case CSSPropertyBackgroundOrigin:
if (val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueContentBox) {
« 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