mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout 476998cbd69f & f8654d020b1a (bug 739858) for compilation failures
This commit is contained in:
parent
7cc668adc9
commit
16cda4acd7
@ -77,8 +77,7 @@ gfxProxyFontEntry::gfxProxyFontEntry(const nsTArray<gfxFontFaceSrc>& aFontFaceSr
|
||||
gfxSparseBitSet *aUnicodeRanges)
|
||||
: gfxFontEntry(NS_LITERAL_STRING("Proxy"), aFamily),
|
||||
mLoadingState(NOT_LOADING),
|
||||
mUnsupportedFormat(false),
|
||||
mLoader(nsnull)
|
||||
mUnsupportedFormat(false)
|
||||
{
|
||||
mIsProxy = true;
|
||||
mSrcList = aFontFaceSrcList;
|
||||
@ -457,10 +456,6 @@ gfxUserFontSet::OnLoadComplete(gfxProxyFontEntry *aProxy,
|
||||
const PRUint8 *aFontData, PRUint32 aLength,
|
||||
nsresult aDownloadStatus)
|
||||
{
|
||||
// forget about the loader, as we no longer potentially need to cancel it
|
||||
// if the entry is obsoleted
|
||||
aProxy->mLoader = nsnull;
|
||||
|
||||
// download successful, make platform font using font data
|
||||
if (NS_SUCCEEDED(aDownloadStatus)) {
|
||||
gfxFontEntry *fe = LoadFont(aProxy, aFontData, aLength);
|
||||
@ -627,14 +622,6 @@ gfxFontEntry*
|
||||
gfxUserFontSet::LoadFont(gfxProxyFontEntry *aProxy,
|
||||
const PRUint8 *aFontData, PRUint32 &aLength)
|
||||
{
|
||||
// if the proxy doesn't belong to a family, we just bail as it won't be
|
||||
// accessible/usable anyhow (maybe the font set got modified right as
|
||||
// the load was completing?)
|
||||
if (!aProxy->Family()) {
|
||||
NS_Free(aFontData);
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
gfxFontEntry *fe = nsnull;
|
||||
|
||||
gfxUserFontType fontType =
|
||||
|
@ -51,7 +51,6 @@
|
||||
|
||||
class nsIURI;
|
||||
class gfxMixedFontFamily;
|
||||
class nsFontFaceLoader;
|
||||
|
||||
// parsed CSS @font-face rule information
|
||||
// lifetime: from when @font-face rule processed until font is loaded
|
||||
@ -341,7 +340,6 @@ public:
|
||||
|
||||
nsTArray<gfxFontFaceSrc> mSrcList;
|
||||
PRUint32 mSrcIndex; // index of loading src item
|
||||
nsFontFaceLoader *mLoader; // current loader for this entry, if any
|
||||
};
|
||||
|
||||
|
||||
|
@ -98,9 +98,6 @@ nsFontFaceLoader::nsFontFaceLoader(gfxProxyFontEntry *aProxy, nsIURI *aFontURI,
|
||||
|
||||
nsFontFaceLoader::~nsFontFaceLoader()
|
||||
{
|
||||
if (mFontEntry) {
|
||||
mFontEntry->mLoader = nsnull;
|
||||
}
|
||||
if (mLoadTimer) {
|
||||
mLoadTimer->Cancel();
|
||||
mLoadTimer = nsnull;
|
||||
@ -262,7 +259,6 @@ void
|
||||
nsFontFaceLoader::Cancel()
|
||||
{
|
||||
mFontEntry->mLoadingState = gfxProxyFontEntry::NOT_LOADING;
|
||||
mFontEntry->mLoader = nsnull;
|
||||
mFontSet = nsnull;
|
||||
if (mLoadTimer) {
|
||||
mLoadTimer->Cancel();
|
||||
@ -425,8 +421,6 @@ nsUserFontSet::StartLoad(gfxProxyFontEntry *aProxy,
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mLoaders.PutEntry(fontLoader);
|
||||
fontLoader->StartedLoading(streamLoader);
|
||||
aProxy->mLoader = fontLoader; // let the font entry remember the loader,
|
||||
// in case we need to cancel it
|
||||
}
|
||||
|
||||
return rv;
|
||||
@ -472,19 +466,6 @@ nsUserFontSet::UpdateRules(const nsTArray<nsFontFaceRuleContainer>& aRules)
|
||||
// if any rules are left in the old list, note that the set has changed
|
||||
if (oldRules.Length() > 0) {
|
||||
modified = true;
|
||||
// any in-progress loaders for obsolete rules should be cancelled
|
||||
size_t count = oldRules.Length();
|
||||
for (size_t i = 0; i < count; ++i) {
|
||||
gfxFontEntry *fe = oldRules[i].mFontEntry;
|
||||
if (!fe->mIsProxy) {
|
||||
continue;
|
||||
}
|
||||
gfxProxyFontEntry *proxy = static_cast<gfxProxyFontEntry*>(fe);
|
||||
if (proxy->mLoader != nsnull) {
|
||||
proxy->mLoader->Cancel();
|
||||
RemoveLoader(proxy->mLoader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modified) {
|
||||
|
Loading…
Reference in New Issue
Block a user