From 4c82cf621873fcaffa3a242cf3e212d5e4bda972 Mon Sep 17 00:00:00 2001 From: Vladimir Levin Date: Wed, 25 Jul 2018 18:34:11 +0000 Subject: [PATCH] Bug 1476483 [wpt PR 12044] - ImageLoading: Don't reschedule a microtask on attach if one is pending., a=testonly Automatic update from web-platform-testsImageLoading: Don't reschedule a microtask on attach if one is pending. This patch ensures that we don't reschedule an image loading microtask if there is one pending already. This is important to ensure that image decode microtasks see the image data (ie the image loading microtask runs first) if there are no other changes only insertion into a document. The existing tests that were added for this still pass (from crrev.com/cdd156337ada7) http/tests/misc/image-blocked-src-change.html http/tests/misc/image-blocked-src-no-change.html http/tests/xmlhttprequest/xmlhttprequest-image-not-loaded-svg.svg http/tests/xmlhttprequest/xmlhttprequest-image-not-loaded.html The new test fails without the change and passes with. R=chrishtr@chromium.org Bug: 864306 Change-Id: I1d3d2ed4c12b53fab931e55a85c4f5cd18fe1cc4 Reviewed-on: https://chromium-review.googlesource.com/1141121 Reviewed-by: Chris Harrelson Commit-Queue: vmpstr Cr-Commit-Position: refs/heads/master@{#577006} -- wpt-commits: 6aabe74f9e6a4b9471f112e15b56b9e1a39004e5 wpt-pr: 12044 --- testing/web-platform/meta/MANIFEST.json | 12 +++++++++ .../image-decode-with-quick-attach.html | 26 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 testing/web-platform/tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 1796fb4038d6..47c0ed6cc7a4 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -346631,6 +346631,14 @@ } ] ], + "html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html": [ + [ + "/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html", + { + "timeout": "long" + } + ] + ], "html/semantics/embedded-content/the-img-element/decode/image-decode.html": [ [ "/html/semantics/embedded-content/the-img-element/decode/image-decode.html", @@ -586110,6 +586118,10 @@ "9405efb65176096957438cbdcc59109b488d80e6", "testharness" ], + "html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html": [ + "cd7e495a854d848712b46cddec40e3ebffe9d3ba", + "testharness" + ], "html/semantics/embedded-content/the-img-element/decode/image-decode.html": [ "5368b62bf6c950e8d57b16b36148e5695ce16fd8", "testharness" diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html new file mode 100644 index 000000000000..be680da619e8 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html @@ -0,0 +1,26 @@ + + + +HTMLImageElement.prototype.decode(), attach to DOM before promise resolves. + + + + + + + +