Bug 788923 - Part 1: When prefetching a document using a Link header, use the document element as the source node; r=bzbarsky

This commit is contained in:
Ehsan Akhgari 2012-09-07 14:06:31 -04:00
Родитель f22b879c9e
Коммит e8ef88151d
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -688,7 +688,7 @@ nsContentSink::ProcessLink(const nsSubstring& aAnchor, const nsSubstring& aHref,
bool hasPrefetch = linkTypes & PREFETCH;
// prefetch href if relation is "next" or "prefetch"
if (hasPrefetch || (linkTypes & NEXT)) {
PrefetchHref(aHref, nullptr, hasPrefetch);
PrefetchHref(aHref, mDocument, hasPrefetch);
}
if (!aHref.IsEmpty() && (linkTypes & DNS_PREFETCH)) {
@ -795,7 +795,7 @@ nsContentSink::ProcessMETATag(nsIContent* aContent)
void
nsContentSink::PrefetchHref(const nsAString &aHref,
nsIContent *aSource,
nsINode *aSource,
bool aExplicit)
{
//

Просмотреть файл

@ -159,7 +159,7 @@ protected:
const nsSubstring& aType,
const nsSubstring& aMedia);
void PrefetchHref(const nsAString &aHref, nsIContent *aSource,
void PrefetchHref(const nsAString &aHref, nsINode *aSource,
bool aExplicit);
// aHref can either be the usual URI format or of the form "//www.hostname.com"