| 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 104d7188378d44a3a431d2982cfe8c09bc5db38c..03a604d25156a9d30850c8189330b39e0a6c86b1 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::UserCoordinates;
|
| + else
|
| + unit = CSSPrimitiveValue::UnitType::Pixels;
|
| }
|
| if (number < 0 && !acceptsNegativeNumbers)
|
| return nullptr;
|
|
|