зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 04e9846700ae (bug 1376964)
This commit is contained in:
Родитель
488c1fa3cb
Коммит
071507c082
|
@ -107,7 +107,6 @@ FontFaceSet::FontFaceSet(nsPIDOMWindowInner* aWindow, nsIDocument* aDocument)
|
|||
, mHasLoadingFontFacesIsDirty(false)
|
||||
, mDelayedLoadCheck(false)
|
||||
, mBypassCache(false)
|
||||
, mPrivateBrowsing(false)
|
||||
{
|
||||
MOZ_ASSERT(mDocument, "We should get a valid document from the caller!");
|
||||
|
||||
|
@ -138,11 +137,6 @@ FontFaceSet::FontFaceSet(nsPIDOMWindowInner* aWindow, nsIDocument* aDocument)
|
|||
}
|
||||
}
|
||||
|
||||
// Same for the "private browsing" flag.
|
||||
if (nsCOMPtr<nsILoadContext> loadContext = mDocument->GetLoadContext()) {
|
||||
mPrivateBrowsing = loadContext->UsePrivateBrowsing();
|
||||
}
|
||||
|
||||
if (!mDocument->DidFireDOMContentLoaded()) {
|
||||
mDocument->AddSystemEventListener(NS_LITERAL_STRING("DOMContentLoaded"),
|
||||
this, false, false);
|
||||
|
@ -1455,6 +1449,13 @@ FontFaceSet::SyncLoadFontData(gfxUserFontEntry* aFontToLoad,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
FontFaceSet::GetPrivateBrowsing()
|
||||
{
|
||||
nsCOMPtr<nsILoadContext> loadContext = mDocument->GetLoadContext();
|
||||
return loadContext && loadContext->UsePrivateBrowsing();
|
||||
}
|
||||
|
||||
void
|
||||
FontFaceSet::OnFontFaceStatusChanged(FontFace* aFontFace)
|
||||
{
|
||||
|
@ -1863,7 +1864,7 @@ FontFaceSet::UserFontSet::SyncLoadFontData(gfxUserFontEntry* aFontToLoad,
|
|||
/* virtual */ bool
|
||||
FontFaceSet::UserFontSet::GetPrivateBrowsing()
|
||||
{
|
||||
return mFontFaceSet && mFontFaceSet->mPrivateBrowsing;
|
||||
return mFontFaceSet && mFontFaceSet->GetPrivateBrowsing();
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
|
|
|
@ -265,6 +265,7 @@ private:
|
|||
nsIPrincipal** aPrincipal,
|
||||
bool* aBypassCache);
|
||||
bool IsFontLoadAllowed(nsIURI* aFontLocation, nsIPrincipal* aPrincipal);
|
||||
bool GetPrivateBrowsing();
|
||||
nsresult SyncLoadFontData(gfxUserFontEntry* aFontToLoad,
|
||||
const gfxFontFaceSrc* aFontFaceSrc,
|
||||
uint8_t*& aBuffer,
|
||||
|
@ -358,10 +359,6 @@ private:
|
|||
// Whether the docshell for our document indicated that loads should
|
||||
// bypass the cache.
|
||||
bool mBypassCache;
|
||||
|
||||
// Whether the docshell for our document indicates that we are in private
|
||||
// browsing mode.
|
||||
bool mPrivateBrowsing;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
Загрузка…
Ссылка в новой задаче