In the given example there is a polygon and polyline element. Webkit complains in the Javascript Console: Error: Problem parsing points="160,200 180,230 200,210 234,220" Error: Problem parsing points="49,272 57,297 114,282 63,314 71,339 49,324 27,339 35,314 13,297 40,297" However, as far as I know this is correct syntax and Webkit also seems to render it correctly. Maybe this is an unnecessary warning? Maybe there is also a connection to this bug: http://bugs.webkit.org/show_bug.cgi?id=12171 ?
Created attachment 12722 [details] First attempt It turns out the previous implementation never returned true, this one does, so now only errors will be reported for illegal points values. Cheers, Rob.
Comment on attachment 12722 [details] First attempt Fix looks fine. I'd like to see the test in the patch too. In addition, I'd like the test to be a systematic thorough test of the parser. To see what I mean, look, for example, at the mini-test-suite I added for the preserve aspect ratio parser (LayoutTests/svg/dom/preserve-aspect-ratio-parser.html).
Created attachment 13223 [details] Now with testcase Now with testcase :) Note that the patch changes behaviour on error; when there is an error parsing the points attr, the points list is cleared, this matches Opera behaviour. I also had to change a test because of this. Cheers, Rob.
Comment on attachment 13223 [details] Now with testcase Looks great! I'd like to see a few more test cases in points-parser.html, for example with leading or trailing whitespace, but this looks really great to me. r=me
Landed in r19732.