| 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 51014658dd27281ffba820e298957ff4838f9008..8fcaae43a482f8728ea9b36066d2202b6512cddf 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/CSSParserToken.cpp
|
| @@ -68,7 +68,10 @@ 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>(CSSPrimitiveValue::fromName(unit.characters8(), unit.length()));
|
| + else
|
| + m_unit = static_cast<unsigned>(CSSPrimitiveValue::fromName(unit.characters16(), unit.length()));
|
| }
|
|
|
| void CSSParserToken::convertToPercentage()
|
|
|