If the panel shows before the stylesheet loads then we will get 0 or a negative number from offsetWidth.
Created attachment 17482 [details] Patch
Sounds like onload events for stylesheets could solve this...
DO we support load events for stylesheets?
(In reply to comment #3) > DO we support load events for stylesheets? I don't think so. I don't even know if they're spec'ed. (So my remark didn't mean to say that you should use them instead).
We also use offsetHeight when updating the DOM tree selection highlight. The highlight will show up filling the screen blue unless we wait for the stylesheet load.
Created attachment 17486 [details] Revised patch
Comment on attachment 17486 [details] Revised patch r=me
Landed in r27999. http://trac.webkit.org/projects/webkit/changeset/27999