<div class="gmail_quote">2009/12/9 tali garsiel <span dir="ltr"><<a href="mailto:t_garsiel@hotmail.com">t_garsiel@hotmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




<div>
Well, not completely.<div>Regarding the first question- Webkit guys told me (on their IRC channel) that the don't block the parser and only block scripts that request visual information, so I'm still  confused.<br>
</div></div></blockquote><div><br></div><div>Here's my understanding of the implementation inside WebKit currently:</div><div>During parsing, WebKit does not block the parser on stylesheet loads, but does block external scripts from running until previously-encountered stylesheets have loaded.  WebKit does not suspend script execution on requests for visual information if stylesheets have not loaded (for example for inline scripts or in the case of stylesheets added dynamically after parsing has completed).  WebKit does suspend parsing of the document on script loads, but has a speculative preloader to attempt to start fetches for resources past the <script> tag.</div>
<div><br></div><div>- James</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div><br>> Date: Wed, 9 Dec 2009 17:01:30 +0000<br>
> From: <a href="mailto:ian@hixie.ch" target="_blank">ian@hixie.ch</a><br>> To: <a href="mailto:t_garsiel@hotmail.com" target="_blank">t_garsiel@hotmail.com</a>; <a href="mailto:bzbarsky@MIT.EDU" target="_blank">bzbarsky@MIT.EDU</a><br>
> CC: <a href="mailto:whatwg@whatwg.org" target="_blank">whatwg@whatwg.org</a><br>> Subject: Re: [whatwg] style sheet blocking scripts<div><div></div><div class="h5"><br>> <br>> On Wed, 28 Oct 2009, tali garsiel wrote:<br>
> > <br>> > This is a quote from Section 4.2 of the spec:<br>> > <br>> > "A style sheet in the context of the Document of an HTML parser or XML <br>> > parser is said to be a style sheet blocking scripts if the element was <br>
> > created by that Document's parser, and the element is either a style <br>> > element or a link element that was an external resource link that <br>> > contributes to the styling processing model when the element was c
 reated <br>> > by the parser, and the element's style sheet was enabled when the <br>> > element was created by the parser, and the element's style sheet ready <br>> > flag is not yet set, and, the last time the event loop reached step 1, <br>
> > the element was in that Document"<br>> > <br>> > And the section about parsing - the "<script>" tag says that before <br>> > executing a script the parser must:<br>> > <br>
> > 3. Spin the event loop until there is no style sheet blocking scripts <br>> > and the script's "ready to be parser-executed" flag is set.<br>> > <br>> > I have two questions:<br>> > <br>
> > 1. As far as I know, Firefox and Webkit have a "stall on demand" <br>> > behavior, where a stylesheet blocks a script only if the script asks <br>> > from style information. According to the spec the style sheet always <br>
> > blocks a script, am I right?<br>> >
  <br>> > 2. Can you clarify the condition - "the element's style sheet was <br>> > enabled when the element was created by the parser, and the element's <br>> > style sheet ready flag is not yet set, and, the last time the event loop <br>
> > reached step 1, the element was in that Document"<br>> > <br>> > Does it mean the style sheet blocks scripts only if it's currently being <br>> > parsed?<br>> <br>> On Wed, 28 Oct 2009, Boris Zbarsky wrote:<br>
> > On 10/28/09 2:59 AM, tali garsiel wrote:<br>> > > 1. As far as I know, Firefox and Webkit have a "stall on demand" <br>> > > behavior, where a stylesheet blocks a script only if the script asks <br>
> > > from style information.<br>> > <br>> > You know wrong, sorry.  Firefox has the behavior the spec describes; <br>> > webkit blocks the parser completely on stylesheets (the behavior Firefox <br>
</div></div>> > used to have).  Last I chec
 ked, at least.<div class="im"><br>> > <br>> > > 2. Can you clarify the condition - "the element's style sheet was <br>> > > enabled when the element was created by the parser, and the element's <br>
> > > style sheet ready flag is not yet set, and, the last time the event <br>> > > loop reached step 1, the element was in that Document"<br>> > <br>> > The parts of that condition basically mean:<br>
> > <br>> > 1)  When the element was created by the parser, it was in the then-enabled<br>> > stylesheet set (i.e. not an alternate stylesheet).<br>> > 2)  The stylesheet, or one of its @import descendants, is still loading.<br>
> > 3)  The stylesheet linking element is still in the document (so the stylesheet<br>> > still applies).<br>> <br>> Thanks Boris.<br>> <br>> Tali, does this answer your question to your satisfaction?<br>
> <br>> -- <br>> Ian Hickson               U+1047E             
    )\._.,--....,'``.    fL<br>> <a href="http://ln.hixie.ch/" target="_blank">http://ln.hixie.ch/</a>       U+263A                /,   _.. \   _\  ;`._ ,.<br>> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'<br>
</div></div><div class="hm">                                          <br><hr>Windows Live Hotmail:  <a href="http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009" target="_blank">Your friends can get your Facebook updates, right from Hotmail®.</a></div>
</div>
</blockquote></div><br>