mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1556991 - Remove the pref controlling WOFF2 support; it's always enabled. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D33777 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
eb4060b4c7
commit
d816e90844
@ -935,15 +935,14 @@ gfxUserFontType gfxFontUtils::DetermineFontDataType(const uint8_t* aFontData,
|
||||
}
|
||||
}
|
||||
|
||||
// test for WOFF
|
||||
// test for WOFF or WOFF2
|
||||
if (aFontDataLength >= sizeof(AutoSwap_PRUint32)) {
|
||||
const AutoSwap_PRUint32* version =
|
||||
reinterpret_cast<const AutoSwap_PRUint32*>(aFontData);
|
||||
if (uint32_t(*version) == TRUETYPE_TAG('w', 'O', 'F', 'F')) {
|
||||
return GFX_USERFONT_WOFF;
|
||||
}
|
||||
if (Preferences::GetBool(GFX_PREF_WOFF2_ENABLED) &&
|
||||
uint32_t(*version) == TRUETYPE_TAG('w', 'O', 'F', '2')) {
|
||||
if (uint32_t(*version) == TRUETYPE_TAG('w', 'O', 'F', '2')) {
|
||||
return GFX_USERFONT_WOFF2;
|
||||
}
|
||||
}
|
||||
|
@ -838,7 +838,6 @@ enum gfxUserFontType {
|
||||
GFX_USERFONT_WOFF = 3,
|
||||
GFX_USERFONT_WOFF2 = 4
|
||||
};
|
||||
#define GFX_PREF_WOFF2_ENABLED "gfx.downloadable_fonts.woff2.enabled"
|
||||
|
||||
extern const uint8_t sCJKCompatSVSTable[];
|
||||
|
||||
|
@ -164,8 +164,8 @@ fails-if(OSX) == color-1b.html color-1-ref.html
|
||||
fails-if(OSX) == color-2a.html color-2-ref.html
|
||||
!= color-2a.html color-2-notref.html
|
||||
|
||||
pref(gfx.downloadable_fonts.woff2.enabled,true) == woff2-1.html woff2-1-ref.html
|
||||
pref(gfx.downloadable_fonts.woff2.enabled,true) == woff2-totalsfntsize.html woff2-totalsfntsize-ref.html
|
||||
== woff2-1.html woff2-1-ref.html
|
||||
== woff2-totalsfntsize.html woff2-totalsfntsize-ref.html
|
||||
|
||||
# sanity tests for reflow behavior with downloadable fonts
|
||||
HTTP(..) == reflow-sanity-1.html reflow-sanity-1-ref.html
|
||||
|
@ -620,12 +620,11 @@ nsresult FontFaceSet::StartLoad(gfxUserFontEntry* aUserFontEntry,
|
||||
rv = httpChannel->SetReferrerInfoWithoutClone(referrerInfo);
|
||||
Unused << NS_WARN_IF(NS_FAILED(rv));
|
||||
|
||||
nsAutoCString accept("application/font-woff;q=0.9,*/*;q=0.8");
|
||||
if (Preferences::GetBool(GFX_PREF_WOFF2_ENABLED)) {
|
||||
accept.InsertLiteral("application/font-woff2;q=1.0,", 0);
|
||||
}
|
||||
rv = httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"), accept,
|
||||
false);
|
||||
rv = httpChannel->SetRequestHeader(
|
||||
NS_LITERAL_CSTRING("Accept"),
|
||||
NS_LITERAL_CSTRING("application/font-woff2;q=1.0,application/"
|
||||
"font-woff;q=0.9,*/*;q=0.8"),
|
||||
false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// For WOFF and WOFF2, we should tell servers/proxies/etc NOT to try
|
||||
@ -1112,8 +1111,7 @@ FontFaceSet::FindOrCreateUserFontEntryFromFontFace(
|
||||
|
||||
if (valueString.LowerCaseEqualsASCII("woff")) {
|
||||
face->mFormatFlags |= gfxUserFontSet::FLAG_FORMAT_WOFF;
|
||||
} else if (Preferences::GetBool(GFX_PREF_WOFF2_ENABLED) &&
|
||||
valueString.LowerCaseEqualsASCII("woff2")) {
|
||||
} else if (valueString.LowerCaseEqualsASCII("woff2")) {
|
||||
face->mFormatFlags |= gfxUserFontSet::FLAG_FORMAT_WOFF2;
|
||||
} else if (valueString.LowerCaseEqualsASCII("opentype")) {
|
||||
face->mFormatFlags |= gfxUserFontSet::FLAG_FORMAT_OPENTYPE;
|
||||
@ -1129,7 +1127,6 @@ FontFaceSet::FindOrCreateUserFontEntryFromFontFace(
|
||||
valueString.LowerCaseEqualsASCII("woff-variations")) {
|
||||
face->mFormatFlags |= gfxUserFontSet::FLAG_FORMAT_WOFF_VARIATIONS;
|
||||
} else if (StaticPrefs::layout_css_font_variations_enabled() &&
|
||||
Preferences::GetBool(GFX_PREF_WOFF2_ENABLED) &&
|
||||
valueString.LowerCaseEqualsASCII("woff2-variations")) {
|
||||
face->mFormatFlags |=
|
||||
gfxUserFontSet::FLAG_FORMAT_WOFF2_VARIATIONS;
|
||||
|
@ -781,8 +781,6 @@ pref("gfx.downloadable_fonts.fallback_delay_short", 100);
|
||||
// the uncached load behavior across pages (useful for testing reflow problems)
|
||||
pref("gfx.downloadable_fonts.disable_cache", false);
|
||||
|
||||
pref("gfx.downloadable_fonts.woff2.enabled", true);
|
||||
|
||||
// Whether OTS validation should be applied to OpenType Layout (OTL) tables
|
||||
#ifdef RELEASE_OR_BETA
|
||||
pref("gfx.downloadable_fonts.otl_validation", false);
|
||||
|
Loading…
Reference in New Issue
Block a user