bug 643460 pt 3 - remove gfx.downloadable_fonts.sanitize.preserve_otl_tables preference, no longer needed with new OTS version. r=jfkthame

This commit is contained in:
Masatoshi Kimura 2011-04-26 16:29:43 +01:00
parent d544378ca2
commit 9eff6e5ef5
4 changed files with 1 additions and 29 deletions

View File

@ -149,8 +149,6 @@ SRGBOverrideObserver::Observe(nsISupports *aSubject,
#define GFX_DOWNLOADABLE_FONTS_ENABLED "gfx.downloadable_fonts.enabled"
#define GFX_DOWNLOADABLE_FONTS_SANITIZE "gfx.downloadable_fonts.sanitize"
#define GFX_DOWNLOADABLE_FONTS_SANITIZE_PRESERVE_OTL \
"gfx.downloadable_fonts.sanitize.preserve_otl_tables"
#define GFX_PREF_HARFBUZZ_SCRIPTS "gfx.font_rendering.harfbuzz.scripts"
#define HARFBUZZ_SCRIPTS_DEFAULT gfxUnicodeProperties::SHAPING_DEFAULT
@ -225,7 +223,6 @@ gfxPlatform::gfxPlatform()
mUseHarfBuzzScripts = UNINITIALIZED_VALUE;
mAllowDownloadableFonts = UNINITIALIZED_VALUE;
mDownloadableFontsSanitize = UNINITIALIZED_VALUE;
mSanitizePreserveOTLTables = UNINITIALIZED_VALUE;
}
gfxPlatform*
@ -446,17 +443,6 @@ gfxPlatform::SanitizeDownloadedFonts()
return mDownloadableFontsSanitize;
}
PRBool
gfxPlatform::PreserveOTLTablesWhenSanitizing()
{
if (mSanitizePreserveOTLTables == UNINITIALIZED_VALUE) {
mSanitizePreserveOTLTables =
GetBoolPref(GFX_DOWNLOADABLE_FONTS_SANITIZE_PRESERVE_OTL, PR_FALSE);
}
return mSanitizePreserveOTLTables;
}
PRBool
gfxPlatform::UseHarfBuzzForScript(PRInt32 aScriptCode)
{
@ -1253,8 +1239,6 @@ gfxPlatform::FontsPrefsChanged(nsIPrefBranch *aPrefBranch, const char *aPref)
mAllowDownloadableFonts = UNINITIALIZED_VALUE;
} else if (!strcmp(GFX_DOWNLOADABLE_FONTS_SANITIZE, aPref)) {
mDownloadableFontsSanitize = UNINITIALIZED_VALUE;
} else if (!strcmp(GFX_DOWNLOADABLE_FONTS_SANITIZE_PRESERVE_OTL, aPref)) {
mSanitizePreserveOTLTables = UNINITIALIZED_VALUE;
} else if (!strcmp(GFX_PREF_HARFBUZZ_SCRIPTS, aPref)) {
mUseHarfBuzzScripts = UNINITIALIZED_VALUE;
gfxTextRunWordCache::Flush();

View File

@ -257,11 +257,6 @@ public:
*/
PRBool SanitizeDownloadedFonts();
/**
* Whether to preserve OpenType layout tables when sanitizing
*/
PRBool PreserveOTLTablesWhenSanitizing();
/**
* Whether to use the harfbuzz shaper (depending on script complexity).
*
@ -382,7 +377,6 @@ protected:
PRBool mAllowDownloadableFonts;
PRBool mDownloadableFontsSanitize;
PRBool mSanitizePreserveOTLTables;
// which scripts should be shaped with harfbuzz
PRInt32 mUseHarfBuzzScripts;

View File

@ -363,8 +363,7 @@ SanitizeOpenTypeData(const PRUint8* aData, PRUint32 aLength,
// limit output/expansion to 256MB
ExpandingMemoryStream output(aIsCompressed ? aLength * 2 : aLength,
1024 * 1024 * 256);
if (ots::Process(&output, aData, aLength,
gfxPlatform::GetPlatform()->PreserveOTLTablesWhenSanitizing())) {
if (ots::Process(&output, aData, aLength)) {
aSaneLength = output.Tell();
return static_cast<PRUint8*>(output.forget());
} else {

View File

@ -194,11 +194,6 @@ pref("gfx.color_management.rendering_intent", 0);
pref("gfx.downloadable_fonts.enabled", true);
pref("gfx.downloadable_fonts.fallback_delay", 3000);
pref("gfx.downloadable_fonts.sanitize", true);
#ifdef XP_MACOSX
pref("gfx.downloadable_fonts.sanitize.preserve_otl_tables", false);
#else
pref("gfx.downloadable_fonts.sanitize.preserve_otl_tables", true);
#endif
// see gfx/thebes/gfxUnicodeProperties.h for definitions of script bits
#ifdef XP_MACOSX