mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1323777 part 3 - Ensure that collecting telemetry on user font usage don't have unwanted side effects. r=smaug
This commit is contained in:
parent
daa0033987
commit
bf382ceca8
@ -12782,7 +12782,7 @@ nsAutoSyncOperation::~nsAutoSyncOperation()
|
||||
}
|
||||
|
||||
gfxUserFontSet*
|
||||
nsIDocument::GetUserFontSet()
|
||||
nsIDocument::GetUserFontSet(bool aFlushUserFontSet)
|
||||
{
|
||||
// We want to initialize the user font set lazily the first time the
|
||||
// user asks for it, rather than building it too early and forcing
|
||||
@ -12797,7 +12797,7 @@ nsIDocument::GetUserFontSet()
|
||||
// Set mGetUserFontSetCalled up front, so that FlushUserFontSet will actually
|
||||
// flush.
|
||||
mGetUserFontSetCalled = true;
|
||||
if (mFontFaceSetDirty) {
|
||||
if (mFontFaceSetDirty && aFlushUserFontSet) {
|
||||
// If this assertion fails, and there have actually been changes to
|
||||
// @font-face rules, then we will call StyleChangeReflow in
|
||||
// FlushUserFontSet. If we're in the middle of reflow,
|
||||
|
@ -2816,7 +2816,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
gfxUserFontSet* GetUserFontSet();
|
||||
gfxUserFontSet* GetUserFontSet(bool aFlushUserFontSet = true);
|
||||
void FlushUserFontSet();
|
||||
void RebuildUserFontSet(); // asynchronously
|
||||
mozilla::dom::FontFaceSet* GetFonts() { return mFontFaceSet; }
|
||||
|
@ -1169,7 +1169,8 @@ PresShell::Destroy()
|
||||
}
|
||||
}
|
||||
if (mPresContext) {
|
||||
gfxUserFontSet* fs = mPresContext->GetUserFontSet();
|
||||
const bool mayFlushUserFontSet = false;
|
||||
gfxUserFontSet* fs = mPresContext->GetUserFontSet(mayFlushUserFontSet);
|
||||
if (fs) {
|
||||
uint32_t fontCount;
|
||||
uint64_t fontSize;
|
||||
|
@ -2212,9 +2212,9 @@ nsPresContext::HasAuthorSpecifiedRules(const nsIFrame *aFrame,
|
||||
}
|
||||
|
||||
gfxUserFontSet*
|
||||
nsPresContext::GetUserFontSet()
|
||||
nsPresContext::GetUserFontSet(bool aFlushUserFontSet)
|
||||
{
|
||||
return mDocument->GetUserFontSet();
|
||||
return mDocument->GetUserFontSet(aFlushUserFontSet);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -952,7 +952,7 @@ public:
|
||||
|
||||
bool SuppressingResizeReflow() const { return mSuppressResizeReflow; }
|
||||
|
||||
gfxUserFontSet* GetUserFontSet();
|
||||
gfxUserFontSet* GetUserFontSet(bool aFlushUserFontSet = true);
|
||||
|
||||
// Should be called whenever the set of fonts available in the user
|
||||
// font set changes (e.g., because a new font loads, or because the
|
||||
|
Loading…
Reference in New Issue
Block a user