Bug 1154150 - Only create a FontFaceSet if we find @font-face rules. r=jdaggett

This commit is contained in:
Cameron McCormack 2015-05-09 14:47:09 +10:00
Родитель 184c096a54
Коммит 167b35116f
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -2110,10 +2110,14 @@ nsPresContext::FlushUserFontSet()
return;
}
if (!mFontFaceSet) {
bool changed = false;
if (!mFontFaceSet && !rules.IsEmpty()) {
mFontFaceSet = new FontFaceSet(mDocument->GetInnerWindow(), this);
}
bool changed = mFontFaceSet->UpdateRules(rules);
if (mFontFaceSet) {
changed = mFontFaceSet->UpdateRules(rules);
}
// We need to enqueue a style change reflow (for later) to
// reflect that we're modifying @font-face rules. (However,