Image Loading: `crossorigin` mutations should queue a microtask
This CL makes HTMLImageElement aware of `crossorigin` attribute value mutations, and respond by invoking ImageLoader::UpdateFromElement if the attribute's state changes. This queues a microtask to finish the image loading steps. This change does not influence the crossorigin attribute state used to influence any image request, because the crossorigin attribute state used to configure image requests (in blink::ConfigureRequest) is already referring to the element's latest. Instead, this change simply invokes ImageLoader::UpdateFromElement (enqueueing an ImageLoader::Task microtask) when an image's crossorigin attribute state changes, even after an image has been fetched. This makes our implementation of the HTML Standard's image element's relevant mutations [1] more compliant, passing more relevant mutations web-platform-tests. See also [2]. [1]: https://html.spec.whatwg.org/multipage/images.html#relevant-mutations [2]: https://docs.google.com/document/d/1Xp34FIbbZnJILl0PNd1sfs_3z1HSriUVyRUgnAesGZk/ Bug: 384251,774706,1061685 Change-Id: I11e66800309df96aea61226932b9aa40c3cc5d27 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2102992 Commit-Queue: Dominic Farolino <dom@chromium.org> Reviewed-by:Fredrik Söderquist <fs@opera.com> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#750885}
Showing
Please register or sign in to comment