Bug 1144450 - Part 4: Replace uses of mReadyIsResolved with mStatus, as they're equivalent. r=jdaggett

This commit is contained in:
Cameron McCormack 2015-03-24 19:34:32 +11:00
parent 498c2721da
commit 561da6f5c3
2 changed files with 2 additions and 8 deletions

View File

@ -76,7 +76,6 @@ FontFaceSet::FontFaceSet(nsPIDOMWindow* aWindow, nsPresContext* aPresContext)
, mDocument(aPresContext->Document())
, mStatus(FontFaceSetLoadStatus::Loaded)
, mNonRuleFacesDirty(false)
, mReadyIsResolved(true)
, mHasLoadingFontFaces(false)
, mHasLoadingFontFacesIsDirty(false)
{
@ -1349,7 +1348,7 @@ FontFaceSet::CheckLoadingStarted()
(new AsyncEventDispatcher(this, NS_LITERAL_STRING("loading"),
false))->RunDOMEventWhenSafe();
if (mReadyIsResolved && PrefEnabled()) {
if (PrefEnabled()) {
nsRefPtr<Promise> ready;
if (GetParentObject()) {
ErrorResult rv;
@ -1358,7 +1357,6 @@ FontFaceSet::CheckLoadingStarted()
if (ready) {
mReady.swap(ready);
mReadyIsResolved = false;
}
}
}
@ -1425,7 +1423,7 @@ FontFaceSet::MightHavePendingFontLoads()
void
FontFaceSet::CheckLoadingFinished()
{
if (mReadyIsResolved) {
if (mStatus == FontFaceSetLoadStatus::Loaded) {
// We've already resolved mReady and dispatched the loadingdone/loadingerror
// events.
return;
@ -1439,7 +1437,6 @@ FontFaceSet::CheckLoadingFinished()
mStatus = FontFaceSetLoadStatus::Loaded;
if (mReady) {
mReady->MaybeResolve(this);
mReadyIsResolved = true;
}
// Now dispatch the loadingdone/loadingerror events.

View File

@ -311,9 +311,6 @@ private:
// Whether mNonRuleFaces has changed since last time UpdateRules ran.
bool mNonRuleFacesDirty;
// Whether we have called MaybeResolve() on mReady.
bool mReadyIsResolved;
// Whether any FontFace objects in mRuleFaces or mNonRuleFaces are
// loading. Only valid when mHasLoadingFontFacesIsDirty is false. Don't use
// this variable directly; call the HasLoadingFontFaces method instead.