[Webkit-unassigned] [Bug 78980] SVG error parsing empty path

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 23 13:48:15 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=78980





--- Comment #4 from Philip Rogers <pdr at google.com>  2012-02-23 13:48:15 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > Overall this change looks good to me, though I think there may be a corner case dealing with animated paths that you may want to consider:
> > <path d="M700,200 h-150 a150,150 0 1,0 150,-150 z" fill="red" stroke="blue" stroke-width="5">
> > <animate attributeName="d" from="" to="" dur="1s" repeatCount="indefinite" />
> > </path>
> > 
> > In this example I think the path should become disabled, but I think an argument could be made the other way. FWIW, Firefox does disable the path in this case but we don't.
> 
> I feel that webkit behavior is correct. If 'from' and 'to' values are empty, we should respect the 'path data' value in "path" element for better UX.
> 
> FYI, If I apply animation to 'opacity' with 'from' and 'to' empty, then firefox respects the opacity attribute value mentioned in the path element.
> 
> <path d="M500,200 h-150 a150,150 0 1,0 150,-150  z" opacity=".5" fill="red" stroke="blue" stroke-width="5" >
> <animate attributeName="opacity" from="" to="" dur="1s" repeatCount="indefinite" /> </path>

I don't think this is valid. The reason opacity is different is that values of "" are not valid--opacity should be a number--but "" is a valid path. In your opacity example you are passing an invalid opacity value and I suspect the animation is considered invalid, and is simply ignored. Whereas for path animations I think "" should not be ignored because it is a valid path.

> 
> I am not an expert in this area, please correct me if I am wrong. Also, it might be good to handle this corner case in a different bug.

I don't know a whole lot about this code either so please just consider my point a friendly suggestion :) My feeling is that your fix for this bug is too local--you've skipped the error printing but the real bug is that empty paths should not be treated as errors. That said, I am not a reviewer so please do wait for someone with a little more knowledge in this area to respond before doing much work.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list