Summary: | SVG parser complains about points attribute in polygon and polyline element | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andreas Neumann <a.neumann> | ||||||
Component: | SVG | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | 420+ | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.4 | ||||||||
URL: | http://www.carto.net/papers/svg/samples/shapes.svg | ||||||||
Attachments: |
|
Description
Andreas Neumann
2007-01-27 04:31:34 PST
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
|