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

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

Issue 641643004: Reapply the non-MathExtras parts of (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/css/resolver/TransformBuilder.cpp » ('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 c4d902a23587fd251209c5e9a399b7b307f8aa57..8cd7f031515338b31464bd98c202949c562a8bca 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -3027,7 +3027,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationTimingFunction
CSSParserValue* v = args->current();
if (!validUnit(v, FInteger))
return nullptr;
- numSteps = clampToInteger(v->fValue);
+ numSteps = clampTo<int>(v->fValue);
if (numSteps < 1)
return nullptr;
@@ -5576,8 +5576,8 @@ bool CSSPropertyParser::parseFlex(CSSParserValueList* args, bool important)
if (!flexBasis)
flexBasis = cssValuePool().createValue(0, CSSPrimitiveValue::CSS_PERCENTAGE);
- addProperty(CSSPropertyFlexGrow, cssValuePool().createValue(clampToFloat(flexGrow), CSSPrimitiveValue::CSS_NUMBER), important);
- addProperty(CSSPropertyFlexShrink, cssValuePool().createValue(clampToFloat(flexShrink), CSSPrimitiveValue::CSS_NUMBER), important);
+ addProperty(CSSPropertyFlexGrow, cssValuePool().createValue(clampTo<float>(flexGrow), CSSPrimitiveValue::CSS_NUMBER), important);
+ addProperty(CSSPropertyFlexShrink, cssValuePool().createValue(clampTo<float>(flexShrink), CSSPrimitiveValue::CSS_NUMBER), important);
addProperty(CSSPropertyFlexBasis, flexBasis, important);
return true;
}
@@ -6183,7 +6183,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounter(int defaultValu
val = m_valueList->current();
int i = defaultValue;
if (val && validUnit(val, FInteger)) {
- i = clampToInteger(val->fValue);
+ i = clampTo<int>(val->fValue);
m_valueList->next();
}
@@ -7575,7 +7575,7 @@ bool CSSPropertyParser::parseFontFeatureTag(CSSValueList* settings)
value = m_valueList->next();
if (value) {
if (value->unit == CSSPrimitiveValue::CSS_NUMBER && value->isInt && value->fValue >= 0) {
- tagValue = clampToInteger(value->fValue);
+ tagValue = clampTo<int>(value->fValue);
if (tagValue < 0)
return false;
m_valueList->next();
« no previous file with comments | « no previous file | Source/core/css/resolver/TransformBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698