OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/svg/SVGParsingError.h" | 5 #include "core/svg/SVGParsingError.h" |
6 | 6 |
7 #include "core/dom/QualifiedName.h" | 7 #include "core/dom/QualifiedName.h" |
8 #include "platform/JSONValues.h" | 8 #include "platform/JSONValues.h" |
9 #include "wtf/text/CharacterNames.h" | 9 #include "wtf/text/CharacterNames.h" |
10 #include "wtf/text/StringBuilder.h" | 10 #include "wtf/text/StringBuilder.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 case SVGParseStatus::ExpectedEnumeration: | 37 case SVGParseStatus::ExpectedEnumeration: |
38 return std::make_pair("Unrecognized enumerated value, ", "."); | 38 return std::make_pair("Unrecognized enumerated value, ", "."); |
39 case SVGParseStatus::ExpectedInteger: | 39 case SVGParseStatus::ExpectedInteger: |
40 return std::make_pair("Expected integer, ", "."); | 40 return std::make_pair("Expected integer, ", "."); |
41 case SVGParseStatus::ExpectedLength: | 41 case SVGParseStatus::ExpectedLength: |
42 return std::make_pair("Expected length, ", "."); | 42 return std::make_pair("Expected length, ", "."); |
43 case SVGParseStatus::ExpectedMoveToCommand: | 43 case SVGParseStatus::ExpectedMoveToCommand: |
44 return std::make_pair("Expected moveto path command ('M' or 'm'), ", "."
); | 44 return std::make_pair("Expected moveto path command ('M' or 'm'), ", "."
); |
45 case SVGParseStatus::ExpectedNumber: | 45 case SVGParseStatus::ExpectedNumber: |
46 return std::make_pair("Expected number, ", "."); | 46 return std::make_pair("Expected number, ", "."); |
| 47 case SVGParseStatus::ExpectedNumberOrPercentage: |
| 48 return std::make_pair("Expected number or percentage, ", "."); |
47 case SVGParseStatus::ExpectedPathCommand: | 49 case SVGParseStatus::ExpectedPathCommand: |
48 return std::make_pair("Expected path command, ", "."); | 50 return std::make_pair("Expected path command, ", "."); |
49 case SVGParseStatus::ExpectedStartOfArguments: | 51 case SVGParseStatus::ExpectedStartOfArguments: |
50 return std::make_pair("Expected '(', ", "."); | 52 return std::make_pair("Expected '(', ", "."); |
51 case SVGParseStatus::ExpectedTransformFunction: | 53 case SVGParseStatus::ExpectedTransformFunction: |
52 return std::make_pair("Expected transform function, ", "."); | 54 return std::make_pair("Expected transform function, ", "."); |
53 case SVGParseStatus::NegativeValue: | 55 case SVGParseStatus::NegativeValue: |
54 return std::make_pair("A negative value is not valid. (", ")"); | 56 return std::make_pair("A negative value is not valid. (", ")"); |
55 case SVGParseStatus::ZeroValue: | 57 case SVGParseStatus::ZeroValue: |
56 return std::make_pair("A value of zero is not valid. (", ")"); | 58 return std::make_pair("A value of zero is not valid. (", ")"); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 119 |
118 auto message = messageForStatus(status()); | 120 auto message = messageForStatus(status()); |
119 builder.append(message.first); | 121 builder.append(message.first); |
120 appendValue(builder, *this, value); | 122 appendValue(builder, *this, value); |
121 builder.append(message.second); | 123 builder.append(message.second); |
122 } | 124 } |
123 return builder.toString(); | 125 return builder.toString(); |
124 } | 126 } |
125 | 127 |
126 } // namespace blink | 128 } // namespace blink |
OLD | NEW |