| Index: third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
|
| index 3b0046797503e6ed25a99da55128fd4ba6545c6c..f84f25d4bb463be3fe46307d06d37eacb3d0e6fa 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
|
| @@ -110,9 +110,13 @@ static PassRefPtrWillBeRawPtr<CSSValue> parseSimpleLengthValue(CSSPropertyID pro
|
|
|
| if (unit == CSSPrimitiveValue::UnitType::Number) {
|
| bool quirksMode = isQuirksModeBehavior(cssParserMode);
|
| - if (number && !quirksMode)
|
| + bool svgMode = cssParserMode == SVGAttributeMode;
|
| + if (number && (!quirksMode && !svgMode))
|
| return nullptr;
|
| - unit = CSSPrimitiveValue::UnitType::Pixels;
|
| + if (svgMode)
|
| + unit = CSSPrimitiveValue::UnitType::UserUnits;
|
| + else
|
| + unit = CSSPrimitiveValue::UnitType::Pixels;
|
| }
|
| if (number < 0 && !acceptsNegativeNumbers)
|
| return nullptr;
|
|
|