зеркало из https://github.com/mozilla/gecko-dev.git
bug 765700 - part 1 - trigger PresContext to reflow when Mac font list is updated. r=jdaggett
This commit is contained in:
Родитель
5b4ea62d49
Коммит
0c8a150c5c
|
@ -62,6 +62,7 @@
|
|||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsCharTraits.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
@ -735,7 +736,7 @@ gfxMacPlatformFontList::InitFontList()
|
|||
// start the delayed cmap loader
|
||||
StartLoader(kDelayBeforeLoadingCmaps, kIntervalBetweenLoadingCmaps);
|
||||
|
||||
return NS_OK;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -826,11 +827,15 @@ gfxMacPlatformFontList::GetStandardFamilyName(const nsAString& aFontName, nsAStr
|
|||
|
||||
void
|
||||
gfxMacPlatformFontList::ATSNotification(ATSFontNotificationInfoRef aInfo,
|
||||
void* aUserArg)
|
||||
void* aUserArg)
|
||||
{
|
||||
// xxx - should be carefully pruning the list of fonts, not rebuilding it from scratch
|
||||
gfxMacPlatformFontList *qfc = (gfxMacPlatformFontList*)aUserArg;
|
||||
qfc->UpdateFontList();
|
||||
static_cast<gfxMacPlatformFontList*>(aUserArg)->UpdateFontList();
|
||||
|
||||
// modify a preference that will trigger reflow everywhere
|
||||
static const char kPrefName[] = "font.internaluseonly.changed";
|
||||
bool fontInternalChange = Preferences::GetBool(kPrefName, false);
|
||||
Preferences::SetBool(kPrefName, !fontInternalChange);
|
||||
}
|
||||
|
||||
gfxFontEntry*
|
||||
|
|
Загрузка…
Ссылка в новой задаче