зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1466432 - Make sure the document.fonts.ready Promise resolves even when there's no refresh driver. r=heycam
This commit is contained in:
Родитель
6d4c239fd8
Коммит
81fa515ba7
|
@ -155,6 +155,12 @@ FontFaceSet::FontFaceSet(nsPIDOMWindowInner* aWindow, nsIDocument* aDocument)
|
|||
if (!mDocument->DidFireDOMContentLoaded()) {
|
||||
mDocument->AddSystemEventListener(NS_LITERAL_STRING("DOMContentLoaded"),
|
||||
this, false, false);
|
||||
} else {
|
||||
// In some cases we can't rely on CheckLoadingFinished being called from
|
||||
// the refresh driver. For example, documents in display:none iframes.
|
||||
// Or if the document has finished loading and painting at the time that
|
||||
// script requests document.fonts and causes us to get here.
|
||||
CheckLoadingFinished();
|
||||
}
|
||||
|
||||
mDocument->CSSLoader()->AddObserver(this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче