Skip to content

[renderblocking] Implement render-blocking on script elements#33145

Merged
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-3511116
Mar 10, 2022
Merged

[renderblocking] Implement render-blocking on script elements#33145
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-3511116

Conversation

@chromium-wpt-export-bot
Copy link
Copy Markdown
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 9, 2022

This patch makes RenderBlockingResourceManager to accept scripts as
render-blocking resources, and implements the following parts of the
spec:

  1. Right before fetching a render-blocking script, add it to
    RenderBlockingResourceManager:

https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model:block-rendering

  1. When executing a script, remove it from RenderBlockingResourceManager

https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model:unblock-rendering

  1. When a render-blocking script is removed, also remove it from
    RenderBlockingResourceManager, so that rendering is unblocked even
    without executing the script:

https://html.spec.whatwg.org/multipage/urls-and-fetching.html#blocking-attributes:unblock-rendering

Bug: 1271296
Change-Id: Ib5d7391668efb1a0c74a3c152e02c1b533accc43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3511116
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#979904}

Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

This patch makes RenderBlockingResourceManager to accept scripts as
render-blocking resources, and implements the following parts of the
spec:

1. Right before fetching a render-blocking script, add it to
   RenderBlockingResourceManager:

https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model:block-rendering

2. When executing a script, remove it from RenderBlockingResourceManager

https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model:unblock-rendering

3. When a render-blocking script is removed, also remove it from
   RenderBlockingResourceManager, so that rendering is unblocked even
   without executing the script:

https://html.spec.whatwg.org/multipage/urls-and-fetching.html#blocking-attributes:unblock-rendering

Bug: 1271296
Change-Id: Ib5d7391668efb1a0c74a3c152e02c1b533accc43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3511116
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#979904}
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 94d8756 into master Mar 10, 2022
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-3511116 branch March 10, 2022 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants