I concur with the previous message. This is quite tricky to replicate. When I run a test from the file system, it works ok. When I run it from a server running on localhost, it fails. When the css is included it works ok, when the css file is referenced, it fails. I've attached a simple test case which includes a separate css file, and commented out inline css. It also has a timeout() commented out on the function that invokes the dimensions. On my local machine, 10 ms works, but less doesn't.
the more complicated real problem I'm having returns variations of results, not just the window dimensions, i.e. some of the values (padding, border, margin etc) are correct and some are not.
If memory serves me, the callbacks from WebKit are a little unreliable.:-(
I'm running Safari 3.1.2 on Mac OS X 5.5 (Leopard). Hope this helps.