Bug 13797 - SVG Text not displayed if moved to the right
Summary: SVG Text not displayed if moved to the right
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-21 09:26 PDT by Yoah Bar-David
Modified: 2007-05-24 05:33 PDT (History)
2 users (show)

See Also:


Attachments
Test case from Comment #0 (1.03 KB, text/html)
2007-05-21 23:29 PDT, David Kilzer (:ddkilzer)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yoah Bar-David 2007-05-21 09:26:37 PDT
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>
Comment 1 David Kilzer (:ddkilzer) 2007-05-21 23:29:30 PDT
Created attachment 14648 [details]
Test case from Comment #0

Please save test cases as attached files in the future.  Thanks!
Comment 2 Nikolas Zimmermann 2007-05-24 03:13:38 PDT
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.
Comment 3 mitz 2007-05-24 05:33:09 PDT
(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.