NEW 40573
Don't constantly recalculate style unnecessarily if JavaScript is not enabled
https://bugs.webkit.org/show_bug.cgi?id=40573
Summary Don't constantly recalculate style unnecessarily if JavaScript is not enabled
Adam Treat
Reported 2010-06-14 08:31:04 PDT
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.
Attachments
Just for comments please (2.99 KB, patch)
2010-06-14 08:40 PDT, Adam Treat
no flags
Adam Treat
Comment 1 2010-06-14 08:40:51 PDT
Created attachment 58658 [details] Just for comments please We think this approach is correct, but would like feedback from page loading gurus.
Alexey Proskuryakov
Comment 2 2010-06-14 11:34:51 PDT
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?
Note You need to log in before you can comment on or make changes to this bug.