Because WebKit continues parsing before it loads stylesheets WebKit tries to recalculate styles and run layouts whenever it processes a style sheet. This is only necessary so that JavaScript gets correct answers during load. When JavaScript is not enabled this is unnecessary overhead.
Created attachment 58658 [details] Just for comments please We think this approach is correct, but would like feedback from page loading gurus.
I think display:none has many effects that go beyond providing incorrect answers to JavaScript. But I don't have a specific example that would make this idea implausible. > WebKit tries to recalculate styles and run layouts whenever it processes a style sheet. I'm not sure if that's entirely accurate. Why would one need to force layout with document.body.offsetTop if that were so?