From d7cf8f6fad81f98b366144bd8f880ec90a37e5a1 Mon Sep 17 00:00:00 2001 From: John Daggett Date: Wed, 20 Aug 2014 16:54:35 +0900 Subject: [PATCH] Bug 975744 - remove font features pref and enable features by default. r=dbaron --- dom/base/nsDOMClassInfo.cpp | 5 - layout/reftests/font-features/reftest.list | 76 +++--- layout/reftests/font-matching/reftest.list | 4 +- layout/style/Declaration.cpp | 42 ++- layout/style/nsCSSFontDescList.h | 7 +- layout/style/nsCSSParser.cpp | 74 +++--- layout/style/nsCSSPropAliasList.h | 12 +- layout/style/nsCSSPropList.h | 24 +- layout/style/nsCSSProps.cpp | 6 +- layout/style/nsCSSRules.h | 9 - layout/style/nsComputedDOMStylePropertyList.h | 4 +- layout/style/test/property_database.js | 250 +++++++++--------- layout/style/test/test_bug377947.html | 28 +- layout/style/test/test_bug892929.html | 2 +- .../style/test/test_computed_style_prefs.html | 1 - layout/style/test/test_font_face_parser.html | 62 ++--- .../test_font_feature_values_parsing.html | 4 - .../test_specified_value_serialization.html | 12 +- .../test/test_system_font_serialization.html | 2 +- layout/style/ua.css | 5 +- modules/libpref/init/all.js | 14 +- 21 files changed, 284 insertions(+), 359 deletions(-) diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index cc3ae904572..bc21c8409b2 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -2501,11 +2501,6 @@ OldBindingConstructorEnabled(const nsGlobalNameStruct *aStruct, } } - // Don't expose CSSFontFeatureValuesRule unless the pref is enabled - if (aStruct->mDOMClassInfoID == eDOMClassInfo_CSSFontFeatureValuesRule_id) { - return nsCSSFontFeatureValuesRule::PrefEnabled(); - } - return true; } diff --git a/layout/reftests/font-features/reftest.list b/layout/reftests/font-features/reftest.list index d22675c8a6c..8088277e8f4 100644 --- a/layout/reftests/font-features/reftest.list +++ b/layout/reftests/font-features/reftest.list @@ -27,7 +27,7 @@ HTTP(..) == font-features-turkish.html font-features-noliga.html HTTP(..) == font-features-hlig-2.html font-features-hlig.html HTTP(..) == font-features-hlig-4.html font-features-hlig.html HTTP(..) != font-features-hlig-5.html font-features-hlig.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-features-ligatures-none.html font-features-noliga.html +HTTP(..) == font-features-ligatures-none.html font-features-noliga.html # check that feature in style rule overrides @font-face skip-if(B2G) HTTP(..) == font-features-hlig-3.html font-features-noliga.html # bug 773482 @@ -53,35 +53,35 @@ HTTP(..) == font-features-order-2.html font-features-noliga.html # check priority of feature settings vs. font-variant subproperty HTTP(..) == font-features-order-3.html font-features-noliga.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-features-order-4.html font-features-noliga.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-features-order-5.html font-features-hlig.html +HTTP(..) == font-features-order-4.html font-features-noliga.html +HTTP(..) == font-features-order-5.html font-features-hlig.html # check priority involving feature settings and font-variant-alternates -pref(layout.css.font-features.enabled,true) HTTP(..) == alternates-order.html alternates-order-ref.html +HTTP(..) == alternates-order.html alternates-order-ref.html # check that font-specific values line up with @font-face feature settings -pref(layout.css.font-features.enabled,true) HTTP(..) == annotations.html annotations-ref.html +HTTP(..) == annotations.html annotations-ref.html # font-variant subproperties # test for specific features being on and others off, based on prop values # (debug problems with font-variant-debug.html which displays all props) -pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-alternates.html font-variant-alternates-ref.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-caps.html font-variant-caps-ref.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-east-asian.html font-variant-east-asian-ref.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-ligatures.html font-variant-ligatures-ref.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-numeric.html font-variant-numeric-ref.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-position.html font-variant-position-ref.html +HTTP(..) == font-variant-alternates.html font-variant-alternates-ref.html +HTTP(..) == font-variant-caps.html font-variant-caps-ref.html +HTTP(..) == font-variant-east-asian.html font-variant-east-asian-ref.html +HTTP(..) == font-variant-ligatures.html font-variant-ligatures-ref.html +HTTP(..) == font-variant-numeric.html font-variant-numeric-ref.html +HTTP(..) == font-variant-position.html font-variant-position-ref.html # font-kerning -pref(layout.css.font-features.enabled,true) HTTP(..) != font-kerning-normal.html font-kerning-none.html -pref(layout.css.font-features.enabled,true) HTTP(..) != font-kerning-auto.html font-kerning-none.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-kerning-auto.html font-kerning-normal.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-kerning-normal.html font-kerning-kern.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-kerning-none.html font-kerning-nokern.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-kerning-1.html font-kerning-none.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-kerning-2.html font-kerning-normal.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-kerning-3.html font-kerning-none.html -pref(layout.css.font-features.enabled,true) HTTP(..) != font-kerning-table-none.html font-kerning-table-normal.html +HTTP(..) != font-kerning-normal.html font-kerning-none.html +HTTP(..) != font-kerning-auto.html font-kerning-none.html +HTTP(..) == font-kerning-auto.html font-kerning-normal.html +HTTP(..) == font-kerning-normal.html font-kerning-kern.html +HTTP(..) == font-kerning-none.html font-kerning-nokern.html +HTTP(..) == font-kerning-1.html font-kerning-none.html +HTTP(..) == font-kerning-2.html font-kerning-normal.html +HTTP(..) == font-kerning-3.html font-kerning-none.html +HTTP(..) != font-kerning-table-none.html font-kerning-table-normal.html # sanity check for kerning - with no spaces, kerning should occur HTTP(..) == kerning-sanity-check-kern.html kerning-sanity-check-default.html @@ -102,24 +102,24 @@ random-if(!winWidget&&!cocoaWidget) fails-if(winWidget||cocoaWidget) random-if(/ # font-variant-caps fallback # -- sanity check - none of these should look like the default rendering -pref(layout.css.font-features.enabled,true) HTTP(..) != caps-fallback-smallcaps1.html caps-fallback-default.html -pref(layout.css.font-features.enabled,true) HTTP(..) != caps-fallback-smallcaps2.html caps-fallback-default.html -pref(layout.css.font-features.enabled,true) HTTP(..) != caps-fallback-petitecaps.html caps-fallback-default.html -pref(layout.css.font-features.enabled,true) HTTP(..) != caps-fallback-allsmallcaps.html caps-fallback-default.html -pref(layout.css.font-features.enabled,true) HTTP(..) != caps-fallback-allpetitecaps.html caps-fallback-default.html +HTTP(..) != caps-fallback-smallcaps1.html caps-fallback-default.html +HTTP(..) != caps-fallback-smallcaps2.html caps-fallback-default.html +HTTP(..) != caps-fallback-petitecaps.html caps-fallback-default.html +HTTP(..) != caps-fallback-allsmallcaps.html caps-fallback-default.html +HTTP(..) != caps-fallback-allpetitecaps.html caps-fallback-default.html # -- normal or fallback rendering -pref(layout.css.font-features.enabled,true) HTTP(..) == caps-fallback-smallcaps1.html caps-fallback-smcp.html -pref(layout.css.font-features.enabled,true) HTTP(..) == caps-fallback-smallcaps2.html caps-fallback-smcp.html -pref(layout.css.font-features.enabled,true) HTTP(..) == caps-fallback-petitecaps.html caps-fallback-smcp.html -pref(layout.css.font-features.enabled,true) HTTP(..) == caps-fallback-allsmallcaps.html caps-fallback-smcpc2sc.html -pref(layout.css.font-features.enabled,true) HTTP(..) == caps-fallback-allpetitecaps.html caps-fallback-smcpc2sc.html +HTTP(..) == caps-fallback-smallcaps1.html caps-fallback-smcp.html +HTTP(..) == caps-fallback-smallcaps2.html caps-fallback-smcp.html +HTTP(..) == caps-fallback-petitecaps.html caps-fallback-smcp.html +HTTP(..) == caps-fallback-allsmallcaps.html caps-fallback-smcpc2sc.html +HTTP(..) == caps-fallback-allpetitecaps.html caps-fallback-smcpc2sc.html # font-variant-position fallback -pref(layout.css.font-features.enabled,true) HTTP(..) == subsuper-fallback.html subsuper-fallback-ref.html -pref(layout.css.font-features.enabled,true) HTTP(..) != subsuper-fallback.html subsuper-fallback-notref1.html -pref(layout.css.font-features.enabled,true) HTTP(..) != subsuper-fallback.html subsuper-fallback-notref2.html -pref(layout.css.font-features.enabled,true) HTTP(..) != subsuper-fallback.html subsuper-fallback-notref3.html -pref(layout.css.font-features.enabled,true) HTTP(..) != subsuper-fallback-omega.html subsuper-fallback-omega-notref.html -pref(layout.css.font-features.enabled,true) HTTP(..) == subsuper-nofallback.html subsuper-nofallback-ref1.html -pref(layout.css.font-features.enabled,true) HTTP(..) == subsuper-nofallback.html subsuper-nofallback-ref2.html -pref(layout.css.font-features.enabled,true) HTTP(..) != subsuper-nofallback.html subsuper-nofallback-notref.html +HTTP(..) == subsuper-fallback.html subsuper-fallback-ref.html +HTTP(..) != subsuper-fallback.html subsuper-fallback-notref1.html +HTTP(..) != subsuper-fallback.html subsuper-fallback-notref2.html +HTTP(..) != subsuper-fallback.html subsuper-fallback-notref3.html +HTTP(..) != subsuper-fallback-omega.html subsuper-fallback-omega-notref.html +HTTP(..) == subsuper-nofallback.html subsuper-nofallback-ref1.html +HTTP(..) == subsuper-nofallback.html subsuper-nofallback-ref2.html +HTTP(..) != subsuper-nofallback.html subsuper-nofallback-notref.html diff --git a/layout/reftests/font-matching/reftest.list b/layout/reftests/font-matching/reftest.list index 5844cdf041d..e3271cfdfeb 100644 --- a/layout/reftests/font-matching/reftest.list +++ b/layout/reftests/font-matching/reftest.list @@ -91,5 +91,5 @@ random-if(!(cocoaWidget||winWidget)) == arial-arabic.html arial-arabic-ref.html != syntheticbold-rotated.html syntheticbold-rotated-ref.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-synthesis-1.html font-synthesis-1-ref.html -pref(layout.css.font-features.enabled,true) HTTP(..) == font-synthesis-2.html font-synthesis-2-ref.html +HTTP(..) == font-synthesis-1.html font-synthesis-1-ref.html +HTTP(..) == font-synthesis-2.html font-synthesis-2-ref.html diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index 46ee9d8571f..3888862d185 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -632,12 +632,6 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue, const nsCSSValue *fontVariantPosition = data->ValueFor(eCSSProperty_font_variant_position); - // if font features are not enabled, pointers for fontVariant - // values above may be null since the shorthand check ignores them - // font-variant-alternates enabled ==> layout.css.font-features.enabled is true - bool fontFeaturesEnabled = - nsCSSProps::IsEnabled(eCSSProperty_font_variant_alternates); - if (systemFont && systemFont->GetUnit() != eCSSUnit_None && systemFont->GetUnit() != eCSSUnit_Null) { @@ -650,15 +644,14 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue, sizeAdjust->GetUnit() != eCSSUnit_System_Font || featureSettings->GetUnit() != eCSSUnit_System_Font || languageOverride->GetUnit() != eCSSUnit_System_Font || - (fontFeaturesEnabled && - (fontKerning->GetUnit() != eCSSUnit_System_Font || - fontSynthesis->GetUnit() != eCSSUnit_System_Font || - fontVariantAlternates->GetUnit() != eCSSUnit_System_Font || - fontVariantCaps->GetUnit() != eCSSUnit_System_Font || - fontVariantEastAsian->GetUnit() != eCSSUnit_System_Font || - fontVariantLigatures->GetUnit() != eCSSUnit_System_Font || - fontVariantNumeric->GetUnit() != eCSSUnit_System_Font || - fontVariantPosition->GetUnit() != eCSSUnit_System_Font))) { + fontKerning->GetUnit() != eCSSUnit_System_Font || + fontSynthesis->GetUnit() != eCSSUnit_System_Font || + fontVariantAlternates->GetUnit() != eCSSUnit_System_Font || + fontVariantCaps->GetUnit() != eCSSUnit_System_Font || + fontVariantEastAsian->GetUnit() != eCSSUnit_System_Font || + fontVariantLigatures->GetUnit() != eCSSUnit_System_Font || + fontVariantNumeric->GetUnit() != eCSSUnit_System_Font || + fontVariantPosition->GetUnit() != eCSSUnit_System_Font) { // This can't be represented as a shorthand. return; } @@ -672,16 +665,15 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue, sizeAdjust->GetUnit() != eCSSUnit_None || featureSettings->GetUnit() != eCSSUnit_Normal || languageOverride->GetUnit() != eCSSUnit_Normal || - (fontFeaturesEnabled && - (fontKerning->GetIntValue() != NS_FONT_KERNING_AUTO || - fontSynthesis->GetUnit() != eCSSUnit_Enumerated || - fontSynthesis->GetIntValue() != - (NS_FONT_SYNTHESIS_WEIGHT | NS_FONT_SYNTHESIS_STYLE) || - fontVariantAlternates->GetUnit() != eCSSUnit_Normal || - fontVariantEastAsian->GetUnit() != eCSSUnit_Normal || - fontVariantLigatures->GetUnit() != eCSSUnit_Normal || - fontVariantNumeric->GetUnit() != eCSSUnit_Normal || - fontVariantPosition->GetUnit() != eCSSUnit_Normal))) { + fontKerning->GetIntValue() != NS_FONT_KERNING_AUTO || + fontSynthesis->GetUnit() != eCSSUnit_Enumerated || + fontSynthesis->GetIntValue() != + (NS_FONT_SYNTHESIS_WEIGHT | NS_FONT_SYNTHESIS_STYLE) || + fontVariantAlternates->GetUnit() != eCSSUnit_Normal || + fontVariantEastAsian->GetUnit() != eCSSUnit_Normal || + fontVariantLigatures->GetUnit() != eCSSUnit_Normal || + fontVariantNumeric->GetUnit() != eCSSUnit_Normal || + fontVariantPosition->GetUnit() != eCSSUnit_Normal) { return; } diff --git a/layout/style/nsCSSFontDescList.h b/layout/style/nsCSSFontDescList.h index cbbaeab630b..f4255fc61df 100644 --- a/layout/style/nsCSSFontDescList.h +++ b/layout/style/nsCSSFontDescList.h @@ -9,8 +9,5 @@ CSS_FONT_DESC(font-weight, Weight) CSS_FONT_DESC(font-stretch, Stretch) CSS_FONT_DESC(src, Src) CSS_FONT_DESC(unicode-range, UnicodeRange) - -/* Note: the parsing code explicitly also accepts font-feature-settings - and font-language-override. */ -CSS_FONT_DESC(-moz-font-feature-settings, FontFeatureSettings) -CSS_FONT_DESC(-moz-font-language-override, FontLanguageOverride) +CSS_FONT_DESC(font-feature-settings, FontFeatureSettings) +CSS_FONT_DESC(font-language-override, FontLanguageOverride) diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 39cfc42a989..645cd9a6ea6 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -2755,8 +2755,7 @@ CSSParserImpl::ParseAtRule(RuleAppendFunc aAppendFunc, parseFunc = &CSSParserImpl::ParseFontFaceRule; newSection = eCSSSection_General; - } else if (mToken.mIdent.LowerCaseEqualsLiteral("font-feature-values") && - nsCSSFontFeatureValuesRule::PrefEnabled()) { + } else if (mToken.mIdent.LowerCaseEqualsLiteral("font-feature-values")) { parseFunc = &CSSParserImpl::ParseFontFeatureValuesRule; newSection = eCSSSection_General; @@ -11736,9 +11735,6 @@ CSSParserImpl::ParseFont() eCSSProperty_font_weight }; - // font-variant-alternates enabled ==> layout.css.font-features.enabled is true - bool featuresEnabled = - nsCSSProps::IsEnabled(eCSSProperty_font_variant_alternates); nsCSSValue family; if (ParseVariant(family, VARIANT_HK, nsCSSProps::kFontKTable)) { if (eCSSUnit_Inherit == family.GetUnit() || @@ -11754,16 +11750,14 @@ CSSParserImpl::ParseFont() AppendValue(eCSSProperty_font_size_adjust, family); AppendValue(eCSSProperty_font_feature_settings, family); AppendValue(eCSSProperty_font_language_override, family); - if (featuresEnabled) { - AppendValue(eCSSProperty_font_kerning, family); - AppendValue(eCSSProperty_font_synthesis, family); - AppendValue(eCSSProperty_font_variant_alternates, family); - AppendValue(eCSSProperty_font_variant_caps, family); - AppendValue(eCSSProperty_font_variant_east_asian, family); - AppendValue(eCSSProperty_font_variant_ligatures, family); - AppendValue(eCSSProperty_font_variant_numeric, family); - AppendValue(eCSSProperty_font_variant_position, family); - } + AppendValue(eCSSProperty_font_kerning, family); + AppendValue(eCSSProperty_font_synthesis, family); + AppendValue(eCSSProperty_font_variant_alternates, family); + AppendValue(eCSSProperty_font_variant_caps, family); + AppendValue(eCSSProperty_font_variant_east_asian, family); + AppendValue(eCSSProperty_font_variant_ligatures, family); + AppendValue(eCSSProperty_font_variant_numeric, family); + AppendValue(eCSSProperty_font_variant_position, family); } else { AppendValue(eCSSProperty__x_system_font, family); @@ -11777,16 +11771,14 @@ CSSParserImpl::ParseFont() AppendValue(eCSSProperty_font_size_adjust, systemFont); AppendValue(eCSSProperty_font_feature_settings, systemFont); AppendValue(eCSSProperty_font_language_override, systemFont); - if (featuresEnabled) { - AppendValue(eCSSProperty_font_kerning, systemFont); - AppendValue(eCSSProperty_font_synthesis, systemFont); - AppendValue(eCSSProperty_font_variant_alternates, systemFont); - AppendValue(eCSSProperty_font_variant_caps, systemFont); - AppendValue(eCSSProperty_font_variant_east_asian, systemFont); - AppendValue(eCSSProperty_font_variant_ligatures, systemFont); - AppendValue(eCSSProperty_font_variant_numeric, systemFont); - AppendValue(eCSSProperty_font_variant_position, systemFont); - } + AppendValue(eCSSProperty_font_kerning, systemFont); + AppendValue(eCSSProperty_font_synthesis, systemFont); + AppendValue(eCSSProperty_font_variant_alternates, systemFont); + AppendValue(eCSSProperty_font_variant_caps, systemFont); + AppendValue(eCSSProperty_font_variant_east_asian, systemFont); + AppendValue(eCSSProperty_font_variant_ligatures, systemFont); + AppendValue(eCSSProperty_font_variant_numeric, systemFont); + AppendValue(eCSSProperty_font_variant_position, systemFont); } return true; } @@ -11860,23 +11852,21 @@ CSSParserImpl::ParseFont() AppendValue(eCSSProperty_font_size_adjust, nsCSSValue(eCSSUnit_None)); AppendValue(eCSSProperty_font_feature_settings, nsCSSValue(eCSSUnit_Normal)); AppendValue(eCSSProperty_font_language_override, nsCSSValue(eCSSUnit_Normal)); - if (featuresEnabled) { - AppendValue(eCSSProperty_font_kerning, - nsCSSValue(NS_FONT_KERNING_AUTO, eCSSUnit_Enumerated)); - AppendValue(eCSSProperty_font_synthesis, - nsCSSValue(NS_FONT_SYNTHESIS_WEIGHT | NS_FONT_SYNTHESIS_STYLE, - eCSSUnit_Enumerated)); - AppendValue(eCSSProperty_font_variant_alternates, - nsCSSValue(eCSSUnit_Normal)); - AppendValue(eCSSProperty_font_variant_east_asian, - nsCSSValue(eCSSUnit_Normal)); - AppendValue(eCSSProperty_font_variant_ligatures, - nsCSSValue(eCSSUnit_Normal)); - AppendValue(eCSSProperty_font_variant_numeric, - nsCSSValue(eCSSUnit_Normal)); - AppendValue(eCSSProperty_font_variant_position, - nsCSSValue(eCSSUnit_Normal)); - } + AppendValue(eCSSProperty_font_kerning, + nsCSSValue(NS_FONT_KERNING_AUTO, eCSSUnit_Enumerated)); + AppendValue(eCSSProperty_font_synthesis, + nsCSSValue(NS_FONT_SYNTHESIS_WEIGHT | NS_FONT_SYNTHESIS_STYLE, + eCSSUnit_Enumerated)); + AppendValue(eCSSProperty_font_variant_alternates, + nsCSSValue(eCSSUnit_Normal)); + AppendValue(eCSSProperty_font_variant_east_asian, + nsCSSValue(eCSSUnit_Normal)); + AppendValue(eCSSProperty_font_variant_ligatures, + nsCSSValue(eCSSUnit_Normal)); + AppendValue(eCSSProperty_font_variant_numeric, + nsCSSValue(eCSSUnit_Normal)); + AppendValue(eCSSProperty_font_variant_position, + nsCSSValue(eCSSUnit_Normal)); return true; } } diff --git a/layout/style/nsCSSPropAliasList.h b/layout/style/nsCSSPropAliasList.h index 6c37268f1bc..4bc9625d6a5 100644 --- a/layout/style/nsCSSPropAliasList.h +++ b/layout/style/nsCSSPropAliasList.h @@ -119,11 +119,11 @@ CSS_PROP_ALIAS(-moz-box-sizing, box_sizing, MozBoxSizing, "layout.css.prefixes.box-sizing") -CSS_PROP_ALIAS(font-feature-settings, +CSS_PROP_ALIAS(-moz-font-feature-settings, font_feature_settings, - FontFeatureSettings, - "layout.css.font-features.enabled") -CSS_PROP_ALIAS(font-language-override, + MozFontFeatureSettings, + "layout.css.prefixes.font-features") +CSS_PROP_ALIAS(-moz-font-language-override, font_language_override, - FontLanguageOverride, - "layout.css.font-features.enabled") + MozFontLanguageOverride, + "layout.css.prefixes.font-features") diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index a74ca08ac12..e2eb0b69fac 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -1775,9 +1775,9 @@ CSS_PROP_FONT( CSS_PROP_NO_OFFSET, eStyleAnimType_None) CSS_PROP_FONT( - -moz-font-feature-settings, + font-feature-settings, font_feature_settings, - CSS_PROP_DOMPROP_PREFIXED(FontFeatureSettings), + FontFeatureSettings, CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_VALUE_PARSER_FUNCTION | CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | @@ -1794,15 +1794,15 @@ CSS_PROP_FONT( CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, - "layout.css.font-features.enabled", + "", VARIANT_HK, kFontKerningKTable, CSS_PROP_NO_OFFSET, eStyleAnimType_None) CSS_PROP_FONT( - -moz-font-language-override, + font-language-override, font_language_override, - CSS_PROP_DOMPROP_PREFIXED(FontLanguageOverride), + FontLanguageOverride, CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, @@ -1884,7 +1884,7 @@ CSS_PROP_FONT( CSS_PROPERTY_VALUE_PARSER_FUNCTION | CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, - "layout.css.font-features.enabled", + "", 0, kFontSynthesisKTable, CSS_PROP_NO_OFFSET, @@ -1903,7 +1903,7 @@ CSS_PROP_FONT( CSS_PROPERTY_VALUE_PARSER_FUNCTION | CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, - "layout.css.font-features.enabled", + "", 0, kFontVariantAlternatesKTable, CSS_PROP_NO_OFFSET, @@ -1915,7 +1915,7 @@ CSS_PROP_FONT( CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, - "layout.css.font-features.enabled", + "", VARIANT_HMK, kFontVariantCapsKTable, CSS_PROP_NO_OFFSET, @@ -1928,7 +1928,7 @@ CSS_PROP_FONT( CSS_PROPERTY_VALUE_PARSER_FUNCTION | CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, - "layout.css.font-features.enabled", + "", 0, kFontVariantEastAsianKTable, CSS_PROP_NO_OFFSET, @@ -1941,7 +1941,7 @@ CSS_PROP_FONT( CSS_PROPERTY_VALUE_PARSER_FUNCTION | CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, - "layout.css.font-features.enabled", + "", 0, kFontVariantLigaturesKTable, CSS_PROP_NO_OFFSET, @@ -1954,7 +1954,7 @@ CSS_PROP_FONT( CSS_PROPERTY_VALUE_PARSER_FUNCTION | CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, - "layout.css.font-features.enabled", + "", 0, kFontVariantNumericKTable, CSS_PROP_NO_OFFSET, @@ -1966,7 +1966,7 @@ CSS_PROP_FONT( CSS_PROPERTY_PARSE_VALUE | CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE | CSS_PROPERTY_APPLIES_TO_PLACEHOLDER, - "layout.css.font-features.enabled", + "", VARIANT_HMK, kFontVariantPositionKTable, CSS_PROP_NO_OFFSET, diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index be6041fa993..594798ed5ef 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -476,12 +476,8 @@ nsCSSProps::LookupFontDesc(const nsAString& aFontDesc) NS_ABORT_IF_FALSE(gFontDescTable, "no lookup table, needs addref"); nsCSSFontDesc which = nsCSSFontDesc(gFontDescTable->Lookup(aFontDesc)); - // font-variant-alternates enabled ==> layout.css.font-features.enabled is true - bool fontFeaturesEnabled = - nsCSSProps::IsEnabled(eCSSProperty_font_variant_alternates); - // check for unprefixed font-feature-settings/font-language-override - if (which == eCSSFontDesc_UNKNOWN && fontFeaturesEnabled) { + if (which == eCSSFontDesc_UNKNOWN) { nsAutoString prefixedProp; prefixedProp.AppendLiteral("-moz-"); prefixedProp.Append(aFontDesc); diff --git a/layout/style/nsCSSRules.h b/layout/style/nsCSSRules.h index 6cbd924f296..03308d30171 100644 --- a/layout/style/nsCSSRules.h +++ b/layout/style/nsCSSRules.h @@ -338,15 +338,6 @@ public: virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE; - static bool PrefEnabled() - { - // font-variant-alternates enabled ==> layout.css.font-features.enabled is true - bool fontFeaturesEnabled = - nsCSSProps::IsEnabled(eCSSProperty_font_variant_alternates); - - return fontFeaturesEnabled; - } - protected: ~nsCSSFontFeatureValuesRule() {} diff --git a/layout/style/nsComputedDOMStylePropertyList.h b/layout/style/nsComputedDOMStylePropertyList.h index 335f2e816dc..7f3f38da258 100644 --- a/layout/style/nsComputedDOMStylePropertyList.h +++ b/layout/style/nsComputedDOMStylePropertyList.h @@ -117,7 +117,9 @@ COMPUTED_STYLE_PROP(flex_wrap, FlexWrap) COMPUTED_STYLE_PROP(float, Float) //// COMPUTED_STYLE_PROP(font, Font) COMPUTED_STYLE_PROP(font_family, FontFamily) +COMPUTED_STYLE_PROP(font_feature_settings, FontFeatureSettings) COMPUTED_STYLE_PROP(font_kerning, FontKerning) +COMPUTED_STYLE_PROP(font_language_override, FontLanguageOverride) COMPUTED_STYLE_PROP(font_size, FontSize) COMPUTED_STYLE_PROP(font_size_adjust, FontSizeAdjust) COMPUTED_STYLE_PROP(font_stretch, FontStretch) @@ -250,8 +252,6 @@ COMPUTED_STYLE_PROP(_moz_column_rule_style, ColumnRuleStyle) COMPUTED_STYLE_PROP(_moz_column_rule_width, ColumnRuleWidth) COMPUTED_STYLE_PROP(_moz_column_width, ColumnWidth) COMPUTED_STYLE_PROP(float_edge, FloatEdge) -COMPUTED_STYLE_PROP(font_feature_settings, FontFeatureSettings) -COMPUTED_STYLE_PROP(font_language_override, FontLanguageOverride) COMPUTED_STYLE_PROP(force_broken_image_icon, ForceBrokenImageIcon) COMPUTED_STYLE_PROP(hyphens, Hyphens) COMPUTED_STYLE_PROP(image_region, ImageRegion) diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 3e159494ef9..4a6da740bf7 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -2429,7 +2429,10 @@ var gCSSProperties = { domProp: "font", inherited: true, type: CSS_TYPE_TRUE_SHORTHAND, - subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch", "font-size-adjust", "-moz-font-feature-settings", "-moz-font-language-override" ], + subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch", + "font-size-adjust", "font-feature-settings", "font-language-override", + "font-kerning", "font-synthesis", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", + "font-variant-ligatures", "font-variant-numeric", "font-variant-position" ], initial_values: [ (gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif") ], other_values: [ "large serif", "9px fantasy", "bold italic small-caps 24px/1.4 Times New Roman, serif", "small inherit roman", "small roman inherit", // system fonts @@ -2447,8 +2450,8 @@ var gCSSProperties = { other_values: [ (gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif"), "Times New Roman, serif", "'Times New Roman', serif", "cursive", "fantasy", "\\\"Times New Roman", "\"Times New Roman\"", "Times, \\\"Times New Roman", "Times, \"Times New Roman\"", "-no-such-font-installed", "inherit roman", "roman inherit", "Times, inherit roman", "inherit roman, Times", "roman inherit, Times", "Times, roman inherit" ], invalid_values: [ "\"Times New\" Roman", "\"Times New Roman\n", "Times, \"Times New Roman\n" ] }, - "-moz-font-feature-settings": { - domProp: "MozFontFeatureSettings", + "font-feature-settings": { + domProp: "fontFeatureSettings", inherited: true, type: CSS_TYPE_LONGHAND, initial_values: [ "normal" ], @@ -2466,8 +2469,16 @@ var gCSSProperties = { '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' ] }, - "-moz-font-language-override": { - domProp: "MozFontLanguageOverride", + "font-kerning": { + domProp: "fontKerning", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "auto" ], + other_values: [ "normal", "none" ], + invalid_values: [ "on" ] + }, + "font-language-override": { + domProp: "fontLanguageOverride", inherited: true, type: CSS_TYPE_LONGHAND, initial_values: [ "normal" ], @@ -2519,6 +2530,14 @@ var gCSSProperties = { other_values: [ "italic", "oblique" ], invalid_values: [] }, + "font-synthesis": { + domProp: "fontSynthesis", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "weight style" ], + other_values: [ "none", "weight", "style" ], + invalid_values: [ "weight none", "style none", "none style", "weight 10px", "weight weight", "style style" ] + }, "font-variant": { domProp: "fontVariant", inherited: true, @@ -2534,6 +2553,72 @@ var gCSSProperties = { "traditional historical-forms styleset(ok-alt-a, ok-alt-b) historical-forms", "historical-forms styleset(ok-alt-a, ok-alt-b) traditional styleset(potato)", "annotation(a,b,c)" ] }, + "font-variant-alternates": { + domProp: "fontVariantAlternates", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "historical-forms", + "styleset(alt-a, alt-b)", "character-variant(a, b, c)", "annotation(circled)", + "swash(squishy)", "styleset(complex\\ blob, a)", "annotation(\\62 lah)" ], + invalid_values: [ "historical-forms normal", "historical-forms historical-forms", + "swash", "swash(3)", "annotation(a, b)", "ornaments(a,b)", + "styleset(1234blah)", "annotation(a), annotation(b)", "annotation(a) normal" ] + }, + "font-variant-caps": { + domProp: "fontVariantCaps", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "titling-caps", "unicase" ], + invalid_values: [ "normal small-caps", "petite-caps normal", "unicase unicase" ] + }, + "font-variant-east-asian": { + domProp: "fontVariantEastAsian", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "jis78", "jis83", "jis90", "jis04", "simplified", "traditional", "full-width", "proportional-width", "ruby", + "jis78 full-width", "jis78 full-width ruby", "simplified proportional-width", "ruby simplified" ], + invalid_values: [ "jis78 normal", "jis90 jis04", "simplified traditional", "full-width proportional-width", + "ruby simplified ruby", "jis78 ruby simplified" ] + }, + "font-variant-ligatures": { + domProp: "fontVariantLigatures", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", + "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual", + "common-ligatures no-discretionary-ligatures", "contextual no-discretionary-ligatures", + "historical-ligatures no-common-ligatures", "no-historical-ligatures discretionary-ligatures", + "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual" ], + invalid_values: [ "common-ligatures normal", "common-ligatures no-common-ligatures", "common-ligatures common-ligatures", + "no-historical-ligatures historical-ligatures", "no-discretionary-ligatures discretionary-ligatures", + "no-contextual contextual", "common-ligatures no-discretionary-ligatures no-common-ligatures", + "common-ligatures none", "no-discretionary-ligatures none", "none common-ligatures" ] + }, + "font-variant-numeric": { + domProp: "fontVariantNumeric", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", + "stacked-fractions", "slashed-zero", "ordinal", "lining-nums diagonal-fractions", + "tabular-nums stacked-fractions", "tabular-nums slashed-zero stacked-fractions", + "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal" ], + invalid_values: [ "lining-nums normal", "lining-nums oldstyle-nums", "lining-nums normal slashed-zero ordinal", + "proportional-nums tabular-nums", "diagonal-fractions stacked-fractions", "slashed-zero diagonal-fractions slashed-zero", + "lining-nums slashed-zero diagonal-fractions oldstyle-nums", "diagonal-fractions diagonal-fractions" ] + }, + "font-variant-position": { + domProp: "fontVariantPosition", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "normal" ], + other_values: [ "super", "sub" ], + invalid_values: [ "normal sub", "super sub" ] + }, "font-weight": { domProp: "fontWeight", inherited: true, @@ -4341,6 +4426,37 @@ var gCSSProperties = { initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ], other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ], invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ] + }, + "-moz-font-feature-settings": { + domProp: "MozFontFeatureSettings", + inherited: true, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "font-feature-settings", + subproperties: [ "font-feature-settings" ], + initial_values: [ "normal" ], + other_values: [ + "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", + "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', + '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', + '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', + '"liga" ,"smcp" 0 , "blah"' + ], + invalid_values: [ + 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', + 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", + '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', + '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' + ] + }, + "-moz-font-language-override": { + domProp: "MozFontLanguageOverride", + inherited: true, + type: CSS_TYPE_SHORTHAND_AND_LONGHAND, + alias_for: "font-language-override", + subproperties: [ "font-language-override" ], + initial_values: [ "normal" ], + other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], + invalid_values: [ "TRK", "ja" ] } } @@ -4430,130 +4546,6 @@ if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) { } } -if (SpecialPowers.getBoolPref("layout.css.font-features.enabled")) { - var fontFeatureProperties = { - "font-kerning": { - domProp: "fontKerning", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "auto" ], - other_values: [ "normal", "none" ], - invalid_values: [ "on" ] - }, - "font-variant-alternates": { - domProp: "fontVariantAlternates", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "historical-forms", - "styleset(alt-a, alt-b)", "character-variant(a, b, c)", "annotation(circled)", - "swash(squishy)", "styleset(complex\\ blob, a)", "annotation(\\62 lah)" ], - invalid_values: [ "historical-forms normal", "historical-forms historical-forms", - "swash", "swash(3)", "annotation(a, b)", "ornaments(a,b)", - "styleset(1234blah)", "annotation(a), annotation(b)", "annotation(a) normal" ] - }, - "font-variant-caps": { - domProp: "fontVariantCaps", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "titling-caps", "unicase" ], - invalid_values: [ "normal small-caps", "petite-caps normal", "unicase unicase" ] - }, - "font-variant-east-asian": { - domProp: "fontVariantEastAsian", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "jis78", "jis83", "jis90", "jis04", "simplified", "traditional", "full-width", "proportional-width", "ruby", - "jis78 full-width", "jis78 full-width ruby", "simplified proportional-width", "ruby simplified" ], - invalid_values: [ "jis78 normal", "jis90 jis04", "simplified traditional", "full-width proportional-width", - "ruby simplified ruby", "jis78 ruby simplified" ] - }, - "font-variant-ligatures": { - domProp: "fontVariantLigatures", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", - "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual", - "common-ligatures no-discretionary-ligatures", "contextual no-discretionary-ligatures", - "historical-ligatures no-common-ligatures", "no-historical-ligatures discretionary-ligatures", - "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual" ], - invalid_values: [ "common-ligatures normal", "common-ligatures no-common-ligatures", "common-ligatures common-ligatures", - "no-historical-ligatures historical-ligatures", "no-discretionary-ligatures discretionary-ligatures", - "no-contextual contextual", "common-ligatures no-discretionary-ligatures no-common-ligatures", - "common-ligatures none", "no-discretionary-ligatures none", "none common-ligatures" ] - }, - "font-variant-numeric": { - domProp: "fontVariantNumeric", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", - "stacked-fractions", "slashed-zero", "ordinal", "lining-nums diagonal-fractions", - "tabular-nums stacked-fractions", "tabular-nums slashed-zero stacked-fractions", - "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal" ], - invalid_values: [ "lining-nums normal", "lining-nums oldstyle-nums", "lining-nums normal slashed-zero ordinal", - "proportional-nums tabular-nums", "diagonal-fractions stacked-fractions", "slashed-zero diagonal-fractions slashed-zero", - "lining-nums slashed-zero diagonal-fractions oldstyle-nums", "diagonal-fractions diagonal-fractions" ] - }, - "font-variant-position": { - domProp: "fontVariantPosition", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "normal" ], - other_values: [ "super", "sub" ], - invalid_values: [ "normal sub", "super sub" ] - }, - "font-synthesis": { - domProp: "fontSynthesis", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "weight style" ], - other_values: [ "none", "weight", "style" ], - invalid_values: [ "weight none", "style none", "none style", "weight 10px", "weight weight", "style style" ] - }, - // aliases for prefixed properties - "font-feature-settings": { - domProp: "fontFeatureSettings", - inherited: true, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "-moz-font-feature-settings", - subproperties: [ "-moz-font-feature-settings" ], - initial_values: [ "normal" ], - other_values: [ - "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1", - "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4', - '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4', - '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4', - '"liga" ,"smcp" 0 , "blah"' - ], - invalid_values: [ - 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga', - 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on", - '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal', - '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"' - ] - }, - "font-language-override": { - domProp: "fontLanguageOverride", - inherited: true, - type: CSS_TYPE_SHORTHAND_AND_LONGHAND, - alias_for: "-moz-font-language-override", - subproperties: [ "-moz-font-language-override" ], - initial_values: [ "normal" ], - other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ], - invalid_values: [ "TRK", "ja" ] - } - }; - for (var prop in fontFeatureProperties) { - gCSSProperties[prop] = fontFeatureProperties[prop]; - } - var fontAdditions = [ "font-kerning", "font-synthesis", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position" ]; - gCSSProperties["font"].subproperties = gCSSProperties["font"].subproperties.concat(fontAdditions); -} - if (SpecialPowers.getBoolPref("layout.css.masking.enabled")) { gCSSProperties["mask-type"] = { domProp: "maskType", diff --git a/layout/style/test/test_bug377947.html b/layout/style/test/test_bug377947.html index 2bcea156fa6..00946bf2fe6 100644 --- a/layout/style/test/test_bug377947.html +++ b/layout/style/test/test_bug377947.html @@ -58,24 +58,18 @@ var all_but_one = { "font-size": "small", "font-size-adjust": "none", // has to be default value "font-stretch": "normal", // has to be default value - "-moz-font-feature-settings": "normal", // has to be default value - "-moz-font-language-override": "normal" // has to be default value + "font-feature-settings": "normal", // has to be default value + "font-language-override": "normal", // has to be default value + "font-kerning": "auto", // has to be default value + "font-synthesis": "weight style", // has to be default value + "font-variant-alternates": "normal", // has to be default value + "font-variant-caps": "normal", // has to be default value + "font-variant-east-asian": "normal", // has to be default value + "font-variant-ligatures": "normal", // has to be default value + "font-variant-numeric": "normal", // has to be default value + "font-variant-position": "normal" // has to be default value }; -if (SpecialPowers.getBoolPref("layout.css.font-features.enabled")) { - var featureDefs = { - "font-kerning": "auto", // has to be default value - "font-synthesis": "weight style", // has to be default value - "font-variant-alternates": "normal", // has to be default value - "font-variant-caps": "normal", // has to be default value - "font-variant-east-asian": "normal", // has to be default value - "font-variant-ligatures": "normal", // has to be default value - "font-variant-numeric": "normal", // has to be default value - "font-variant-position": "normal" // has to be default value - }; - for (var prop in featureDefs) { - all_but_one[prop] = featureDefs[prop]; - } -} + for (var prop in all_but_one) { s.setProperty(prop, all_but_one[prop], ""); } diff --git a/layout/style/test/test_bug892929.html b/layout/style/test/test_bug892929.html index 4868dac0017..a67db56ee32 100644 --- a/layout/style/test/test_bug892929.html +++ b/layout/style/test/test_bug892929.html @@ -5,7 +5,7 @@ Bug 892929 test - +