| Index: Source/core/css/parser/CSSParserFastPaths.cpp
|
| diff --git a/Source/core/css/parser/CSSParserFastPaths.cpp b/Source/core/css/parser/CSSParserFastPaths.cpp
|
| index 396eefebe85ee14abd4230e61d1c7672839855af..ad5253d317eb783814850943c71fe30f7c7ba8e4 100644
|
| --- a/Source/core/css/parser/CSSParserFastPaths.cpp
|
| +++ b/Source/core/css/parser/CSSParserFastPaths.cpp
|
| @@ -106,10 +106,12 @@ static PassRefPtrWillBeRawPtr<CSSValue> parseSimpleLengthValue(CSSPropertyID pro
|
| }
|
|
|
| if (unit == CSSPrimitiveValue::CSS_NUMBER) {
|
| - bool quirksMode = isQuirksModeBehavior(cssParserMode);
|
| - if (number && !quirksMode)
|
| - return nullptr;
|
| - unit = CSSPrimitiveValue::CSS_PX;
|
| + if (!isUnitLessLengthParsingEnabledForMode(cssParserMode)) {
|
| + bool quirksMode = isQuirksModeBehavior(cssParserMode);
|
| + if (number && !quirksMode)
|
| + return nullptr;
|
| + unit = CSSPrimitiveValue::CSS_PX;
|
| + }
|
| }
|
| if (number < 0 && !acceptsNegativeNumbers)
|
| return nullptr;
|
|
|