Skip to content

Commit

Permalink
Fix implicitly render-blocking interaction with blocking="render"
Browse files Browse the repository at this point in the history
In particular, after this change, removing blocking="render" will no longer unblock rendering for implicitly render-blocking elements, such as parser-created stylesheet <link>s.

Closes #7856.
  • Loading branch information
xiaochengh committed Apr 27, 2022
1 parent 3db5bb0 commit a2a74be
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -7393,8 +7393,13 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
data-x="possible blocking token">possible blocking tokens</span>.</p>
</ol>

<p>An element is <dfn>render-blocking</dfn> if its <span>blocking tokens set</span> contains
"<code data-x="blocking-token-render">render</code>".</p>
<p>An element is <dfn>explicitly render-blocking</dfn> if its <span>blocking tokens set</span>
contains "<code data-x="blocking-token-render">render</code>". An element can also be
<dfn>implicitly render-blocking</dfn>, which will be defined at the individual elements. By
default, an element is not <span>implicitly render-blocking</span>.</p>

<p>An element is <dfn>render-blocking</dfn> if it is <span>explicitly render-blocking</span> or
<span>implicitly render-blocking</span>.</p>

<p>Whenever a <span>render-blocking</span> element <var>el</var> <span>becomes browsing-context
disconnected</span>, or <var>el</var>'s <span>blocking attribute</span>'s value is changed so
Expand Down Expand Up @@ -16041,6 +16046,9 @@ console.log(style.disabled); // false</code></pre>
<p>The <span>child text content</span> of a <code>style</code> element must be that of a
<span>conformant style sheet</span>.</p>

<p>A <code>style</code> element is <span>implicitly render-blocking</span> if the element was
created by its <span>node document</span>'s parser.</p>

<hr>

<div w-nodev>
Expand Down Expand Up @@ -16152,9 +16160,8 @@ console.log(style.disabled); // false</code></pre>
counter</span> by 1.</p></li>

<li><p>If <var>element</var>'s <code data-x="attr-style-media">media</code> attribute's value
<span>matches the environment</span>, and <var>element</var> is <span>render-blocking</span> or
<var>element</var> was created by <var>element</var>'s <span>node document</span>'s parser, then
<span>block rendering</span> on <var>element</var>.</p></li>
<span>matches the environment</span> and <var>element</var> is <span>render-blocking</span>,
then <span>block rendering</span> on <var>element</var>.</p></li>
</ol>

<!-- the following steps are similar to the text in the <link> element's default process the
Expand Down Expand Up @@ -26474,6 +26481,9 @@ document.body.appendChild(wbr);</code></pre>
<p>The default type for resources given by the <code data-x="rel-stylesheet">stylesheet</code>
keyword is <code>text/css</code>.</p>

<p>A <code>link</code> element of this type is <span>implicitly render-blocking</span> if the
element was created by its <span>node document</span>'s parser.</p>

<div w-nodev>

<p>The appropriate times to <span data-x="fetch and process the linked resource">fetch and
Expand Down Expand Up @@ -26537,8 +26547,7 @@ document.body.appendChild(wbr);</code></pre>
1.</p></li>

<li><p>If <var>el</var>'s <code data-x="attr-link-media">media</code> attribute's value
<span>matches the environment</span>, and <var>el</var> is <span>render-blocking</span> or
<var>el</var> was created by <var>el</var>'s <span>node document</span>'s parser, then
<span>matches the environment</span> and <var>el</var> is <span>render-blocking</span>, then
<span>block rendering</span> on <var>el</var>.</p></li>

<li><p>Return true.</p></li>
Expand Down Expand Up @@ -60103,6 +60112,10 @@ o............A....e
event</span> of the element's <span>preparation-time document</span> until <span>the script is
ready</span>.</p>

<p>A <code>script</code> element is <span>implicitly render-blocking</span> if the element's
<span data-x="concept-script-type">script's type</span> is set and is equal to
"<code data-x="">classic</code>", and the element is <span>"parser-inserted"</span>.</p>

<hr>

<p>When a <code>script</code> element that is not <span>"parser-inserted"</span> experiences one
Expand Down

0 comments on commit a2a74be

Please sign in to comment.