[Webkit-unassigned] [Bug 15276] Linear gradient bug in SVG

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 25 11:19:50 PDT 2007


eugene.lazutkin at gmail.com changed:

           What    |Removed                     |Added
            Summary|innerHTML lowercases SVG    |Linear gradient bug in SVG
                   |attributes when it probably |
                   |shouldn't                   |

------- Comment #12 from eugene.lazutkin at gmail.com  2007-09-25 11:19 PDT -------
Eric, I think the direction of this bug took the wrong turn. I don't care about
.innerHTML and I don't use it anywhere in my code. I used it in this particular
example (in read-only fashion) just to show that the structure I generate (svg,
defs, two linear gradients, rects, which reference those gradients) is sound. I
don't know any other easy way to visualize a tree in a way suitable for
attaching to a bug report.

My code produces this bug using standard DOM methods:

document.createElementNS(svg, elemName)
node.setAttribute(attrName, value)
node.setAttributeNS(xlink, "href", url) // for <image>

and some mundane DOM manipulations: mostly appendChild, some insertBefore.

Let me repeat: no innerHTML is used anywhere. Everything works beautifully
except linear gradient. If you want to investigate innerHTML and possible XHTML
problems please open new bug, do not hijack this one.

Curiously enough long time ago somebody modified my code to make it work with
the Webkit by setting x1, y1, x2, and y2 attributes of linearGradient using
setAttributeNS(svg, attrName, value) setting the rest with setAttribute() ---
the whole idea is totally wrong. Amazingly it started to produce a gradient,
but it was always horizontal no matter how you define it. I told you this story
to give you a possible insight in what's broken.

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

More information about the webkit-unassigned mailing list