Jxtps created BATIK-1308:
----------------------------

             Summary: CSS Parser stops parsing on bad rule and ignores 
subsequent rules
                 Key: BATIK-1308
                 URL: https://issues.apache.org/jira/browse/BATIK-1308
             Project: Batik
          Issue Type: Bug
          Components: CSS
    Affects Versions: 1.14
            Reporter: Jxtps
         Attachments: SVG_Circle.svg

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. 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-h...@xmlgraphics.apache.org

Reply via email to