Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't unblock rendering for implicitly render-blocking elements on blocking attribute changes #7857

Merged
merged 2 commits into from
Apr 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -7388,8 +7388,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>
xiaochengh marked this conversation as resolved.
Show resolved Hide resolved

<p>An element is <dfn>render-blocking</dfn> if it is <span>explicitly render-blocking</span> or
<span>implicitly render-blocking</span>.</p>
xiaochengh marked this conversation as resolved.
Show resolved Hide resolved

<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 @@ -16018,6 +16023,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 @@ -16129,9 +16137,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 @@ -26383,6 +26390,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>
xiaochengh marked this conversation as resolved.
Show resolved Hide resolved

<div w-nodev>

<p>The appropriate times to <span data-x="fetch and process the linked resource">fetch and
Expand Down Expand Up @@ -26446,8 +26456,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 @@ -60012,6 +60021,10 @@ o............A....e
event</span> of the element's <span>node 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>
xiaochengh marked this conversation as resolved.
Show resolved Hide resolved

<hr>

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