From 284ef5d33313d92819e38cbc91b7da3be7fae198 Mon Sep 17 00:00:00 2001 From: Xiaocheng Hu Date: Thu, 24 Mar 2022 11:42:44 +0000 Subject: [PATCH] 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 Reviewed-by: Mason Freed Commit-Queue: Xiaocheng Hu Cr-Commit-Position: refs/heads/main@{#979904} -- wpt-commits: 94d8756232a4ba5d893242f3d11f7b2026fe5c0e wpt-pr: 33145 --- .../remove-pending-async-render-blocking-script.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 testing/web-platform/tests/html/dom/render-blocking/remove-pending-async-render-blocking-script.html diff --git a/testing/web-platform/tests/html/dom/render-blocking/remove-pending-async-render-blocking-script.html b/testing/web-platform/tests/html/dom/render-blocking/remove-pending-async-render-blocking-script.html new file mode 100644 index 000000000000..5f6e8b34d1ee --- /dev/null +++ b/testing/web-platform/tests/html/dom/render-blocking/remove-pending-async-render-blocking-script.html @@ -0,0 +1,19 @@ + +Removed render-blocking script should not indefinitely block rendering + + + + -- 2.11.4.GIT