[whatwg] style sheet blocking scripts
David Hyatt
hyatt at apple.com
Thu Dec 10 10:13:56 PST 2009
This is false. WebKit will block the parser when it encounters an external script if there are pending stylesheet loads. However we have a speculative preloader that will continue to parse and load resources beyond that script (but the real parser will be blocked).
dave
On Dec 9, 2009, at 3:42 PM, tali garsiel wrote:
> Well, not completely.
> 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.
>
> > Date: Wed, 9 Dec 2009 17:01:30 +0000
> > From: ian at hixie.ch
> > To: t_garsiel at hotmail.com; bzbarsky at MIT.EDU
> > CC: whatwg at whatwg.org
> > Subject: Re: [whatwg] style sheet blocking scripts
> >
> > On Wed, 28 Oct 2009, tali garsiel wrote:
> > >
> > > This is a quote from Section 4.2 of the spec:
> > >
> > > "A style sheet in the context of the Document of an HTML parser or XML
> > > parser is said to be a style sheet blocking scripts if the element was
> > > created by that Document's parser, and the element is either a style
> > > element or a link element that was an external resource link that
> > > contributes to the styling processing model when the element was c reated
> > > by the parser, and the element's style sheet was enabled when the
> > > element was created by the parser, and the element's style sheet ready
> > > flag is not yet set, and, the last time the event loop reached step 1,
> > > the element was in that Document"
> > >
> > > And the section about parsing - the "<script>" tag says that before
> > > executing a script the parser must:
> > >
> > > 3. Spin the event loop until there is no style sheet blocking scripts
> > > and the script's "ready to be parser-executed" flag is set.
> > >
> > > I have two questions:
> > >
> > > 1. As far as I know, Firefox and Webkit have a "stall on demand"
> > > behavior, where a stylesheet blocks a script only if the script asks
> > > from style information. According to the spec the style sheet always
> > > blocks a script, am I right?
> > >
> > > 2. Can you clarify the condition - "the element's style sheet was
> > > enabled when the element was created by the parser, and the element's
> > > style sheet ready flag is not yet set, and, the last time the event loop
> > > reached step 1, the element was in that Document"
> > >
> > > Does it mean the style sheet blocks scripts only if it's currently being
> > > parsed?
> >
> > On Wed, 28 Oct 2009, Boris Zbarsky wrote:
> > > On 10/28/09 2:59 AM, tali garsiel wrote:
> > > > 1. As far as I know, Firefox and Webkit have a "stall on demand"
> > > > behavior, where a stylesheet blocks a script only if the script asks
> > > > from style information.
> > >
> > > You know wrong, sorry. Firefox has the behavior the spec describes;
> > > webkit blocks the parser completely on stylesheets (the behavior Firefox
> > > used to have). Last I chec ked, at least.
> > >
> > > > 2. Can you clarify the condition - "the element's style sheet was
> > > > enabled when the element was created by the parser, and the element's
> > > > style sheet ready flag is not yet set, and, the last time the event
> > > > loop reached step 1, the element was in that Document"
> > >
> > > The parts of that condition basically mean:
> > >
> > > 1) When the element was created by the parser, it was in the then-enabled
> > > stylesheet set (i.e. not an alternate stylesheet).
> > > 2) The stylesheet, or one of its @import descendants, is still loading.
> > > 3) The stylesheet linking element is still in the document (so the stylesheet
> > > still applies).
> >
> > Thanks Boris.
> >
> > Tali, does this answer your question to your satisfaction?
> >
> > --
> > Ian Hickson U+1047E )\._.,--....,'``. fL
> > http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
> > Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
>
> Windows Live Hotmail: Your friends can get your Facebook updates, right from Hotmail®.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20091210/1b388dd7/attachment-0002.htm>
More information about the whatwg
mailing list