mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from custom branch of UXP: ported from mozilla: Bug 1384493 - Speculative loading style should use correct referrer policy. r=wchen (19a77f8441) (b694e411)
This commit is contained in:
@@ -942,14 +942,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
|
||||
|
||||
Reference in New Issue
Block a user