[wpt-sync] Sync PR 29340 - Set initiatorType to "early-hints" for Early Hints preloaded resources
Categories
(Core :: Performance: General, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 29340 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/29340
Details from upstream follow.
b'Kenichi Ishibashi <bashi@chromium.org>' wrote:
Set initiatorType to "early-hints" for Early Hints preloaded resources
This CL sets initiatorType of PerformanceResourceTiming to "early-hints"
when the resource is preloaded via a 103 Early Hints response. See [1]
for the motivation.Early Hints preloads are handled in the browser process before the
navigation commit. This means that information related to Early Hints
preloads need to be plumbed from the browser to the page's renderer
process so that the ResourceFetcher in the renderer process can set
initatorType to "early-hints". The propagation works as follows:[browser process]
(navigation commit)
=> NavigationRequest gets information related to preloads from
NavigaitonEarlyHintsManager
=> These information are set to mojom::CommitNavigationParams[renderer process]
(RenderFrameImpl receives mojom::CommitNavigationParams)
=> RenderFrameImpl converts mojom::CommitNavigationParams to
WebNavigationParams then passes it to DocumentLoader
=> FrameFetchContext creates a ResourceFetcher from DocumentLoader and
passes information related to Early Hints preloads to the fetcher
via DocumentLoaderWhen the ResourceFetcher fetches a resource it looks up Early Hints
preloads. If there is matching URL, it sets initiatorType to
"early-hints".[1] https://github.com/w3c/resource-timing/issues/273#issuecomment-845716308
Bug: 1212542
Change-Id: I76d045a3bceace25a5aeb34351008fed26f587fa
Reviewed-on: https://chromium-review.googlesource.com/2909350
WPT-Export-Revision: 253fa61a5e33ef9641d96cb642add2a07a2dbabd
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•4 years ago
|
Description
•