forked from mirrors/gecko-dev
Bug 1784496 - The necko consumers should use the priority's incremental flag r=necko-reviewers,kershaw
This patch sets the incremental flag on document and image channels Differential Revision: https://phabricator.services.mozilla.com/D209235
This commit is contained in:
parent
7bbd01baa5
commit
7cdfe9baad
4 changed files with 20 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ add_task(async function () {
|
|||
"Accept-Encoding: gzip, deflate",
|
||||
"Connection: keep-alive",
|
||||
"Upgrade-Insecure-Requests: 1",
|
||||
"Priority: u=1",
|
||||
"Priority: u=1, i",
|
||||
"Pragma: no-cache",
|
||||
"Cache-Control: no-cache",
|
||||
].join("\n");
|
||||
|
|
|
|||
|
|
@ -9825,6 +9825,9 @@ nsIPrincipal* nsDocShell::GetInheritedPrincipal(
|
|||
nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(channel));
|
||||
if (cos) {
|
||||
cos->AddClassFlags(nsIClassOfService::UrgentStart);
|
||||
if (StaticPrefs::dom_document_priority_incremental()) {
|
||||
cos->SetIncremental(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2472,6 +2472,9 @@ nsresult imgLoader::LoadImage(
|
|||
if (aUseUrgentStartForChannel && !aLinkPreload) {
|
||||
cos->AddClassFlags(nsIClassOfService::UrgentStart);
|
||||
}
|
||||
if (StaticPrefs::image_priority_incremental()) {
|
||||
cos->SetIncremental(true);
|
||||
}
|
||||
|
||||
if (StaticPrefs::network_http_tailing_enabled() &&
|
||||
aContentPolicyType == nsIContentPolicy::TYPE_INTERNAL_IMAGE_FAVICON) {
|
||||
|
|
|
|||
|
|
@ -2668,6 +2668,13 @@
|
|||
value: false
|
||||
mirror: always
|
||||
|
||||
# Whether to set the incremental flag on the top level document's
|
||||
# priority header
|
||||
- name: dom.document_priority.incremental
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# Allow the content process to create a File from a path. This is allowed just
|
||||
# on parent process, on 'file' Content process, or for testing.
|
||||
- name: dom.file.createInChild
|
||||
|
|
@ -7192,6 +7199,12 @@
|
|||
value: false
|
||||
mirror: always
|
||||
|
||||
# Whether to set the incremental attribute in the Priority header for images
|
||||
- name: image.priority.incremental
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# Whether we attempt to decode AVIF images or not.
|
||||
- name: image.avif.enabled
|
||||
type: RelaxedAtomicBool
|
||||
|
|
|
|||
Loading…
Reference in a new issue