See example file below. When this file is opened, the second table cell displayes correctly centered SVG text. If you change the width of column 1 (id='pad') from 500 to 600, the text in the second cell is no longer displayed at all. <!DOCTYPE HTML> <html> <head> <title>WebKit SVG Bug</title> <script type="text/javascript"> function draw() { var NS = 'http://www.w3.org/2000/svg'; var s = document.createElementNS(NS, "svg"); s.setAttribute("width", 600); s.setAttribute("height", 300); var t = document.createElementNS(NS, "text"); t.setAttribute("font-size", 30); t.setAttribute("stroke", "red"); t.setAttribute("stroke-width", "1"); t.setAttribute("fill", "green"); t.setAttribute("font-family", "Helvetica"); t.setAttribute("text-anchor", "middle"); t.setAttribute("x", "300"); t.setAttribute("y", "26"); t.appendChild(document.createTextNode("Text in SVG, Centered")); s.appendChild(t); document.getElementById("d").appendChild(s); } </script> </head> <body onload="draw()"> <table border="1"> <tr> <td id="pad" style="background-color:#f0f0f0; width:500px;"></td> <td><div style="width:600px;height:300px" id="d"></div></td> </tr> </body> </html>
Created attachment 14648 [details] Test case from Comment #0 Please save test cases as attached files in the future. Thanks!
Thanks for the bug report! It is fixed by using the new SVG text engine which is currently living in the WebKit feature branch - it will be the default engine in future. Closing bug report therefor.
(In reply to comment #2) > Thanks for the bug report! It is fixed by using the new SVG text engine which > is currently living in the WebKit feature branch - it will be the default > engine in future. Closing bug report therefor. > It doesn't feel quite right to me that the bug is marked FIXED in Bugzilla as long as it is not fixed on trunk. I think that the feature branch should not interfere with tracking bugs.