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 28 matching lines...) Expand all Loading... |
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::ExpectedPathCommand: | 47 case SVGParseStatus::ExpectedPathCommand: |
48 return std::make_pair("Expected path command, ", "."); | 48 return std::make_pair("Expected path command, ", "."); |
| 49 case SVGParseStatus::ExpectedStartOfArguments: |
| 50 return std::make_pair("Expected '(', ", "."); |
| 51 case SVGParseStatus::ExpectedTransformFunction: |
| 52 return std::make_pair("Expected transform function, ", "."); |
49 case SVGParseStatus::NegativeValue: | 53 case SVGParseStatus::NegativeValue: |
50 return std::make_pair("A negative value is not valid. (", ")"); | 54 return std::make_pair("A negative value is not valid. (", ")"); |
51 case SVGParseStatus::ZeroValue: | 55 case SVGParseStatus::ZeroValue: |
52 return std::make_pair("A value of zero is not valid. (", ")"); | 56 return std::make_pair("A value of zero is not valid. (", ")"); |
53 case SVGParseStatus::ParsingFailed: | 57 case SVGParseStatus::ParsingFailed: |
54 default: | 58 default: |
55 ASSERT_NOT_REACHED(); | 59 ASSERT_NOT_REACHED(); |
56 break; | 60 break; |
57 } | 61 } |
58 return std::make_pair("", ""); | 62 return std::make_pair("", ""); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 117 |
114 auto message = messageForStatus(status()); | 118 auto message = messageForStatus(status()); |
115 builder.append(message.first); | 119 builder.append(message.first); |
116 appendValue(builder, *this, value); | 120 appendValue(builder, *this, value); |
117 builder.append(message.second); | 121 builder.append(message.second); |
118 } | 122 } |
119 return builder.toString(); | 123 return builder.toString(); |
120 } | 124 } |
121 | 125 |
122 } // namespace blink | 126 } // namespace blink |
OLD | NEW |