Summary: | SVG Path elements are not correctly updated through pathSegList manipulation on relative values | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexis Deveria <adeveria> | ||||||
Component: | SVG | Assignee: | Dirk Schulze <krit> | ||||||
Status: | RESOLVED DUPLICATE | ||||||||
Severity: | Normal | CC: | davinci, jeffschiller, krit, zimmermann | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.5 | ||||||||
Bug Depends on: | 10827 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Alexis Deveria
2009-10-08 10:01:09 PDT
I've looked a little bit into this and found the cause. The function SVGPathSegList::toPathData() is not completely implemented. Working on a patch. Created attachment 51576 [details]
Tentative patch
I've made a tentative patch to fix this which adds code for relative coordinates in SVGPathSegList::toPathData(). If the approach looks good, SVGPathSegList::getPathSegAtLength() needs to be similarly updated as well.
One cause of the problem is bug 26487. It appears that all "Rel" path data commands are internally stored as "Abs" commands. Inserting a "relative lineto" (l - that's a lower case "L") command affects all subsequent data points. The above patch adds hackery to properly compute the coordinates in SVGPathSegList::toPathData(). The correct fix would be to not convert the data path commands to "Abs" to begin with. Comment on attachment 51576 [details]
Tentative patch
As discussed on webkit-dev, this is probably not the right approach. Did you investigate a bit more, David?
(In reply to comment #4) > (From update of attachment 51576 [details]) > As discussed on webkit-dev, this is probably not the right approach. Did you > investigate a bit more, David? I investigated a bit more, but I haven't had time to come up with a proper solution. It is now possible to create unaltered SVGPathSegLists. Still use normalized SVGPathSegLists, untill we have a way to synchroinze dAttr, pathSegList and normalizedPathSegList. |