| Index: third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
|
| diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
|
| index 0ead913c1005fa47064f1fdffb4f206758f43dc8..8114f109d8c801d1bc92f3468ce75f1dda864502 100644
|
| --- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
|
| +++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
|
| @@ -32,6 +32,7 @@
|
| #include "wtf/PassRefPtr.h"
|
| #include "wtf/TypeTraits.h"
|
| #include "wtf/text/StringHash.h"
|
| +#include "wtf/text/StringView.h"
|
|
|
| namespace blink {
|
|
|
| @@ -244,6 +245,13 @@ public:
|
| template<typename T> inline T convertTo() const; // Defined in CSSPrimitiveValueMappings.h
|
|
|
| static const char* unitTypeToString(UnitType);
|
| + static UnitType stringToUnitType(StringView string)
|
| + {
|
| + if (string.is8Bit())
|
| + return stringToUnitType(string.characters8(), string.length());
|
| + return stringToUnitType(string.characters16(), string.length());
|
| + }
|
| +
|
| String customCSSText() const;
|
|
|
| bool equals(const CSSPrimitiveValue&) const;
|
| @@ -274,6 +282,10 @@ private:
|
| static void create(unsigned); // compile-time guard
|
| template<typename T> operator T*(); // compile-time guard
|
|
|
| + // Code generated by CSSPrimitiveValueUnitTrie.cpp.tmpl
|
| + static UnitType stringToUnitType(const LChar*, unsigned length);
|
| + static UnitType stringToUnitType(const UChar*, unsigned length);
|
| +
|
| void init(UnitType);
|
| void init(const Length&);
|
| void init(CSSCalcValue*);
|
|
|