From e1e23c33424d617d4072dc2d112905681e26fc91 Mon Sep 17 00:00:00 2001 From: Dominic Farolino Date: Wed, 12 Sep 2018 23:11:19 -0400 Subject: [PATCH 01/18] Start working on style sheet done flag --- source | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/source b/source index 2f72953c164..2b7a1c87387 100644 --- a/source +++ b/source @@ -15157,19 +15157,27 @@ interface HTMLStyleElement : HTMLElement {

Interactions of styling and scripting

-

Style sheets, whether added by a link element, a style element, an - <?xml-stylesheet?> PI, an HTTP `Link` header, or - some other mechanism, have a style sheet ready flag, which is initially unset.

- -

When a style sheet is ready to be applied, its style sheet ready flag must be set. - If the style sheet referenced no other resources (e.g. it was an internal style sheet given by a - style element with no @import rules), then the style rules must - be immediately made available to script; otherwise, the style rules must only be made available - to script once the event loop reaches its update the rendering step.

- -

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 all of - the following conditions occur:

+

Style sheets, whether added by a link + element, a style element, an <?xml-stylesheet?> PI, an HTTP + `Link` header, or some other mechanism, have a style sheet + done flag, which is initially unset. When a style sheet is ready to be applied, its + style sheet done flag must be set.

+ +

The style sheet done flag is used to indicate when a style sheet has + been obtained, if necessary, and is ready to be applied. The purpose of this is to make a + style sheet that is blocking scripts no longer a style sheet of this category, so that + scripting is no longer blocked. The algorithm that creates and applies the style sheet is + responsible for setting this flag.

+ + If the style sheet referenced no other resources (e.g., + it was an internal style sheet given by a style element with no + @import rules), then the style rules must be immediately made + available to script; otherwise, the style rules must only be made available to script once the + event loop reaches its update the rendering step. + +

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 all of the following conditions occur: