Backed out changeset 6bfb66a2c03e (bug 1376964)

This commit is contained in:
Carsten "Tomcat" Book
2017-07-12 12:41:35 +02:00
parent 97b3ef0b1c
commit 1dcab108c9
6 changed files with 13 additions and 177 deletions

View File

@@ -40,7 +40,6 @@ ServoStyleSet::ServoStyleSet()
, mAuthorStyleDisabled(false)
, mStylistState(StylistState::NotDirty)
, mUserFontSetUpdateGeneration(0)
, mUserFontCacheUpdateGeneration(0)
, mNeedsRestyleAfterEnsureUniqueInner(false)
{
}
@@ -299,21 +298,13 @@ ServoStyleSet::PreTraverseSync()
// it so force computation early.
mPresContext->Document()->GetDocumentState();
// Ensure that the @font-face data is not stale
if (gfxUserFontSet* userFontSet = mPresContext->Document()->GetUserFontSet()) {
// Ensure that the @font-face data is not stale
uint64_t generation = userFontSet->GetGeneration();
if (generation != mUserFontSetUpdateGeneration) {
mPresContext->DeviceContext()->UpdateFontCacheUserFonts(userFontSet);
mUserFontSetUpdateGeneration = generation;
}
// Ensure that the user font cache holds up-to-date data on whether
// our font set is allowed to re-use fonts from the cache.
uint32_t cacheGeneration = gfxUserFontSet::UserFontCache::Generation();
if (cacheGeneration != mUserFontCacheUpdateGeneration) {
gfxUserFontSet::UserFontCache::UpdateAllowedFontSets(userFontSet);
mUserFontCacheUpdateGeneration = cacheGeneration;
}
}
UpdateStylistIfNeeded();