<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>17063</bug_id>
          
          <creation_ts>2008-01-29 00:36:07 -0800</creation_ts>
          <short_desc>SVGTextElement.getRotationOfChar() sometimes fails (and then test 78 of Acid3 fails)</short_desc>
          <delta_ts>2011-05-22 14:19:20 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://acid3.acidtests.org</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>17064</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cshu</cc>
    
    <cc>ian</cc>
    
    <cc>ismail</cc>
    
    <cc>krit</cc>
    
    <cc>webkit</cc>
    
    <cc>zalan</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68552</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-01-29 00:36:07 -0800</bug_when>
    <thetext>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 = &quot;http://www.w3.org/2000/svg&quot;;
      var xlinkns = &quot;http://www.w3.org/1999/xlink&quot;;
      var svgdoc = kungFuDeathGrip.firstChild.contentDocument;
      assert(svgdoc, &quot;contentDocument failed on &lt;object&gt; for svg document.&quot;);
      var svg = svgdoc.documentElement;
      var text = svgdoc.createElementNS(svgns, &quot;text&quot;);
      text.setAttribute(&quot;font-size&quot;, &quot;4000&quot;);
      text.setAttribute(&quot;font-family&quot;, &quot;ACID3svgfont&quot;);
      var textpath = svgdoc.createElementNS(svgns, &quot;textPath&quot;);
      textpath.setAttributeNS(xlinkns, &quot;xlink:href&quot;, &quot;#path&quot;);
      var textContent = svgdoc.createTextNode(&quot;abc&quot;);
      textpath.appendChild(textContent);
      text.appendChild(textpath);
      svg.appendChild(text);
      assertEquals(text.getRotationOfChar(0), 90, &quot;getRotationOfChar(0) failed.&quot;);
      assertEquals(text.getRotationOfChar(1), 45, &quot;getRotationOfChar(1) failed.&quot;);
      assertEquals(text.getRotationOfChar(2), 0, &quot;getRotationOfChar(2) failed.&quot;);
      var code = -1000;
      try {
        var val = text.getRotationOfChar(-1)
      } catch(e) {
        code = e.code;
      }
      assertEquals(code, DOMException.INDEX_SIZE_ERR, &quot;getRotationOfChar #1 exception failed.&quot;);
      code = -1000;
      try {
        var val = text.getRotationOfChar(4)
      } catch(e) {
        code = e.code;
      }
      assertEquals(code, DOMException.INDEX_SIZE_ERR, &quot;getRotationOfChar #2 exception failed.&quot;);
      return 5;
    },</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68558</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-01-29 00:59:21 -0800</bug_when>
    <thetext>I don&apos;t see where Acid3 ever bothers to load the empty.svg file... so I think this test is invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68680</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2008-01-29 11:18:58 -0800</bug_when>
    <thetext>Right now they&apos;re loaded in test 65.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68681</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-01-29 11:47:50 -0800</bug_when>
    <thetext>Ok, so the comment in the test is just wrong.  it says &quot;empty.svg&quot;
when you mean &quot;svg.xml&quot;

http://www.hixie.ch/tests/evil/acid/003/svg.xml

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68867</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2008-01-30 16:15:08 -0800</bug_when>
    <thetext>It&apos;s actually now empty.svg again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69285</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-02-03 16:32:34 -0800</bug_when>
    <thetext>Wow. How entertaining, this test fails intermittently.  It seems to succeed on the first load, but fail on any successive reload.

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

I doubt that has anything to do with the SVG portion of this test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71442</commentid>
    <comment_count>6</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-02-21 17:13:34 -0800</bug_when>
    <thetext>I think it does have to do with SVG.  SVG is reporting an angle of 0 in its own code for the character.  I suspect something going wrong with the SVG font, but I&apos;m not sure what.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71448</commentid>
    <comment_count>7</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-02-21 17:35:49 -0800</bug_when>
    <thetext>This was a bug in the test.  Eric was right.  Because Hixie did not use the custom svg font at all, it never downloaded until attempts were made to use it in tests.  But because the font downloaded async it isn&apos;t necessarily coming in in time.

Acid3 has been changed so that svg.xml now uses the custom font, forcing it to load and delay the onload handler.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71765</commentid>
    <comment_count>8</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-02-24 12:24:39 -0800</bug_when>
    <thetext>The test &quot;Test 78: expected: 90, got: 0 - getRotationOfChar(0) failed.&quot; still sometimes fails.  The behavior is similar to the one observed in test 80.


I think we should reopen the bug to track the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72646</commentid>
    <comment_count>9</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-03-03 17:58:53 -0800</bug_when>
    <thetext>WildFox was having some trouble making the &quot;use the font to delay the onload&quot; handler trick work.  Which would suggest that Acid3 is still timing dependent... and that Robert might not be seeing ghosts. :)

@hyatt: WildFox said he&apos;d ask you about it tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73848</commentid>
    <comment_count>10</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-03-15 18:34:50 -0700</bug_when>
    <thetext>I have not seen this failure at all in the last few weeks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73877</commentid>
    <comment_count>11</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-03-16 02:09:34 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; I have not seen this failure at all in the last few weeks.
&gt; 

Darin, I still able to reproduce the problem. Try to reload the Acid3 test a couple of times. The test should shows you 89/100 score sometimes or crash sometimes ;)  </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242379</commentid>
    <comment_count>12</comment_count>
    <who name="Ismail Donmez">ismail</who>
    <bug_when>2010-06-24 01:53:56 -0700</bug_when>
    <thetext>I can reproduce this on Qt/Windows CE, here is the exact error;

Test 78 failed: expected &apos;90&apos; but got &apos;89.99998474121094&apos; - getRotationOfChar(0) failed.

Looks like there is a rounding problem somewhere.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>330993</commentid>
    <comment_count>13</comment_count>
    <who name="Chang Shu">cshu</who>
    <bug_when>2011-01-07 14:02:58 -0800</bug_when>
    <thetext>I am not able to reproduce the problem on Mac. However, it&apos;s consistently reproducible on Qt Linux (Ubuntu 10.04). I will investigate it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>332291</commentid>
    <comment_count>14</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2011-01-11 05:59:25 -0800</bug_when>
    <thetext>(In reply to comment #13)
&gt; I am not able to reproduce the problem on Mac. However, it&apos;s consistently reproducible on Qt Linux (Ubuntu 10.04). I will investigate it.

for Qt, this is a regression, introduced by http://trac.webkit.org/changeset/66979
I have a fix on this and going to reopen https://bugs.webkit.org/show_bug.cgi?id=43837</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>333079</commentid>
    <comment_count>15</comment_count>
    <who name="Chang Shu">cshu</who>
    <bug_when>2011-01-12 07:32:53 -0800</bug_when>
    <thetext>(In reply to comment #14)
&gt; (In reply to comment #13)
&gt; &gt; I am not able to reproduce the problem on Mac. However, it&apos;s consistently reproducible on Qt Linux (Ubuntu 10.04). I will investigate it.
&gt; 
&gt; for Qt, this is a regression, introduced by http://trac.webkit.org/changeset/66979
&gt; I have a fix on this and going to reopen https://bugs.webkit.org/show_bug.cgi?id=43837

The problem I saw on QtLinux is the same as what Zalan is working on. But it&apos;s not related to the original problems reported earlier. I will get myself off the hook. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>405835</commentid>
    <comment_count>16</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2011-05-18 10:53:44 -0700</bug_when>
    <thetext>I run the test 2 dozen times and can&apos;t reproduce it on Mac. Does it still fail for someone else?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>407704</commentid>
    <comment_count>17</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2011-05-22 14:19:20 -0700</bug_when>
    <thetext>Closing the bug now. If someone can reproduce it, or better has a test, please reopen the bug again.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>