Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.14
-
None
-
None
Description
A conforming CSS parser should ignore rules with values that are not understood.
Batik's CSS parser instead throws an immediate exception, thereby terminating the parsing and skipping the rest of the rules in the relevant block. This leads to missed rules.
The parsing should instead collect all errors, and only report them after having processed the rest of the rules.
Note that the default behavior is to ignore CSS parsing errors, so this leads to silent rendering errors.
The attached example SVG contains:
<circle cx="1" cy="1" r="1" style="fill:#FF0000;text-align:this-value-doesnt-exist;fill:#00FF00;"/>
In a conforming browser (e.g. Chrome, Firefox, Edge, ...) the circle renders green as directed by the last fill:#00FF00 statement.
In batik it renders red as indicated by the first fill:#FF0000 - the last CSS statement is ignored due to the not understood "this-value-doesnt-exist" value for text-align.