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

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

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ToT-ed again... Created 5 years, 5 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: Source/core/css/CSSCalculationValue.cpp
diff --git a/Source/core/css/CSSCalculationValue.cpp b/Source/core/css/CSSCalculationValue.cpp
index 00244e63127fe562b6e897f6a193d93d04d52306..025bd9a9995ca4df27084ac8777277ac0b43700a 100644
--- a/Source/core/css/CSSCalculationValue.cpp
+++ b/Source/core/css/CSSCalculationValue.cpp
@@ -32,6 +32,7 @@
#include "core/css/CSSCalculationValue.h"
#include "core/css/CSSPrimitiveValueMappings.h"
+#include "core/css/parser/CSSPropertyParser.h"
#include "core/css/resolver/StyleResolver.h"
#include "wtf/MathExtras.h"
#include "wtf/OwnPtr.h"
@@ -137,6 +138,7 @@ static bool hasDoubleValue(CSSPrimitiveValue::UnitType type)
case CSSPrimitiveValue::CSS_PROPERTY_ID:
case CSSPrimitiveValue::CSS_VALUE_ID:
case CSSPrimitiveValue::CSS_QEM:
+ case CSSPrimitiveValue::CSS_VARIABLE_REFERENCE:
return false;
};
ASSERT_NOT_REACHED();
@@ -637,10 +639,12 @@ private:
bool parseValue(CSSParserValueList* tokens, unsigned* index, Value* result)
{
CSSParserValue* parserValue = tokens->valueAt(*index);
+
Timothy Loh 2015/07/23 08:11:46 not needed
leviw_travelin_and_unemployed 2015/08/04 00:42:20 Removed.
if (parserValue->unit >= CSSParserValue::Operator)
return false;
CSSPrimitiveValue::UnitType type = static_cast<CSSPrimitiveValue::UnitType>(parserValue->unit);
+
if (unitCategory(type) == CalcOther)
return false;

Powered by Google App Engine
This is Rietveld 408576698