зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1587385 - Give a better info (not error) message if a webfont is not used because of font-display timeout. r=heycam
This is not an error in the same way as a download failure, and should not be reported as one. An Info message is sufficient. Also suppress "unknown" location in messages about @font-face rules, as it is not useful, pending a proper fix (bug 1450903). Differential Revision: https://phabricator.services.mozilla.com/D50346 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
18f3e9c47c
Коммит
4114aeff1a
|
@ -899,12 +899,14 @@ void gfxUserFontEntry::FontDataDownloadComplete(
|
|||
return;
|
||||
}
|
||||
|
||||
// download failed
|
||||
mFontSet->LogMessage(
|
||||
this,
|
||||
(mFontDataLoadingState != LOADING_TIMED_OUT ? "download failed"
|
||||
: "download timed out"),
|
||||
nsIScriptError::errorFlag, aDownloadStatus);
|
||||
// download failed or font-display timeout passed
|
||||
if (mFontDataLoadingState == LOADING_TIMED_OUT) {
|
||||
mFontSet->LogMessage(this, "font-display timeout, webfont not used",
|
||||
nsIScriptError::infoFlag, aDownloadStatus);
|
||||
} else {
|
||||
mFontSet->LogMessage(this, "download failed", nsIScriptError::errorFlag,
|
||||
aDownloadStatus);
|
||||
}
|
||||
|
||||
if (aFontData) {
|
||||
free((void*)aFontData);
|
||||
|
|
|
@ -1270,7 +1270,7 @@ nsresult FontFaceSet::LogMessage(gfxUserFontEntry* aUserFontEntry,
|
|||
href.AssignLiteral("unknown");
|
||||
}
|
||||
#endif
|
||||
href.AssignLiteral("unknown");
|
||||
// Leave href empty if we don't know how to get the correct sheet.
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче