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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 17 12:28:09 PDT 2012


--- Comment #17 from Bryan <bmcquade at google.com>  2012-06-17 12:28:08 PST ---
I can understand where you are coming from, Ilya. On first glance it seems odd to allow sheets to be non-blocking. But (1) script-inserted scripts have worked this way for a long time (I claim the same arguments could be made for scripts: that the side-effects of the node-inserted script are not visible to subsequent scripts, which also can be argued as odd but is the way HTML5 specs it), and (2) the HTML5 spec explicitly calls out that only parser-inserted sheets should block ("A style sheet in the context of the Document of an HTML parser or XML parser is said to be a style sheet that is blocking scripts if the element was created by that Document's parser..."). If someone really needs to make a script or sheet blocking and it is being inserted via javascript, there is a mechanism to make this happen: document.write. If it is critical to make the sheet or script blocking, the spec is clear that document.write is the way to do this.

I'm open to blocking construction of the render tree on these sheets but it seems pretty clear that (1) the HTML5 spec does not indicate that these need to be blocking and (2) there already exists a mechanism to insert either scripts or sheets in a blocking manner from JS (doc.write). So I do not think it would be correct to block the renderer here. Given that Firefox has implemented this in a non-blocking way it also seems clear that sites like nytimes.com that insert sheets via script do not depend on it blocking the renderer. Blocking construction of the render tree does seem reasonable to me, though.

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