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

Unified Diff: Source/core/css/parser/CSSParserValues.h

Issue 1239983004: Make CSSCalcValue work with CSSParserTokenRange (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add more subtests 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
« no previous file with comments | « Source/core/css/CSSCalculationValue.cpp ('k') | Source/core/css/parser/CSSParserValues.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSParserValues.h
diff --git a/Source/core/css/parser/CSSParserValues.h b/Source/core/css/parser/CSSParserValues.h
index b3a90dd86b5ff2b69e3f4ff48882be25035f7998..adad217580f9d1c62a1a3e7f84ecec9055fb7a0d 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,
Identifier = 0x100005,
// Represents a dimension by a list of two values, a UnitType::Number and an Identifier
@@ -66,7 +69,6 @@ struct CSSParserValue {
inline void setFromNumber(double value, CSSPrimitiveValue::UnitType);
inline void setFromOperator(UChar);
- inline void setFromFunction(CSSParserFunction*);
inline void setFromValueList(PassOwnPtr<CSSParserValueList>);
};
@@ -117,6 +119,13 @@ public:
OwnPtr<CSSParserValueList> args;
};
+struct CSSParserCalcFunction {
+ WTF_MAKE_FAST_ALLOCATED(CSSParserCalcFunction);
+public:
+ CSSParserCalcFunction(CSSParserTokenRange args_) : args(args_) {}
+ CSSParserTokenRange args;
+};
+
class CSSParserSelector {
WTF_MAKE_NONCOPYABLE(CSSParserSelector); WTF_MAKE_FAST_ALLOCATED(CSSParserSelector);
public:
@@ -189,14 +198,6 @@ inline void CSSParserValue::setFromOperator(UChar c)
isInt = false;
}
-inline void CSSParserValue::setFromFunction(CSSParserFunction* function)
-{
- id = CSSValueInvalid;
- this->function = function;
- m_unit = Function;
- isInt = false;
-}
-
inline void CSSParserValue::setFromValueList(PassOwnPtr<CSSParserValueList> valueList)
{
id = CSSValueInvalid;
« no previous file with comments | « Source/core/css/CSSCalculationValue.cpp ('k') | Source/core/css/parser/CSSParserValues.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698