title: offsetWidth returns wrong width in css animated block under Chrome
body: <p>I'm trying to make a kind of "news bar" on a web page.
  The bar use a CSS animation, and the text content is refreshed on each iteration using ajax to retrieve data from an RSS feed.</p>
  
  <p>My problem is that the content length may vary, so I want to set the size of the font used to display the text small enough to display all the content.</p>
  
  <p>I then use this function to resize the text content:</p>
  
  <p><code>function resize(content /*content div*/, maxHeight/*bar height*/, maxWidth /*bar width*/) {
      content.parentNode.style.fontSize = maxHeight + 'px';
      var totalwidth = content.offsetWidth;
      if (totalwidth &gt; maxWidth) {
          content.parentNode.style.fontSize = (maxHeight * maxWidth / totalwidth) + 'px';
      }
  }</code></p>
  
  <p>It sometimes works on first iteration, but after it returns totally wrong values (like 36) for totalWidth.
  If I put a breakpoint on the 'if' line the debugger display a coherent value (like 4320) for content.offsetWidth.</p>
  
  <p>How can I fix this ?</p>