Skip to content

Commit de7370b

Browse files
authored
Allow script-inserted body to unblock document's rendering
Fixes #7689.
1 parent 11781a4 commit de7370b

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

source

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9705,20 +9705,16 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {
97059705
<p>Each <code>Document</code> has a <dfn>render-blocking element set</dfn>, a <span>set</span> of
97069706
elements, initially the empty set.</p>
97079707

9708-
<p>Each <code>Document</code> has an <dfn>awaiting parser-inserted body flag</dfn>, a boolean,
9709-
initially true if the document's <span data-x="concept-document-content-type">content type</span>
9710-
is "<code>text/html</code>"; otherwise false.</p>
9711-
9712-
<p class="note" id="await-parser-inserted-body-flag-flip">The flag will be set to false <span
9713-
data-x="insertion mode: after head"> when the parser inserts a <code>body</code> or a
9714-
<code>frameset</code> element</span>.</p>
9708+
<p>A <code>Document</code> <var>document</var> <dfn>allows adding render-blocking elements</dfn>
9709+
if <var>document</var>'s <span data-x="concept-document-content-type">content type</span> is
9710+
"<code>text/html</code>" and <span>the body element</span> of <var>document</var> is null.</p>
97159711

97169712
<p>A <code>Document</code> <var>document</var> is <dfn>render-blocked</dfn> if both of the
97179713
following are true:</p>
97189714

97199715
<ul>
97209716
<li><p><var>document</var>'s <span>render-blocking element set</span> is non-empty, or
9721-
<var>document</var>'s <span>awaiting parser-inserted body flag</span> is true.</p>
9717+
<var>document</var> <span>allows adding render-blocking elements</span>.</p>
97229718

97239719
<li><p>The <span>current high resolution time</span> given <var>document</var>'s <span>relevant
97249720
global object</span> has not exceeded an <span>implementation-defined</span> timeout value.</p>
@@ -9729,7 +9725,7 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {
97299725
<ol>
97309726
<li><p>Let <var>document</var> be <var>el</var>'s <span>node document</span>.</p>
97319727

9732-
<li><p>If <var>document</var>'s <span>awaiting parser-inserted body flag</span> is true, then
9728+
<li><p>If <var>document</var> <span>allows adding render-blocking elements</span>, then
97339729
<span data-x="set append">append</span> <var>el</var> to <var>document</var>'s
97349730
<span>render-blocking element set</span>.</p>
97359731
</ol>
@@ -112151,8 +112147,6 @@ document.body.appendChild(text);
112151112147
<dd>
112152112148
<p><span>Insert an HTML element</span> for the token.</p>
112153112149

112154-
<p>Set the <code>Document</code>'s <span>awaiting parser-inserted body flag</span> to false.</p>
112155-
112156112150
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
112157112151

112158112152
<p>Switch the <span>insertion mode</span> to "<span data-x="insertion mode: in body">in
@@ -112163,13 +112157,6 @@ document.body.appendChild(text);
112163112157
<dd>
112164112158
<p><span>Insert an HTML element</span> for the token.</p>
112165112159

112166-
<p>Set the <code>Document</code>'s <span>awaiting parser-inserted body flag</span> to false.</p>
112167-
112168-
<p class="note" id="parser-frameset-as-body">The <span>awaiting parser-inserted body flag</span>
112169-
is exclusively used by <span data-x="render-blocking mechanism">render-blocking</span>, for
112170-
which the presence of either a <code>frameset</code> or a <code>body</code> element indicates
112171-
that there is content to render, so we simply treat them as the same.</p>
112172-
112173112160
<p>Switch the <span>insertion mode</span> to "<span data-x="insertion mode: in frameset">in
112174112161
frameset</span>".</p>
112175112162
</dd>
@@ -112215,8 +112202,6 @@ document.body.appendChild(text);
112215112202
<!-- fake <body>, but without resetting frameset-ok -->
112216112203
<p><span>Insert an HTML element</span> for a "body" start tag token with no attributes.</p>
112217112204

112218-
<p>Set the <code>Document</code>'s <span>awaiting parser-inserted body flag</span> to false.</p>
112219-
112220112205
<p>Switch the <span>insertion mode</span> to "<span data-x="insertion mode: in body">in
112221112206
body</span>".</p>
112222112207
<!-- end fake <body> -->

0 commit comments

Comments
 (0)