[wpt-sync] Sync PR 22260 - ImageLoader: Stop storing request KURL in Task
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 22260 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/22260
Details from upstream follow.
Dominic Farolino <dom@chromium.org> wrote:
ImageLoader: Stop storing request KURL in Task
This CL removes |ImageLoader::Task::request_url_| in favor of lazily
parsing the image request's absolute URL when ImageLoader::Task is run.Currently ImageLoader::Task stores a KURL |request_url_|, which is a
snapshot of the image's absolute URL, parsed relative to the image
element's node document at the time ImageLoader::Task is queued.
We shouldn't have to store a snapshot of the parsed URL, because the
source URL at the time an ImageLoader::Task is run is the same as when
the task is queued.The reason we stored a snapshot of the parsed URL is because what can
change in between when an ImageLoader::Task is queued and run, is the
document's base URL, via a\<base>
element. In https://crbug.com/569760
a CL was landed that takes this snapshot, so that if a\<base>
element
was dynamically-inserted before the ImageLoader::Task was run, the URL
would be unaffected by the addition of the\<base>
. However, the spec
is very clear that the parsing of an image request's URL 1 happens
after the microtask is run, meaning our snapshot is unnecessary, and
incorrect.This CL:
- Removes the snapshot
- Fixes the associated test
- Exports the test to external/wpt so other impls can benefit
- Adds documentation noting that ImageLoader::Task::referrer_policy_ is
going away soonBug: 569760,1061685
Change-Id: I8d9e3dbefd27a26626bb930acc809196753c7506
Reviewed-on: https://chromium-review.googlesource.com/2103987
WPT-Export-Revision: c994a20cd78a3a380c98202f8199ebdbb40fcbcf
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=00573dfc93f9b8348e5c88f1bef7a8cffdce882c
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e7688d2242a8 [wpt PR 22260] - ImageLoader: Stop storing request KURL in Task, a=testonly https://hg.mozilla.org/integration/autoland/rev/f39192e0d225 [wpt PR 22260] - Update wpt metadata, a=testonly
Assignee | ||
Comment 3•4 years ago
|
||
Test result changes from PR not available.
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e7688d2242a8
https://hg.mozilla.org/mozilla-central/rev/f39192e0d225
Description
•