Index: third_party/WebKit/Source/core/svg/SVGParsingError.cpp |
diff --git a/third_party/WebKit/Source/core/svg/SVGParsingError.cpp b/third_party/WebKit/Source/core/svg/SVGParsingError.cpp |
index abbe1631d8ce85153d85423b13722d05840a3afd..69084715fab2fae5b226cfb1e3ced3d2b0ab72e5 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGParsingError.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGParsingError.cpp |
@@ -55,6 +55,7 @@ std::pair<const char*, const char*> messageForStatus(SVGParseStatus status) |
case SVGParseStatus::ZeroValue: |
return std::make_pair("A value of zero is not valid. (", ")"); |
case SVGParseStatus::ParsingFailed: |
+ return std::make_pair("Invalid value, ", "."); |
default: |
ASSERT_NOT_REACHED(); |
break; |
@@ -102,24 +103,16 @@ String SVGParsingError::format(const String& tagName, const QualifiedName& name, |
{ |
StringBuilder builder; |
- // TODO(fs): Remove this case once enough specific errors have been added. |
- if (status() == SVGParseStatus::ParsingFailed) { |
- builder.appendLiteral("Invalid value for "); |
- appendErrorContextInfo(builder, tagName, name); |
- builder.append('='); |
- appendValue(builder, *this, value); |
- } else { |
- appendErrorContextInfo(builder, tagName, name); |
- builder.appendLiteral(": "); |
+ appendErrorContextInfo(builder, tagName, name); |
+ builder.appendLiteral(": "); |
- if (hasLocus() && locus() == value.length()) |
- builder.appendLiteral("Unexpected end of attribute. "); |
+ if (hasLocus() && locus() == value.length()) |
+ builder.appendLiteral("Unexpected end of attribute. "); |
- auto message = messageForStatus(status()); |
- builder.append(message.first); |
- appendValue(builder, *this, value); |
- builder.append(message.second); |
- } |
+ auto message = messageForStatus(status()); |
+ builder.append(message.first); |
+ appendValue(builder, *this, value); |
+ builder.append(message.second); |
return builder.toString(); |
} |