Bug 1315105 - Part 2: Implement <link rel=prerender> behind a pref, r=smaug

MozReview-Commit-ID: ARET98o1FTU
This commit is contained in:
Michael Layzell
2016-12-19 15:05:31 +08:00
parent c9afceae77
commit f898aa0d8b
20 changed files with 442 additions and 52 deletions

View File

@@ -169,7 +169,7 @@ HTMLLinkElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
}
if (IsInComposedDoc()) {
TryDNSPrefetchPreconnectOrPrefetch();
TryDNSPrefetchPreconnectOrPrefetchOrPrerender();
}
void (HTMLLinkElement::*update)() = &HTMLLinkElement::UpdateStyleSheetInternal;
@@ -389,7 +389,7 @@ HTMLLinkElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
if ((aName == nsGkAtoms::rel || aName == nsGkAtoms::href) &&
IsInComposedDoc()) {
TryDNSPrefetchPreconnectOrPrefetch();
TryDNSPrefetchPreconnectOrPrefetchOrPrerender();
}
UpdateStyleSheetInternal(nullptr, nullptr,