diff options
author | fs <fs@opera.com> | 2016-01-20 12:40:25 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-20 20:41:40 +0000 |
commit | 1611c9b2863c1ba9cd3067186090e8917a8a23c3 (patch) | |
tree | 5d2a404138ffec7950455b1f4709718e4d6247af /third_party/WebKit/Source/platform/JSONValues.h | |
parent | 89b8559b921b3a523dea4c7002cb79e2531579c3 (diff) | |
download | chromium_src-1611c9b2863c1ba9cd3067186090e8917a8a23c3.zip chromium_src-1611c9b2863c1ba9cd3067186090e8917a8a23c3.tar.gz chromium_src-1611c9b2863c1ba9cd3067186090e8917a8a23c3.tar.bz2 |
Extended error reporting for SVG attribute parsing
This CL extends the SVG attribute parsing error reporting functionality
to allow more precise (and hopefully helpful) reporting.
The main improvements consist of:
1) More (precise) status codes
Avoids generic error messages.
2) Locus support
Allows reducing the amount of context, which should make it easier
to pinpoint the actual error. (Preferably the offending character
should be highlighted somehow in the error message, but that is
left as future work.)
To achieve this, the SVGParsingError enumeration is turned into a
thin wrapper class around a status code and a locus. The status codes
move to a new enumeration 'SVGStatus'.
Formatting of error messages are moved out of
SVGElement::reportAttributeParsingError and into SVGParsingError.cpp
(new file).
This CL start adding extended reporting to a few of the value classes:
SVGBoolean, SVGEnumeration and SVGPreserverAspectRatio; to illustrate
the mechanism. Further value classes will be annotated in later CLs.
For that reason the "generic" errors are kept in their current form - to
be removed as more value class parsers get converted.
BUG=231612
Review URL: https://codereview.chromium.org/1588993005
Cr-Commit-Position: refs/heads/master@{#370479}
Diffstat (limited to 'third_party/WebKit/Source/platform/JSONValues.h')
-rw-r--r-- | third_party/WebKit/Source/platform/JSONValues.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/third_party/WebKit/Source/platform/JSONValues.h b/third_party/WebKit/Source/platform/JSONValues.h index bdb9d2d..44e42c1 100644 --- a/third_party/WebKit/Source/platform/JSONValues.h +++ b/third_party/WebKit/Source/platform/JSONValues.h @@ -323,6 +323,7 @@ public: using JSONArrayBase::end; }; +PLATFORM_EXPORT void escapeStringForJSON(const String&, StringBuilder*); void doubleQuoteStringForJSON(const String&, StringBuilder*); } // namespace blink |