зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f22b879c9e
Коммит
e8ef88151d
|
@ -688,7 +688,7 @@ nsContentSink::ProcessLink(const nsSubstring& aAnchor, const nsSubstring& aHref,
|
||||||
bool hasPrefetch = linkTypes & PREFETCH;
|
bool hasPrefetch = linkTypes & PREFETCH;
|
||||||
// prefetch href if relation is "next" or "prefetch"
|
// prefetch href if relation is "next" or "prefetch"
|
||||||
if (hasPrefetch || (linkTypes & NEXT)) {
|
if (hasPrefetch || (linkTypes & NEXT)) {
|
||||||
PrefetchHref(aHref, nullptr, hasPrefetch);
|
PrefetchHref(aHref, mDocument, hasPrefetch);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!aHref.IsEmpty() && (linkTypes & DNS_PREFETCH)) {
|
if (!aHref.IsEmpty() && (linkTypes & DNS_PREFETCH)) {
|
||||||
|
@ -795,7 +795,7 @@ nsContentSink::ProcessMETATag(nsIContent* aContent)
|
||||||
|
|
||||||
void
|
void
|
||||||
nsContentSink::PrefetchHref(const nsAString &aHref,
|
nsContentSink::PrefetchHref(const nsAString &aHref,
|
||||||
nsIContent *aSource,
|
nsINode *aSource,
|
||||||
bool aExplicit)
|
bool aExplicit)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|
|
@ -159,7 +159,7 @@ protected:
|
||||||
const nsSubstring& aType,
|
const nsSubstring& aType,
|
||||||
const nsSubstring& aMedia);
|
const nsSubstring& aMedia);
|
||||||
|
|
||||||
void PrefetchHref(const nsAString &aHref, nsIContent *aSource,
|
void PrefetchHref(const nsAString &aHref, nsINode *aSource,
|
||||||
bool aExplicit);
|
bool aExplicit);
|
||||||
|
|
||||||
// aHref can either be the usual URI format or of the form "//www.hostname.com"
|
// aHref can either be the usual URI format or of the form "//www.hostname.com"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче