| Index: third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp
|
| index b84458ac8112e4824b9165e2c8345b0efe846c3e..7f1cde985969b1d5a87b2047ae27872dfc08f878 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp
|
| @@ -5,6 +5,7 @@
|
| #include "core/css/parser/CSSParserToken.h"
|
|
|
| #include "core/css/CSSMarkup.h"
|
| +#include "core/css/CSSPrimitiveValueUnitTrie.h"
|
| #include "core/css/parser/CSSPropertyParser.h"
|
| #include "wtf/HashMap.h"
|
| #include "wtf/text/StringBuilder.h"
|
| @@ -68,7 +69,11 @@ void CSSParserToken::convertToDimensionWithUnit(CSSParserString unit)
|
| ASSERT(m_type == NumberToken);
|
| m_type = DimensionToken;
|
| initValueFromCSSParserString(unit);
|
| - m_unit = static_cast<unsigned>(CSSPrimitiveValue::fromName(unit));
|
| +
|
| + if (unit.is8Bit())
|
| + m_unit = static_cast<unsigned>(lookupCSSPrimitiveValueUnit(unit.characters8(), unit.length()));
|
| + else
|
| + m_unit = static_cast<unsigned>(lookupCSSPrimitiveValueUnit(unit.characters16(), unit.length()));
|
| }
|
|
|
| void CSSParserToken::convertToPercentage()
|
|
|