Bug 1758820 [wpt PR 33145] - [renderblocking] Implement render-blocking on script...
commit284ef5d33313d92819e38cbc91b7da3be7fae198
authorXiaocheng Hu <xiaochengh@chromium.org>
Thu, 24 Mar 2022 11:42:44 +0000 (24 11:42 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sat, 26 Mar 2022 10:33:38 +0000 (26 10:33 +0000)
tree1fc6480f3e807d0312d89546d8337b6052ddfddd
parent87f3e5f7cea7192727bd3286ec7c3f2c1a934eef
Bug 1758820 [wpt PR 33145] - [renderblocking] Implement render-blocking on script elements, a=testonly

Automatic update from web-platform-tests
[renderblocking] Implement render-blocking on script elements

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}

--

wpt-commits: 94d8756232a4ba5d893242f3d11f7b2026fe5c0e
wpt-pr: 33145
testing/web-platform/tests/html/dom/render-blocking/remove-pending-async-render-blocking-script.html [new file with mode: 0644]