зеркало из https://github.com/mozilla/gecko-dev.git
Bug 881804 (part 4) - Plumb layout into predictive network actions. r=bz
This commit is contained in:
Родитель
a1a01b6606
Коммит
d45e44771a
|
@ -47,6 +47,7 @@
|
|||
#include "nsGkAtoms.h"
|
||||
#include "nsIThreadInternal.h"
|
||||
#include "nsCrossSiteListenerProxy.h"
|
||||
#include "nsINetworkSeer.h"
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsXULPrototypeCache.h"
|
||||
|
@ -1433,6 +1434,12 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
|
|||
return rv;
|
||||
}
|
||||
|
||||
if (mDocument) {
|
||||
mozilla::net::SeerLearn(aLoadData->mURI, mDocument->GetDocumentURI(),
|
||||
nsINetworkSeer::LEARN_LOAD_SUBRESOURCE,
|
||||
mDocument);
|
||||
}
|
||||
|
||||
// Just load it
|
||||
nsCOMPtr<nsIInputStream> stream;
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
|
@ -1606,6 +1613,11 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
|
|||
channelListener = streamLoader;
|
||||
}
|
||||
|
||||
if (mDocument) {
|
||||
mozilla::net::SeerLearn(aLoadData->mURI, mDocument->GetDocumentURI(),
|
||||
nsINetworkSeer::LEARN_LOAD_SUBRESOURCE, mDocument);
|
||||
}
|
||||
|
||||
rv = channel->AsyncOpen(channelListener, nullptr);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "nsIContentSecurityPolicy.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsINetworkSeer.h"
|
||||
|
||||
#include "nsIConsoleService.h"
|
||||
|
||||
|
@ -375,6 +376,10 @@ nsUserFontSet::StartLoad(gfxMixedFontFamily* aFamily,
|
|||
rv = NS_NewStreamLoader(getter_AddRefs(streamLoader), fontLoader);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsIDocument *document = ps->GetDocument();
|
||||
mozilla::net::SeerLearn(aFontFaceSrc->mURI, document->GetDocumentURI(),
|
||||
nsINetworkSeer::LEARN_LOAD_SUBRESOURCE, loadGroup);
|
||||
|
||||
bool inherits = false;
|
||||
rv = NS_URIChainHasFlags(aFontFaceSrc->mURI,
|
||||
nsIProtocolHandler::URI_INHERITS_SECURITY_CONTEXT,
|
||||
|
|
Загрузка…
Ссылка в новой задаче