mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-21 20:03:08 +09:00
ported from mozilla: Bug 1384493 - Speculative loading style should use correct referrer policy. r=wchen (19a77f8441)
This commit is contained in:
parent
687f52e183
commit
b694e41119
5 changed files with 25 additions and 6 deletions
|
|
@ -939,14 +939,23 @@ void
|
|||
nsHtml5TreeOpExecutor::PreloadStyle(const nsAString& aURL,
|
||||
const nsAString& aCharset,
|
||||
const nsAString& aCrossOrigin,
|
||||
const nsAString& aReferrerPolicy,
|
||||
const nsAString& aIntegrity)
|
||||
{
|
||||
nsCOMPtr<nsIURI> uri = ConvertIfNotPreloadedYet(aURL);
|
||||
if (!uri) {
|
||||
return;
|
||||
}
|
||||
mDocument->PreloadStyle(uri, aCharset, aCrossOrigin,
|
||||
mSpeculationReferrerPolicy, aIntegrity);
|
||||
|
||||
mozilla::net::ReferrerPolicy referrerPolicy = mSpeculationReferrerPolicy;
|
||||
mozilla::net::ReferrerPolicy styleReferrerPolicy =
|
||||
mozilla::net::AttributeReferrerPolicyFromString(aReferrerPolicy);
|
||||
if (styleReferrerPolicy != mozilla::net::RP_Unset) {
|
||||
referrerPolicy = styleReferrerPolicy;
|
||||
}
|
||||
|
||||
mDocument->PreloadStyle(uri, aCharset, aCrossOrigin, referrerPolicy,
|
||||
aIntegrity);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue