RESOLVED FIXED Bug 16112
Some Web Inspector UI elements use offsetWidth and offsetHeight before the stylesheet loads
https://bugs.webkit.org/show_bug.cgi?id=16112
Summary Some Web Inspector UI elements use offsetWidth and offsetHeight before the st...
Timothy Hatcher
Reported 2007-11-24 00:08:05 PST
If the panel shows before the stylesheet loads then we will get 0 or a negative number from offsetWidth.
Attachments
Patch (3.08 KB, patch)
2007-11-24 00:19 PST, Timothy Hatcher
no flags
Revised patch (5.97 KB, patch)
2007-11-24 10:34 PST, Timothy Hatcher
aroben: review+
Timothy Hatcher
Comment 1 2007-11-24 00:19:57 PST
mitz
Comment 2 2007-11-24 01:03:05 PST
Sounds like onload events for stylesheets could solve this...
Timothy Hatcher
Comment 3 2007-11-24 09:45:35 PST
DO we support load events for stylesheets?
mitz
Comment 4 2007-11-24 09:50:55 PST
(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).
Timothy Hatcher
Comment 5 2007-11-24 10:19:00 PST
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.
Timothy Hatcher
Comment 6 2007-11-24 10:34:25 PST
Created attachment 17486 [details] Revised patch
Adam Roben (:aroben)
Comment 7 2007-11-24 11:12:14 PST
Comment on attachment 17486 [details] Revised patch r=me
Timothy Hatcher
Comment 8 2007-11-24 11:19:12 PST
Note You need to log in before you can comment on or make changes to this bug.