Index: Source/core/css/parser/CSSParserValues.h |
diff --git a/Source/core/css/parser/CSSParserValues.h b/Source/core/css/parser/CSSParserValues.h |
index 0b760f1c510c1c80821ddb17d9dfcf286d1e92d8..1eded93725c2a7c3fee023b579b7105b9b115d7e 100644 |
--- a/Source/core/css/parser/CSSParserValues.h |
+++ b/Source/core/css/parser/CSSParserValues.h |
@@ -26,13 +26,14 @@ |
#include "core/css/CSSSelector.h" |
#include "core/css/CSSValueList.h" |
#include "core/css/parser/CSSParserString.h" |
+#include "core/css/parser/CSSParserTokenRange.h" |
namespace blink { |
class QualifiedName; |
-class CSSParserTokenRange; |
struct CSSParserFunction; |
+struct CSSParserCalcFunction; |
class CSSParserValueList; |
struct CSSParserValue { |
@@ -43,6 +44,7 @@ struct CSSParserValue { |
int iValue; |
CSSParserString string; |
CSSParserFunction* function; |
+ CSSParserCalcFunction* calcFunction; |
CSSParserValueList* valueList; |
struct { |
UChar32 start; |
@@ -52,7 +54,8 @@ struct CSSParserValue { |
enum { |
Operator = 0x100000, |
Function = 0x100001, |
- ValueList = 0x100002, |
+ CalcFunction = 0x100002, |
+ ValueList = 0x100003, |
HexColor = 0x100004, |
// Represents a dimension by a list of two values, a CSS_NUMBER and an CSS_IDENT |
DimensionList = 0x100006, |
@@ -63,7 +66,6 @@ struct CSSParserValue { |
inline void setFromNumber(double value, int unit = CSSPrimitiveValue::CSS_NUMBER); |
inline void setFromOperator(UChar); |
- inline void setFromFunction(CSSParserFunction*); |
inline void setFromValueList(PassOwnPtr<CSSParserValueList>); |
}; |
@@ -114,6 +116,12 @@ public: |
OwnPtr<CSSParserValueList> args; |
}; |
+struct CSSParserCalcFunction { |
+ WTF_MAKE_FAST_ALLOCATED(CSSParserCalcFunction); |
+public: |
+ Vector<CSSParserToken> args; |
Timothy Loh
2015/07/21 07:33:17
Just use a CSSParserTokenRange
rwlbuis
2015/07/22 02:19:06
Done.
Note that I did it this way for the auto clo
|
+}; |
+ |
class CSSParserSelector { |
WTF_MAKE_NONCOPYABLE(CSSParserSelector); WTF_MAKE_FAST_ALLOCATED(CSSParserSelector); |
public: |
@@ -186,14 +194,6 @@ inline void CSSParserValue::setFromOperator(UChar c) |
isInt = false; |
} |
-inline void CSSParserValue::setFromFunction(CSSParserFunction* function) |
-{ |
- id = CSSValueInvalid; |
- this->function = function; |
- unit = Function; |
- isInt = false; |
-} |
- |
inline void CSSParserValue::setFromValueList(PassOwnPtr<CSSParserValueList> valueList) |
{ |
id = CSSValueInvalid; |