[Webkit-unassigned] [Bug 88869] renderer should not block on script-inserted stylesheets

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 15 08:48:36 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=88869





--- Comment #9 from Tony Gentilcore <tonyg at chromium.org>  2012-06-15 08:48:35 PST ---
(From update of attachment 147455)
View in context: https://bugs.webkit.org/attachment.cgi?id=147455&action=review

A couple of suggestions on the test, but the rest looks good to me.

Hyatt, do you want a chance to review?

> LayoutTests/http/tests/css/script-inserted-stylesheet.html:39
> +      timerID = window.setInterval(function() {checkStyleSheetLoaded(elem)}, 30);

elem.onload would be your friend here.

But rather than checking times at all, why not just verify that the sheet is not in the document at the time the below scripts run. Then you don't even have to wait the 1s for the sheet to load.

> LayoutTests/http/tests/css/script-inserted-stylesheet.html:53
> +    document.write('<scr' + 'ipt type="text/javascript" src="resources/script-inserted-stylesheet-external-script-2.js"></scr' + 'ipt>');

Is there any reason to doc.write these as opposed to including them directly.

Also, it would be a little cleaner to do <script ... onload="onScript1Loaded()"> instead of having to have special script resources that call methods in the root doc.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list