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

Unified Diff: Source/core/css/CSSCalculationValue.cpp

Issue 476693002: Remove unused CSSPrimitiveValue::CSS_PARSER_{OPERATOR,INTEGER,IDENTIFIER} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pp6
Patch Set: Created 6 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/css/CSSPrimitiveValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSCalculationValue.cpp
diff --git a/Source/core/css/CSSCalculationValue.cpp b/Source/core/css/CSSCalculationValue.cpp
index 08ddc91b01d465fb94e149ffcf4db0c41969e4c7..ee079d5423b75bf3b1db039ec2cdb777e66470b1 100644
--- a/Source/core/css/CSSCalculationValue.cpp
+++ b/Source/core/css/CSSCalculationValue.cpp
@@ -51,7 +51,6 @@ static CalculationCategory unitCategory(CSSPrimitiveValue::UnitType type)
{
switch (type) {
case CSSPrimitiveValue::CSS_NUMBER:
- case CSSPrimitiveValue::CSS_PARSER_INTEGER:
return CalcNumber;
case CSSPrimitiveValue::CSS_PERCENTAGE:
return CalcPercent;
@@ -90,7 +89,6 @@ static bool hasDoubleValue(CSSPrimitiveValue::UnitType type)
{
switch (type) {
case CSSPrimitiveValue::CSS_NUMBER:
- case CSSPrimitiveValue::CSS_PARSER_INTEGER:
case CSSPrimitiveValue::CSS_PERCENTAGE:
case CSSPrimitiveValue::CSS_EMS:
case CSSPrimitiveValue::CSS_EXS:
@@ -130,9 +128,7 @@ static bool hasDoubleValue(CSSPrimitiveValue::UnitType type)
case CSSPrimitiveValue::CSS_RGBCOLOR:
case CSSPrimitiveValue::CSS_PAIR:
case CSSPrimitiveValue::CSS_UNICODE_RANGE:
- case CSSPrimitiveValue::CSS_PARSER_OPERATOR:
case CSSPrimitiveValue::CSS_PARSER_HEXCOLOR:
- case CSSPrimitiveValue::CSS_PARSER_IDENTIFIER:
case CSSPrimitiveValue::CSS_COUNTER_NAME:
case CSSPrimitiveValue::CSS_SHAPE:
case CSSPrimitiveValue::CSS_QUAD:
@@ -363,8 +359,7 @@ public:
// Simplify numbers.
if (leftCategory == CalcNumber && rightCategory == CalcNumber) {
- CSSPrimitiveValue::UnitType evaluationType = isInteger ? CSSPrimitiveValue::CSS_PARSER_INTEGER : CSSPrimitiveValue::CSS_NUMBER;
- return CSSCalcPrimitiveValue::create(evaluateOperator(leftSide->doubleValue(), rightSide->doubleValue(), op), evaluationType, isInteger);
+ return CSSCalcPrimitiveValue::create(evaluateOperator(leftSide->doubleValue(), rightSide->doubleValue(), op), CSSPrimitiveValue::CSS_NUMBER, isInteger);
}
// Simplify addition and subtraction between same types.
@@ -518,8 +513,6 @@ public:
switch (m_category) {
case CalcNumber:
ASSERT(m_leftSide->category() == CalcNumber && m_rightSide->category() == CalcNumber);
- if (m_isInteger)
- return CSSPrimitiveValue::CSS_PARSER_INTEGER;
return CSSPrimitiveValue::CSS_NUMBER;
case CalcLength:
case CalcPercent: {
@@ -651,9 +644,6 @@ private:
if (unitCategory(type) == CalcOther)
return false;
- if (type == CSSPrimitiveValue::CSS_NUMBER && parserValue->isInt)
- type = CSSPrimitiveValue::CSS_PARSER_INTEGER;
-
result->value = CSSCalcPrimitiveValue::create(
CSSPrimitiveValue::create(parserValue->fValue, type), parserValue->isInt);
« no previous file with comments | « no previous file | Source/core/css/CSSPrimitiveValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698