Issue #2641 - Speculative load changes for referrerpolicy

This commit is contained in:
Moonchild 2024-10-20 09:35:39 +02:00 committed by roytam1
commit f6f046930d
20 changed files with 262 additions and 128 deletions

View file

@ -655,7 +655,8 @@ nsXMLContentSink::ProcessStyleLink(nsIContent* aElement,
bool aAlternate,
const nsSubstring& aTitle,
const nsSubstring& aType,
const nsSubstring& aMedia)
const nsSubstring& aMedia,
const nsSubstring& aReferrerPolicy)
{
nsresult rv = NS_OK;
mPrettyPrintXML = false;
@ -714,7 +715,7 @@ nsXMLContentSink::ProcessStyleLink(nsIContent* aElement,
// Let nsContentSink deal with css.
rv = nsContentSink::ProcessStyleLink(aElement, aHref, aAlternate,
aTitle, aType, aMedia);
aTitle, aType, aMedia, aReferrerPolicy);
// nsContentSink::ProcessStyleLink handles the bookkeeping here wrt
// pending sheets.
@ -1261,7 +1262,9 @@ nsXMLContentSink::HandleProcessingInstruction(const char16_t *aTarget,
return DidProcessATokenImpl();
}
rv = ProcessStyleLink(node, href, isAlternate, title, type, media);
// <?xml-stylesheet?> processing instructions don't have a referrerpolicy
// pseudo-attribute, so we pass in an empty string
rv = ProcessStyleLink(node, href, isAlternate, title, type, media, EmptyString());
return NS_SUCCEEDED(rv) ? DidProcessATokenImpl() : rv;
}