[Webkit-unassigned] [Bug 17063] New: SVGTextElement.getRotationOfChar() fails (Acid3 bug)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 29 00:36:07 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=17063

           Summary: SVGTextElement.getRotationOfChar() fails (Acid3 bug)
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org
                CC: zimmermann at kde.org


SVGTextElement.getRotationOfChar() fails (Acid3 bug)

Test 79: expected 90, got: 0 - getRotationOfChar(0) failed.

    function () {
      // test 79: SVG textPath and getRotationOfChar(), from Erik Dahlstrom
      //
      // The getRotationOfChar[4] method fetches the midpoint rotation
      // of a glyph defined by a character (in this testcase there is
      // a simple 1:1 correspondence between the two). The path is
      // defined in the empty.svg file, and consists of first a line
      // going down, then followed by a line that has a 45 degree
      // slope and then followed by a horizontal line. The length of
      // each path segment have been paired with the advance of each
      // glyph, so that each glyph will be on each of the three
      // different path segments (see text on a path layout rules[5]).
      // Thus the rotation of the first glyph is 90 degrees, the
      // second 45 degrees and the third 0 degrees.
      //
      // [4]
http://www.w3.org/TR/SVG11/text.html#InterfaceSVGTextContentElement
      // [5] http://www.w3.org/TR/SVG11/text.html#TextpathLayoutRules

      var svgns = "http://www.w3.org/2000/svg";
      var xlinkns = "http://www.w3.org/1999/xlink";
      var svgdoc = kungFuDeathGrip.firstChild.contentDocument;
      assert(svgdoc, "contentDocument failed on <object> for svg document.");
      var svg = svgdoc.documentElement;
      var text = svgdoc.createElementNS(svgns, "text");
      text.setAttribute("font-size", "4000");
      text.setAttribute("font-family", "ACID3svgfont");
      var textpath = svgdoc.createElementNS(svgns, "textPath");
      textpath.setAttributeNS(xlinkns, "xlink:href", "#path");
      var textContent = svgdoc.createTextNode("abc");
      textpath.appendChild(textContent);
      text.appendChild(textpath);
      svg.appendChild(text);
      assertEquals(text.getRotationOfChar(0), 90, "getRotationOfChar(0)
failed.");
      assertEquals(text.getRotationOfChar(1), 45, "getRotationOfChar(1)
failed.");
      assertEquals(text.getRotationOfChar(2), 0, "getRotationOfChar(2)
failed.");
      var code = -1000;
      try {
        var val = text.getRotationOfChar(-1)
      } catch(e) {
        code = e.code;
      }
      assertEquals(code, DOMException.INDEX_SIZE_ERR, "getRotationOfChar #1
exception failed.");
      code = -1000;
      try {
        var val = text.getRotationOfChar(4)
      } catch(e) {
        code = e.code;
      }
      assertEquals(code, DOMException.INDEX_SIZE_ERR, "getRotationOfChar #2
exception failed.");
      return 5;
    },


-- 
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