RESOLVED FIXED 57318
Incorrect offset of svg <use> element which is in <symbol> element
https://bugs.webkit.org/show_bug.cgi?id=57318
Summary Incorrect offset of svg <use> element which is in <symbol> element
Leo Yang
Reported 2011-03-29 02:36:28 PDT
When a svg <use> is in <symbol> webkit won't take offset into account. The following code should be rendered as a 100*100 green rectangle visually. Patch is coming soon... <?xml version="1.0" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="100" height="100"> <defs> <symbol id="s" viewBox="0 0 1 2"> <rect fill="green" width="1" height="2" /> </symbol> <symbol id="s1" viewBox="0 0 2 2"> <use xlink:href="#s" x="0" y="0" width="1" height="2" /> <use xlink:href="#s" x="1" y="0" width="1" height="2" /> </symbol> </defs> <use xlink:href="#s1" x="0" y="0" width="100" height="100" /> </svg>
Attachments
Patch (9.04 KB, patch)
2011-03-29 03:16 PDT, Leo Yang
no flags
Leo Yang
Comment 1 2011-03-29 03:16:13 PDT
Dirk Schulze
Comment 2 2011-03-29 03:38:24 PDT
Comment on attachment 87291 [details] Patch Why does it just affect symbol? what about svg or other elements?
Nikolas Zimmermann
Comment 3 2011-03-29 03:47:52 PDT
Comment on attachment 87291 [details] Patch Great catch again! Dirk: SVGShadowTreeContainerElement is only used for symbols, thus that's the only way the bug can be triggered. Leo, does this affect Sierpinski carpet?
WebKit Commit Bot
Comment 4 2011-03-29 06:28:33 PDT
Comment on attachment 87291 [details] Patch Clearing flags on attachment: 87291 Committed r82242: <http://trac.webkit.org/changeset/82242>
WebKit Commit Bot
Comment 5 2011-03-29 06:28:37 PDT
All reviewed patches have been landed. Closing bug.
Leo Yang
Comment 6 2011-03-29 18:57:57 PDT
(In reply to comment #3) > (From update of attachment 87291 [details]) > Great catch again! Dirk: SVGShadowTreeContainerElement is only used for symbols, thus that's the only way the bug can be triggered. > Leo, does this affect Sierpinski carpet? Yes, webkit renders Sierpinski_carpet_6.svg fine with this patch.
Note You need to log in before you can comment on or make changes to this bug.