| Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| index 199002ba26900add3c16777b503e180bdda07e81..90d4462a74cae8cd2715c52fe25163a01d684766 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| @@ -1455,9 +1455,13 @@ static CSSFunctionValue* consumeFilterFunction(CSSParserTokenRange& range, CSSPa
|
| if (!parsedValue)
|
| parsedValue = consumeNumber(args, ValueRangeNonNegative);
|
| if (parsedValue && filterType != CSSValueSaturate && filterType != CSSValueContrast) {
|
| - double maxAllowed = toCSSPrimitiveValue(parsedValue)->isPercentage() ? 100.0 : 1.0;
|
| - if (toCSSPrimitiveValue(parsedValue)->getDoubleValue() > maxAllowed)
|
| - return nullptr;
|
| + bool isPercentage = toCSSPrimitiveValue(parsedValue)->isPercentage();
|
| + double maxAllowed = isPercentage ? 100.0 : 1.0;
|
| + if (toCSSPrimitiveValue(parsedValue)->getDoubleValue() > maxAllowed) {
|
| + parsedValue = CSSPrimitiveValue::create(
|
| + maxAllowed,
|
| + isPercentage ? CSSPrimitiveValue::UnitType::Percentage : CSSPrimitiveValue::UnitType::Number);
|
| + }
|
| }
|
| }
|
| }
|
|
|