| Index: Source/core/html/parser/HTMLSrcsetParser.cpp
|
| diff --git a/Source/core/html/parser/HTMLSrcsetParser.cpp b/Source/core/html/parser/HTMLSrcsetParser.cpp
|
| index 8283ecd41536a733ce2d23e426c427da4eeffa4c..b9910d859fe997daa7175c2d0744fe8affa8bbc6 100644
|
| --- a/Source/core/html/parser/HTMLSrcsetParser.cpp
|
| +++ b/Source/core/html/parser/HTMLSrcsetParser.cpp
|
| @@ -97,7 +97,11 @@ struct DescriptorToken {
|
| isValid = false;
|
| return 0;
|
| }
|
| - return charactersToFloat(attribute + start, lengthExcludingDescriptor, &isValid);
|
| + Decimal result = parseToDecimalForNumberType(String(attribute + start, lengthExcludingDescriptor));
|
| + isValid = result.isFinite();
|
| + if (!isValid)
|
| + return 0;
|
| + return static_cast<float>(result.toDouble());
|
| }
|
| };
|
|
|
|
|