|
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
Committed: https://crrev.com/1611c9b2863c1ba9cd3067186090e8917a8a23c3
Cr-Commit-Position: refs/heads/master@{#370479}
Total comments: 17
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+276 lines, -117 lines) |
Patch |
|
M |
third_party/WebKit/LayoutTests/TestExpectations
|
View
|
1
2
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/core.gypi
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGAngle.cpp
|
View
|
1
2
3
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGAngleTearOff.cpp
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGAnimatedLength.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGAnimationElement.cpp
|
View
|
1
2
3
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGBoolean.cpp
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGElement.cpp
|
View
|
1
2
3
|
2 chunks |
+2 lines, -17 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGEnumeration.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGFEConvolveMatrixElement.cpp
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGFitToViewBox.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGInteger.cpp
|
View
|
1
2
3
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGIntegerOptionalInteger.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGLength.cpp
|
View
|
1
2
3
|
2 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGLengthList.cpp
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGNumber.cpp
|
View
|
1
2
3
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGNumberList.cpp
|
View
|
1
2
3
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGNumberOptionalNumber.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGParsingError.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+60 lines, -3 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/Source/core/svg/SVGParsingError.cpp
|
View
|
1
2
3
|
1 chunk |
+105 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGPath.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGPathElement.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGPoint.cpp
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGPointList.cpp
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGPreserveAspectRatio.cpp
|
View
|
1
2
3
|
7 chunks |
+26 lines, -28 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGRect.cpp
|
View
|
1
2
3
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGString.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGStringList.cpp
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/svg/SVGTransformList.cpp
|
View
|
1
2
3
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/JSONValues.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/JSONValues.cpp
|
View
|
|
2 chunks |
+7 lines, -2 lines |
0 comments
|
Download
|
Total messages: 15 (3 generated)
|