Backout bug 549861 (changesets 27fb48df15ce:7ecd4e3863b4) for insufficient review.
authorMs2ger <ms2ger@gmail.com>
Sun, 19 May 2013 20:23:19 +0200
changeset 143852 9f2fa4839e9860362963f977b09a2621b64e0dd2
parent 143254 7ecd4e3863b42b3aa9420b9c841040fe0f0e3c30
child 143853 90b73c3533fd7ba250803977b718885aa03a20ac
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs549861
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout bug 549861 (changesets 27fb48df15ce:7ecd4e3863b4) for insufficient review.
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/interfaces/base/domstubs.idl
dom/interfaces/css/moz.build
dom/interfaces/css/nsIDOMCSSFontFeatureValuesRule.idl
dom/interfaces/css/nsIDOMCSSRule.idl
dom/locales/en-US/chrome/layout/css.properties
dom/tests/mochitest/general/test_interfaces.html
gfx/src/nsFont.cpp
gfx/src/nsFont.h
gfx/tests/gfxFontSelectionTests.h
gfx/tests/gfxTextRunPerfTest.cpp
gfx/tests/gfxWordCacheTest.cpp
gfx/thebes/Makefile.in
gfx/thebes/gfxFont.cpp
gfx/thebes/gfxFont.h
gfx/thebes/gfxFontConstants.h
gfx/thebes/gfxFontFeatures.cpp
gfx/thebes/gfxFontFeatures.h
gfx/thebes/gfxGraphiteShaper.cpp
gfx/thebes/gfxHarfBuzzShaper.cpp
layout/reftests/font-features/alternates-order-ref.html
layout/reftests/font-features/alternates-order.html
layout/reftests/font-features/annotations-ref.html
layout/reftests/font-features/annotations.html
layout/reftests/font-features/font-features-order-3.html
layout/reftests/font-features/font-features-order-4.html
layout/reftests/font-features/font-features-order-5.html
layout/reftests/font-features/font-kerning-1.html
layout/reftests/font-features/font-kerning-2.html
layout/reftests/font-features/font-kerning-3.html
layout/reftests/font-features/font-kerning-auto.html
layout/reftests/font-features/font-kerning-kern.html
layout/reftests/font-features/font-kerning-nokern.html
layout/reftests/font-features/font-kerning-none.html
layout/reftests/font-features/font-kerning-normal.html
layout/reftests/font-features/font-kerning-table-none.html
layout/reftests/font-features/font-kerning-table-normal.html
layout/reftests/font-features/font-variant-alternates-ref.html
layout/reftests/font-features/font-variant-alternates.html
layout/reftests/font-features/font-variant-caps-ref.html
layout/reftests/font-features/font-variant-caps.html
layout/reftests/font-features/font-variant-debug.html
layout/reftests/font-features/font-variant-east-asian-ref.html
layout/reftests/font-features/font-variant-east-asian.html
layout/reftests/font-features/font-variant-features.css
layout/reftests/font-features/font-variant-features.js
layout/reftests/font-features/font-variant-ligatures-ref.html
layout/reftests/font-features/font-variant-ligatures.html
layout/reftests/font-features/font-variant-numeric-ref.html
layout/reftests/font-features/font-variant-numeric.html
layout/reftests/font-features/font-variant-position-ref.html
layout/reftests/font-features/font-variant-position.html
layout/reftests/font-features/reftest.list
layout/style/Declaration.cpp
layout/style/Rule.h
layout/style/nsCSSFontDescList.h
layout/style/nsCSSKeywordList.h
layout/style/nsCSSParser.cpp
layout/style/nsCSSPropAliasList.h
layout/style/nsCSSPropList.h
layout/style/nsCSSProps.cpp
layout/style/nsCSSProps.h
layout/style/nsCSSRuleProcessor.cpp
layout/style/nsCSSRuleProcessor.h
layout/style/nsCSSRules.cpp
layout/style/nsCSSRules.h
layout/style/nsCSSValue.cpp
layout/style/nsComputedDOMStyle.cpp
layout/style/nsComputedDOMStyle.h
layout/style/nsRuleNode.cpp
layout/style/nsStyleSet.cpp
layout/style/nsStyleSet.h
layout/style/nsStyleStruct.cpp
layout/style/nsStyleUtil.cpp
layout/style/nsStyleUtil.h
layout/style/test/Makefile.in
layout/style/test/property_database.js
layout/style/test/test_bug377947.html
layout/style/test/test_font_feature_values_parsing.html
layout/style/test/test_system_font_serialization.html
modules/libpref/src/init/all.js
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -908,18 +908,16 @@ static nsDOMClassInfoData sClassInfoData
 
   NS_DEFINE_CLASSINFO_DATA(OpenWindowEventDetail, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(AsyncScrollEventDetail, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(LockedFile, nsEventTargetSH,
                            EVENTTARGET_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(CSSFontFeatureValuesRule, nsDOMGenericSH,
-                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
 #ifdef MOZ_TIME_MANAGER
   NS_DEFINE_CLASSINFO_DATA(MozTimeManager, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 #endif
 
 #ifdef MOZ_WEBRTC
   NS_DEFINE_CLASSINFO_DATA(DataChannel, nsEventTargetSH,
@@ -2301,20 +2299,16 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_BEGIN(AsyncScrollEventDetail, nsIAsyncScrollEventDetail)
     DOM_CLASSINFO_MAP_ENTRY(nsIAsyncScrollEventDetail)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(LockedFile, nsIDOMLockedFile)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMLockedFile)
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(CSSFontFeatureValuesRule, nsIDOMCSSFontFeatureValuesRule)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSFontFeatureValuesRule)
-  DOM_CLASSINFO_MAP_END
-
 #ifdef MOZ_TIME_MANAGER
   DOM_CLASSINFO_MAP_BEGIN(MozTimeManager, nsIDOMMozTimeManager)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozTimeManager)
   DOM_CLASSINFO_MAP_END
 #endif
 
 #ifdef MOZ_WEBRTC
   DOM_CLASSINFO_MAP_BEGIN(DataChannel, nsIDOMDataChannel)
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -232,18 +232,16 @@ DOMCI_CLASS(CameraControl)
 DOMCI_CLASS(CameraCapabilities)
 
 DOMCI_CLASS(DOMError)
 DOMCI_CLASS(OpenWindowEventDetail)
 DOMCI_CLASS(AsyncScrollEventDetail)
 
 DOMCI_CLASS(LockedFile)
 
-DOMCI_CLASS(CSSFontFeatureValuesRule)
-
 #ifdef MOZ_TIME_MANAGER
 DOMCI_CLASS(MozTimeManager)
 #endif
 
 #ifdef MOZ_WEBRTC
 DOMCI_CLASS(DataChannel)
 DOMCI_CLASS(RTCPeerConnection)
 #endif
--- a/dom/interfaces/base/domstubs.idl
+++ b/dom/interfaces/base/domstubs.idl
@@ -64,17 +64,16 @@ interface nsIDOMHTMLCollection;
 interface nsIDOMHTMLHeadElement;
 
 // CSS
 interface nsIDOMCSSValue;
 interface nsIDOMCSSPrimitiveValue;
 interface nsIDOMCSSRule;
 interface nsIDOMCSSRuleList;
 interface nsIDOMMozCSSKeyframeRule;
-interface nsIDOMCSSFontFeatureValuesRule;
 interface nsIDOMCSSStyleSheet;
 interface nsIDOMCSSStyleDeclaration;
 interface nsIDOMCounter;
 interface nsIDOMRect;
 interface nsIDOMCSSStyleRule;
 interface nsIDOMCSSStyleRuleCollection;
 interface nsIDOMHTMLTableCaptionElement;
 interface nsIDOMHTMLTableSectionElement;
--- a/dom/interfaces/css/moz.build
+++ b/dom/interfaces/css/moz.build
@@ -3,17 +3,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPIDL_SOURCES += [
     'nsIDOMCSSCharsetRule.idl',
     'nsIDOMCSSConditionRule.idl',
     'nsIDOMCSSFontFaceRule.idl',
-    'nsIDOMCSSFontFeatureValuesRule.idl',
     'nsIDOMCSSGroupingRule.idl',
     'nsIDOMCSSImportRule.idl',
     'nsIDOMCSSMediaRule.idl',
     'nsIDOMCSSMozDocumentRule.idl',
     'nsIDOMCSSPageRule.idl',
     'nsIDOMCSSPrimitiveValue.idl',
     'nsIDOMCSSRule.idl',
     'nsIDOMCSSRuleList.idl',
deleted file mode 100644
--- a/dom/interfaces/css/nsIDOMCSSFontFeatureValuesRule.idl
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is the Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   John Daggett <jdaggett@mozilla.com> (original author)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsIDOMCSSRule.idl"
-
-[scriptable, uuid(f4cb1776-389d-4f52-a4d8-68bea5bd00c1)]
-interface nsIDOMCSSFontFeatureValuesRule : nsIDOMCSSRule
-{
-  attribute DOMString fontFamily;
-                      // raises(DOMException) on setting
-
-  attribute DOMString valueText;
-                      // raises(DOMException) on setting
-};
--- a/dom/interfaces/css/nsIDOMCSSRule.idl
+++ b/dom/interfaces/css/nsIDOMCSSRule.idl
@@ -27,17 +27,16 @@ interface nsIDOMCSSRule : nsISupports
   const unsigned short      KEYFRAMES_RULE                 = 7;
   const unsigned short      KEYFRAME_RULE                  = 8;
   // When layout.css.prefixes.animations is disabled/removed,
   // we should remove these two MOZ_* constants.
   const unsigned short      MOZ_KEYFRAMES_RULE             = 7;
   const unsigned short      MOZ_KEYFRAME_RULE              = 8;
   const unsigned short      NAMESPACE_RULE                 = 10;
   const unsigned short      SUPPORTS_RULE                  = 12;
-  const unsigned short      FONT_FEATURE_VALUES_RULE       = 14;
 
   readonly attribute unsigned short      type;
            attribute DOMString           cssText;
                                         // raises(DOMException) on setting
 
   readonly attribute nsIDOMCSSStyleSheet parentStyleSheet;
   readonly attribute nsIDOMCSSRule       parentRule;
 };
--- a/dom/locales/en-US/chrome/layout/css.properties
+++ b/dom/locales/en-US/chrome/layout/css.properties
@@ -110,27 +110,16 @@ PEMQExpectedExpressionStart=Expected '('
 PEMQExpressionEOF=contents of media query expression
 PEMQExpectedFeatureName=Expected media feature name but found '%1$S'.
 PEMQExpectedFeatureNameEnd=Expected ':' or ')' after media feature name but found '%1$S'.
 PEMQNoMinMaxWithoutValue=Media features with min- or max- must have a value.
 PEMQExpectedFeatureValue=Found invalid value for media feature.
 PEBadFontBlockStart=Expected '{' to begin @font-face rule but found '%1$S'.
 PEBadFontBlockEnd=Expected '}' to end @font-face rule but found '%1$S'.
 PEAnonBoxNotAlone=Did not expect anonymous box.
-PEFFVUnexpectedEOF=Unexpected end of @font-feature-values rule.
-PEFFVBlockStart=Expected opening { of @font-feature-values rule but found '%1$S'.
-PEFFVValueSetStart=Expected opening { of feature value set but found '%1$S'.
-PEFFVNoFamily=Expected font family list for @font-feature-values rule but found '%1$S'.
-PEFFVUnexpectedBlockEnd=Expected '}' to end @font-feature-values rule but found '%1$S'.
-PEFFVUnknownFontVariantPropValue=Unknown font-variant property value '%1$S'.
-PEFFVExpectedIdent=Expected identifier but found '%1$S'.
-PEFFVExpectedValue=Expected non-negative integer value but found '%1$S'.
-PEFFVTooManyValues=Too many values for feature type '%1$S'.
-PEFFVGenericInFamilyList=Family list cannot contain generic font family name.
-PEFFVValueDefinitionTrailing=Expected end of value definition but found '%1$S'.
 PEBadDirValue=Expected 'ltr' or 'rtl' in direction selector but found '%1$S'.
 PESupportsConditionStartEOF2='not', '(', or function
 PESupportsConditionInParensEOF=')'
 PESupportsConditionNotEOF='not'
 PESupportsWhitespaceRequired=Expected whitespace after 'not', 'and', or 'or'.
 PESupportsConditionExpectedOpenParenOrFunction=Expected '(' or function while parsing supports condition but found '%1$S'.
 PESupportsConditionExpectedCloseParen=Expected ')' while parsing supports condition but found '%1$S'.
 PESupportsConditionExpectedStart2=Expected 'not', '(', or function while parsing supports condition but found '%1$S'.
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -487,17 +487,16 @@ var interfaceNamesInGlobalScope =
     "BeforeUnloadEvent",
     "NSRGBAColor",
     "MozBrowserFrame",
     "SVGPreserveAspectRatio",
     "HTMLMenuElement",
     "CloseEvent",
     "IDBCursorWithValue",
     "CSSFontFaceRule",
-    "CSSFontFeatureValuesRule",
     "XMLHttpRequestEventTarget",
     "CompositionEvent",
     "HTMLOutputElement",
     "HTMLFormElement",
     "SVGLength",
     "SVGFilterElement",
     "HTMLScriptElement",
     "SVGPathSegCurvetoCubicAbs",
--- a/gfx/src/nsFont.cpp
+++ b/gfx/src/nsFont.cpp
@@ -6,87 +6,67 @@
 #include "nsFont.h"
 #include "nsString.h"
 #include "nsUnicharUtils.h"
 #include "nsCRT.h"
 #include "gfxFont.h"
 
 nsFont::nsFont(const char* aName, uint8_t aStyle, uint8_t aVariant,
                uint16_t aWeight, int16_t aStretch, uint8_t aDecoration,
-               nscoord aSize)
+               nscoord aSize, float aSizeAdjust,
+               const nsString* aLanguageOverride)
 {
   NS_ASSERTION(aName && IsASCII(nsDependentCString(aName)),
                "Must only pass ASCII names here");
   name.AssignASCII(aName);
   style = aStyle;
   systemFont = false;
   variant = aVariant;
   weight = aWeight;
   stretch = aStretch;
   decorations = aDecoration;
   size = aSize;
-  sizeAdjust = 0.0;
-  kerning = NS_FONT_KERNING_AUTO;
-  synthesis = NS_FONT_SYNTHESIS_WEIGHT | NS_FONT_SYNTHESIS_STYLE;
-
-  variantAlternates = 0;
-  variantCaps = NS_FONT_VARIANT_CAPS_NORMAL;
-  variantEastAsian = 0;
-  variantLigatures = 0;
-  variantNumeric = 0;
-  variantPosition = NS_FONT_VARIANT_POSITION_NORMAL;
+  sizeAdjust = aSizeAdjust;
+  if (aLanguageOverride) {
+    languageOverride = *aLanguageOverride;
+  }
 }
 
-nsFont::nsFont(const nsSubstring& aName, uint8_t aStyle, uint8_t aVariant,
+nsFont::nsFont(const nsString& aName, uint8_t aStyle, uint8_t aVariant,
                uint16_t aWeight, int16_t aStretch, uint8_t aDecoration,
-               nscoord aSize)
+               nscoord aSize, float aSizeAdjust,
+               const nsString* aLanguageOverride)
   : name(aName)
 {
   style = aStyle;
   systemFont = false;
   variant = aVariant;
   weight = aWeight;
   stretch = aStretch;
   decorations = aDecoration;
   size = aSize;
-  sizeAdjust = 0.0;
-  kerning = NS_FONT_KERNING_AUTO;
-  synthesis = NS_FONT_SYNTHESIS_WEIGHT | NS_FONT_SYNTHESIS_STYLE;
-
-  variantAlternates = 0;
-  variantCaps = NS_FONT_VARIANT_CAPS_NORMAL;
-  variantEastAsian = 0;
-  variantLigatures = 0;
-  variantNumeric = 0;
-  variantPosition = NS_FONT_VARIANT_POSITION_NORMAL;
+  sizeAdjust = aSizeAdjust;
+  if (aLanguageOverride) {
+    languageOverride = *aLanguageOverride;
+  }
 }
 
 nsFont::nsFont(const nsFont& aOther)
   : name(aOther.name)
 {
   style = aOther.style;
   systemFont = aOther.systemFont;
   variant = aOther.variant;
   weight = aOther.weight;
   stretch = aOther.stretch;
   decorations = aOther.decorations;
   size = aOther.size;
   sizeAdjust = aOther.sizeAdjust;
-  kerning = aOther.kerning;
-  synthesis = aOther.synthesis;
+  languageOverride = aOther.languageOverride;
   fontFeatureSettings = aOther.fontFeatureSettings;
-  languageOverride = aOther.languageOverride;
-  variantAlternates = aOther.variantAlternates;
-  variantCaps = aOther.variantCaps;
-  variantEastAsian = aOther.variantEastAsian;
-  variantLigatures = aOther.variantLigatures;
-  variantNumeric = aOther.variantNumeric;
-  variantPosition = aOther.variantPosition;
-  alternateValues = aOther.alternateValues;
-  featureValueLookup = aOther.featureValueLookup;
 }
 
 nsFont::nsFont()
 {
 }
 
 nsFont::~nsFont()
 {
@@ -96,28 +76,18 @@ bool nsFont::BaseEquals(const nsFont& aO
 {
   if ((style == aOther.style) &&
       (systemFont == aOther.systemFont) &&
       (weight == aOther.weight) &&
       (stretch == aOther.stretch) &&
       (size == aOther.size) &&
       (sizeAdjust == aOther.sizeAdjust) &&
       name.Equals(aOther.name, nsCaseInsensitiveStringComparator()) &&
-      (kerning == aOther.kerning) &&
-      (synthesis == aOther.synthesis) &&
-      (fontFeatureSettings == aOther.fontFeatureSettings) &&
       (languageOverride == aOther.languageOverride) &&
-      (variantAlternates == aOther.variantAlternates) &&
-      (variantCaps == aOther.variantCaps) &&
-      (variantEastAsian == aOther.variantEastAsian) &&
-      (variantLigatures == aOther.variantLigatures) &&
-      (variantNumeric == aOther.variantNumeric) &&
-      (variantPosition == aOther.variantPosition) &&
-      (alternateValues == aOther.alternateValues) &&
-      (featureValueLookup == aOther.featureValueLookup)) {
+      (fontFeatureSettings == aOther.fontFeatureSettings)) {
     return true;
   }
   return false;
 }
 
 bool nsFont::Equals(const nsFont& aOther) const
 {
   if (BaseEquals(aOther) &&
@@ -134,37 +104,26 @@ nsFont& nsFont::operator=(const nsFont& 
   style = aOther.style;
   systemFont = aOther.systemFont;
   variant = aOther.variant;
   weight = aOther.weight;
   stretch = aOther.stretch;
   decorations = aOther.decorations;
   size = aOther.size;
   sizeAdjust = aOther.sizeAdjust;
-  kerning = aOther.kerning;
-  synthesis = aOther.synthesis;
+  languageOverride = aOther.languageOverride;
   fontFeatureSettings = aOther.fontFeatureSettings;
-  languageOverride = aOther.languageOverride;
-  variantAlternates = aOther.variantAlternates;
-  variantCaps = aOther.variantCaps;
-  variantEastAsian = aOther.variantEastAsian;
-  variantLigatures = aOther.variantLigatures;
-  variantNumeric = aOther.variantNumeric;
-  variantPosition = aOther.variantPosition;
-  alternateValues = aOther.alternateValues;
-  featureValueLookup = aOther.featureValueLookup;
   return *this;
 }
 
 void
-nsFont::CopyAlternates(const nsFont& aOther)
+nsFont::AddFontFeaturesToStyle(gfxFontStyle *aStyle) const
 {
-  variantAlternates = aOther.variantAlternates;
-  alternateValues = aOther.alternateValues;
-  featureValueLookup = aOther.featureValueLookup;
+  // simple copy for now, font-variant implementation will expand
+  aStyle->featureSettings.AppendElements(fontFeatureSettings);
 }
 
 static bool IsGenericFontFamily(const nsString& aFamily)
 {
   uint8_t generic;
   nsFont::GetGenericID(aFamily, &generic);
   return generic != kGenericFont_NONE;
 }
@@ -220,209 +179,16 @@ bool nsFont::EnumerateFamilies(nsFontFam
       return false;
 
     ++p; // may advance past p_end
   }
 
   return true;
 }
 
-// mapping from bitflag to font feature tag/value pair
-//
-// these need to be kept in sync with the constants listed
-// in gfxFontConstants.h (e.g. NS_FONT_VARIANT_EAST_ASIAN_JIS78)
-
-// NS_FONT_VARIANT_EAST_ASIAN_xxx values
-const gfxFontFeature eastAsianDefaults[] = {
-  { TRUETYPE_TAG('j','p','7','8'), 1 },
-  { TRUETYPE_TAG('j','p','8','3'), 1 },
-  { TRUETYPE_TAG('j','p','9','0'), 1 },
-  { TRUETYPE_TAG('j','p','0','4'), 1 },
-  { TRUETYPE_TAG('s','m','p','l'), 1 },
-  { TRUETYPE_TAG('t','r','a','d'), 1 },
-  { TRUETYPE_TAG('f','w','i','d'), 1 },
-  { TRUETYPE_TAG('p','w','i','d'), 1 },
-  { TRUETYPE_TAG('r','u','b','y'), 1 }
-};
-
-PR_STATIC_ASSERT(NS_ARRAY_LENGTH(eastAsianDefaults) ==
-                 eFeatureEastAsian_numFeatures);
-
-// NS_FONT_VARIANT_LIGATURES_xxx values
-const gfxFontFeature ligDefaults[] = {
-  { TRUETYPE_TAG('l','i','g','a'), 1 },
-  { TRUETYPE_TAG('l','i','g','a'), 0 },
-  { TRUETYPE_TAG('d','l','i','g'), 1 },
-  { TRUETYPE_TAG('d','l','i','g'), 0 },
-  { TRUETYPE_TAG('h','l','i','g'), 1 },
-  { TRUETYPE_TAG('h','l','i','g'), 0 },
-  { TRUETYPE_TAG('c','a','l','t'), 1 },
-  { TRUETYPE_TAG('c','a','l','t'), 0 }
-};
-
-PR_STATIC_ASSERT(NS_ARRAY_LENGTH(ligDefaults) ==
-                 eFeatureLigatures_numFeatures);
-
-// NS_FONT_VARIANT_NUMERIC_xxx values
-const gfxFontFeature numericDefaults[] = {
-  { TRUETYPE_TAG('l','n','u','m'), 1 },
-  { TRUETYPE_TAG('o','n','u','m'), 1 },
-  { TRUETYPE_TAG('p','n','u','m'), 1 },
-  { TRUETYPE_TAG('t','n','u','m'), 1 },
-  { TRUETYPE_TAG('f','r','a','c'), 1 },
-  { TRUETYPE_TAG('a','f','r','c'), 1 },
-  { TRUETYPE_TAG('z','e','r','o'), 1 },
-  { TRUETYPE_TAG('o','r','d','n'), 1 }
-};
-
-PR_STATIC_ASSERT(NS_ARRAY_LENGTH(numericDefaults) ==
-                 eFeatureNumeric_numFeatures);
-
-static void
-AddFontFeaturesBitmask(uint32_t aValue, uint32_t aMin, uint32_t aMax,
-                      const gfxFontFeature aFeatureDefaults[],
-                      nsTArray<gfxFontFeature>& aFeaturesOut)
-
-{
-  uint32_t i, m;
-
-  for (i = 0, m = aMin; m <= aMax; i++, m <<= 1) {
-    if (m & aValue) {
-      const gfxFontFeature& feature = aFeatureDefaults[i];
-      aFeaturesOut.AppendElement(feature);
-    }
-  }
-}
-
-void nsFont::AddFontFeaturesToStyle(gfxFontStyle *aStyle) const
-{
-  // add in font-variant features
-  gfxFontFeature setting;
-
-  // -- kerning
-  setting.mTag = TRUETYPE_TAG('k','e','r','n');
-  switch (kerning) {
-    case NS_FONT_KERNING_NONE:
-      setting.mValue = 0;
-      aStyle->featureSettings.AppendElement(setting);
-      break;
-    case NS_FONT_KERNING_NORMAL:
-      setting.mValue = 1;
-      aStyle->featureSettings.AppendElement(setting);
-      break;
-    default:
-      // auto case implies use user agent default
-      break;
-  }
-
-  // -- alternates
-  if (variantAlternates & NS_FONT_VARIANT_ALTERNATES_HISTORICAL) {
-    setting.mValue = 1;
-    setting.mTag = TRUETYPE_TAG('h','i','s','t');
-    aStyle->featureSettings.AppendElement(setting);
-  }
-
-
-  // -- copy font-specific alternate info into style
-  //    (this will be resolved after font-matching occurs)
-  aStyle->alternateValues.AppendElements(alternateValues);
-  aStyle->featureValueLookup = featureValueLookup;
-
-  // -- caps
-  setting.mValue = 1;
-  switch (variantCaps) {
-    case NS_FONT_VARIANT_CAPS_ALLSMALL:
-      setting.mTag = TRUETYPE_TAG('c','2','s','c');
-      aStyle->featureSettings.AppendElement(setting);
-      // fall through to the small-caps case
-    case NS_FONT_VARIANT_CAPS_SMALLCAPS:
-      setting.mTag = TRUETYPE_TAG('s','m','c','p');
-      aStyle->featureSettings.AppendElement(setting);
-      break;
-
-    case NS_FONT_VARIANT_CAPS_ALLPETITE:
-      setting.mTag = TRUETYPE_TAG('c','2','p','c');
-      aStyle->featureSettings.AppendElement(setting);
-      // fall through to the petite-caps case
-    case NS_FONT_VARIANT_CAPS_PETITECAPS:
-      setting.mTag = TRUETYPE_TAG('p','c','a','p');
-      aStyle->featureSettings.AppendElement(setting);
-      break;
-
-    case NS_FONT_VARIANT_CAPS_TITLING:
-      setting.mTag = TRUETYPE_TAG('t','i','t','l');
-      aStyle->featureSettings.AppendElement(setting);
-      break;
-
-    case NS_FONT_VARIANT_CAPS_UNICASE:
-      setting.mTag = TRUETYPE_TAG('u','n','i','c');
-      aStyle->featureSettings.AppendElement(setting);
-      break;
-
-    default:
-      break;
-  }
-
-  // -- east-asian
-  if (variantEastAsian) {
-    AddFontFeaturesBitmask(variantEastAsian,
-                           NS_FONT_VARIANT_EAST_ASIAN_JIS78,
-                           NS_FONT_VARIANT_EAST_ASIAN_RUBY,
-                           eastAsianDefaults, aStyle->featureSettings);
-  }
-
-  // -- ligatures
-  if (variantLigatures) {
-    AddFontFeaturesBitmask(variantLigatures,
-                           NS_FONT_VARIANT_LIGATURES_COMMON,
-                           NS_FONT_VARIANT_LIGATURES_NO_CONTEXTUAL,
-                           ligDefaults, aStyle->featureSettings);
-
-    // special case common ligs, which also enable/disable clig
-    if (variantLigatures & NS_FONT_VARIANT_LIGATURES_COMMON) {
-      setting.mTag = TRUETYPE_TAG('c','l','i','g');
-      setting.mValue = 1;
-      aStyle->featureSettings.AppendElement(setting);
-    } else if (variantLigatures & NS_FONT_VARIANT_LIGATURES_NO_COMMON) {
-      setting.mTag = TRUETYPE_TAG('c','l','i','g');
-      setting.mValue = 0;
-      aStyle->featureSettings.AppendElement(setting);
-    }
-  }
-
-  // -- numeric
-  if (variantNumeric) {
-    AddFontFeaturesBitmask(variantNumeric,
-                           NS_FONT_VARIANT_NUMERIC_LINING,
-                           NS_FONT_VARIANT_NUMERIC_ORDINAL,
-                           numericDefaults, aStyle->featureSettings);
-  }
-
-  // -- position
-  setting.mTag = 0;
-  setting.mValue = 1;
-  switch (variantPosition) {
-    case NS_FONT_VARIANT_POSITION_SUPER:
-      setting.mTag = TRUETYPE_TAG('s','u','p','s');
-      aStyle->featureSettings.AppendElement(setting);
-      break;
-
-    case NS_FONT_VARIANT_POSITION_SUB:
-      setting.mTag = TRUETYPE_TAG('s','u','b','s');
-      aStyle->featureSettings.AppendElement(setting);
-      break;
-
-    default:
-      break;
-  }
-
-  // add in features from font-feature-settings
-  aStyle->featureSettings.AppendElements(fontFeatureSettings);
-}
-
 static bool FontEnumCallback(const nsString& aFamily, bool aGeneric, void *aData)
 {
   *((nsString*)aData) = aFamily;
   return false;
 }
 
 void nsFont::GetFirstFamily(nsString& aFamily) const
 {
--- a/gfx/src/nsFont.h
+++ b/gfx/src/nsFont.h
@@ -7,17 +7,16 @@
 #define nsFont_h___
 
 #include "gfxCore.h"
 #include "nsCoord.h"
 #include "nsStringGlue.h"
 #include "nsTArray.h"
 #include "gfxFontConstants.h"
 #include "gfxFontFeatures.h"
-#include "nsAutoPtr.h"
 
 // XXX we need a method to enumerate all of the possible fonts on the
 // system across family, weight, style, size, etc. But not here!
 
 // Enumerator callback function. Return false to stop
 typedef bool (*nsFontFamilyEnumFunc)(const nsString& aFamily, bool aGeneric, void *aData);
 
 // IDs for generic fonts
@@ -46,32 +45,16 @@ struct NS_GFX nsFont {
 
   // Force this font to not be considered a 'generic' font, even if
   // the name is the same as a CSS generic font family.
   uint8_t systemFont;
 
   // The variant of the font (normal, small-caps)
   uint8_t variant;
 
-  // Variant subproperties
-  // (currently -moz- versions, will replace variant above eventually)
-  uint8_t variantCaps;
-  uint8_t variantLigatures;
-  uint8_t variantNumeric;
-  uint8_t variantPosition;
-
-  uint16_t variantEastAsian;
-
-  // Some font-variant-alternates property values require
-  // font-specific settings defined via @font-feature-values rules.
-  // These are resolved *after* font matching occurs.
-
-  // -- bitmask for both enumerated and functional propvals
-  uint16_t variantAlternates;
-
   // The decorations on the font (underline, overline,
   // line-through). The decorations can be binary or'd together.
   uint8_t decorations;
 
   // The weight of the font; see gfxFontConstants.h.
   uint16_t weight;
 
   // The stretch of the font (the sum of various NS_FONT_STRETCH_*
@@ -82,45 +65,35 @@ struct NS_GFX nsFont {
   nscoord size;
 
   // The aspect-value (ie., the ratio actualsize:actualxheight) that any
   // actual physical font created from this font structure must have when
   // rendering or measuring a string. A value of 0 means no adjustment
   // needs to be done.
   float sizeAdjust;
 
-  // -- list of value tags for font-specific alternate features
-  nsTArray<gfxAlternateValue> alternateValues;
-
-  // -- object used to look these up once the font is matched
-  nsRefPtr<gfxFontFeatureValueSet> featureValueLookup;
-
   // Font features from CSS font-feature-settings
   nsTArray<gfxFontFeature> fontFeatureSettings;
 
   // Language system tag, to override document language;
   // this is an OpenType "language system" tag represented as a 32-bit integer
   // (see http://www.microsoft.com/typography/otspec/languagetags.htm).
   nsString languageOverride;
 
-  // Kerning
-  uint8_t kerning;
-
-  // Synthesis setting, controls use of fake bolding/italics
-  uint8_t synthesis;
-
   // Initialize the font struct with an ASCII name
   nsFont(const char* aName, uint8_t aStyle, uint8_t aVariant,
          uint16_t aWeight, int16_t aStretch, uint8_t aDecoration,
-         nscoord aSize);
+         nscoord aSize, float aSizeAdjust=0.0f,
+         const nsString* aLanguageOverride = nullptr);
 
   // Initialize the font struct with a (potentially) unicode name
-  nsFont(const nsSubstring& aName, uint8_t aStyle, uint8_t aVariant,
+  nsFont(const nsString& aName, uint8_t aStyle, uint8_t aVariant,
          uint16_t aWeight, int16_t aStretch, uint8_t aDecoration,
-         nscoord aSize);
+         nscoord aSize, float aSizeAdjust=0.0f,
+         const nsString* aLanguageOverride = nullptr);
 
   // Make a copy of the given font
   nsFont(const nsFont& aFont);
 
   nsFont();
   ~nsFont();
 
   bool operator==(const nsFont& aOther) const {
@@ -128,18 +101,16 @@ struct NS_GFX nsFont {
   }
 
   bool Equals(const nsFont& aOther) const ;
   // Compare ignoring differences in 'variant' and 'decoration'
   bool BaseEquals(const nsFont& aOther) const;
 
   nsFont& operator=(const nsFont& aOther);
 
-  void CopyAlternates(const nsFont& aOther);
-
   // Add featureSettings into style
   void AddFontFeaturesToStyle(gfxFontStyle *aStyle) const;
 
   // Utility method to interpret name string
   // enumerates all families specified by this font only
   // returns true if completed, false if stopped
   // enclosing quotes will be removed, and whitespace compressed (as needed)
   bool EnumerateFamilies(nsFontFamilyEnumFunc aFunc, void* aData) const;
--- a/gfx/tests/gfxFontSelectionTests.h
+++ b/gfx/tests/gfxFontSelectionTests.h
@@ -75,25 +75,27 @@ SetupTests()
     /* some common styles */
     gfxFontStyle style_western_normal_16 (FONT_STYLE_NORMAL,
                                           NS_FONT_STRETCH_NORMAL,
                                           400,
                                           16.0,
                                           NS_NewPermanentAtom(NS_LITERAL_STRING("en")),
                                           0.0,
                                           false, false, false,
+                                          NS_LITERAL_STRING(""),
                                           NS_LITERAL_STRING(""));
 
     gfxFontStyle style_western_bold_16 (FONT_STYLE_NORMAL,
                                         NS_FONT_STRETCH_NORMAL,
                                         700,
                                         16.0,
                                         NS_NewPermanentAtom(NS_LITERAL_STRING("en")),
                                         0.0,
                                         false, false, false,
+                                        NS_LITERAL_STRING(""),
                                         NS_LITERAL_STRING(""));
 
     /* Test 0 */
     t = AddTest ("sans-serif",
                  style_western_normal_16,
                  S_ASCII,
                  "ABCD");
 
--- a/gfx/tests/gfxTextRunPerfTest.cpp
+++ b/gfx/tests/gfxTextRunPerfTest.cpp
@@ -61,16 +61,17 @@ RunTest (TestEntry *test, gfxContext *ct
     if (!lastFamilies || strcmp(lastFamilies, test->mFamilies)) {
         gfxFontStyle style_western_normal_16 (FONT_STYLE_NORMAL,
                                               NS_FONT_STRETCH_NORMAL,
                                               400,
                                               16.0,
                                               NS_NewPermanentAtom(NS_LITERAL_STRING("en")),
                                               0.0,
                                               false, false, false,
+                                              NS_LITERAL_STRING(""),
                                               NS_LITERAL_STRING(""));
 
         fontGroup = gfxPlatform::GetPlatform()->CreateFontGroup(NS_ConvertUTF8toUTF16(test->mFamilies), &style_western_normal_16, nullptr);
     }
 
     nsAutoPtr<gfxTextRun> textRun;
     uint32_t i;
     bool isASCII = true;
--- a/gfx/tests/gfxWordCacheTest.cpp
+++ b/gfx/tests/gfxWordCacheTest.cpp
@@ -119,16 +119,17 @@ main (int argc, char **argv) {
    {
        gfxFontStyle style (FONT_STYLE_NORMAL,
                            NS_FONT_STRETCH_NORMAL,
                            139,
                            10.0,
                            NS_NewPermanentAtom(NS_LITERAL_STRING("en")),
                            0.0,
                            false, false, false,
+                           NS_LITERAL_STRING(""),
                            NS_LITERAL_STRING(""));
 
        nsRefPtr<gfxFontGroup> fontGroup =
            gfxPlatform::GetPlatform()->CreateFontGroup(NS_LITERAL_STRING("Geneva, MS Sans Serif, Helvetica,serif"), &style, nullptr);
 
        gfxTextRunFactory::Parameters params = {
            ctx, nullptr, nullptr, nullptr, 0, 60
        };
--- a/gfx/thebes/Makefile.in
+++ b/gfx/thebes/Makefile.in
@@ -28,17 +28,16 @@ CPPSRCS	= \
 	gfxASurface.cpp \
 	gfxAlphaRecovery.cpp \
 	gfxBlur.cpp \
 	gfxCachedTempSurface.cpp \
 	gfxContext.cpp \
 	gfxDrawable.cpp \
 	gfxImageSurface.cpp \
 	gfxFont.cpp \
-	gfxFontFeatures.cpp \
 	gfxFontMissingGlyphs.cpp \
 	gfxFontTest.cpp \
 	gfxFontUtils.cpp \
 	gfxMatrix.cpp \
 	gfxPath.cpp \
 	gfxPattern.cpp \
 	gfxPlatform.cpp \
 	gfxPlatformFontList.cpp \
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -1367,121 +1367,27 @@ gfxFontCache::SizeOfExcludingThis(nsMall
 void
 gfxFontCache::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
                                   FontCacheSizes*   aSizes) const
 {
     aSizes->mFontInstances += aMallocSizeOf(this);
     SizeOfExcludingThis(aMallocSizeOf, aSizes);
 }
 
-#define MAX_SSXX_VALUE 99
-#define MAX_CVXX_VALUE 99
-
-static void
-LookupAlternateValues(gfxFontFeatureValueSet *featureLookup,
-                      const nsAString& aFamily,
-                      const nsTArray<gfxAlternateValue>& altValue,
-                      nsTArray<gfxFontFeature>& aFontFeatures)
-{
-    uint32_t numAlternates = altValue.Length();
-    for (uint32_t i = 0; i < numAlternates; i++) {
-        const gfxAlternateValue& av = altValue.ElementAt(i);
-        nsAutoTArray<uint32_t,4> values;
-
-        // map <family, name, feature> ==> <values>
-        bool found =
-            featureLookup->GetFontFeatureValuesFor(aFamily, av.alternate,
-                                                   av.value, values);
-        uint32_t numValues = values.Length();
-
-        // nothing defined, skip
-        if (!found || numValues == 0) {
-            continue;
-        }
-
-        gfxFontFeature feature;
-        if (av.alternate == NS_FONT_VARIANT_ALTERNATES_CHARACTER_VARIANT) {
-            NS_ASSERTION(numValues <= 2,
-                         "too many values allowed for character-variant");
-            // character-variant(12 3) ==> 'cv12' = 3
-            uint32_t nn = values.ElementAt(0);
-            // ignore values greater than 99
-            if (nn == 0 || nn > MAX_CVXX_VALUE) {
-                continue;
-            }
-            feature.mValue = 1;
-            if (numValues > 1) {
-                feature.mValue = values.ElementAt(1);
-            }
-            feature.mTag = HB_TAG('c','v',('0' + nn / 10), ('0' + nn % 10));
-            aFontFeatures.AppendElement(feature);
-
-        } else if (av.alternate == NS_FONT_VARIANT_ALTERNATES_STYLESET) {
-            // styleset(1 2 7) ==> 'ss01' = 1, 'ss02' = 1, 'ss07' = 1
-            feature.mValue = 1;
-            for (uint32_t v = 0; v < numValues; v++) {
-                uint32_t nn = values.ElementAt(v);
-                if (nn == 0 || nn > MAX_SSXX_VALUE) {
-                    continue;
-                }
-                feature.mTag = HB_TAG('s','s',('0' + nn / 10), ('0' + nn % 10));
-                aFontFeatures.AppendElement(feature);
-            }
-
-        } else {
-            NS_ASSERTION(numValues == 1,
-                   "too many values for font-specific font-variant-alternates");
-            feature.mValue = values.ElementAt(0);
-
-            switch (av.alternate) {
-                case NS_FONT_VARIANT_ALTERNATES_STYLISTIC:  // salt
-                    feature.mTag = HB_TAG('s','a','l','t');
-                    break;
-                case NS_FONT_VARIANT_ALTERNATES_SWASH:  // swsh, cswh
-                    feature.mTag = HB_TAG('s','w','s','h');
-                    aFontFeatures.AppendElement(feature);
-                    feature.mTag = HB_TAG('c','s','w','h');
-                    break;
-                case NS_FONT_VARIANT_ALTERNATES_ORNAMENTS: // ornm
-                    feature.mTag = HB_TAG('o','r','n','m');
-                    break;
-                case NS_FONT_VARIANT_ALTERNATES_ANNOTATION: // nalt
-                    feature.mTag = HB_TAG('n','a','l','t');
-                    break;
-                default:
-                    feature.mTag = 0;
-                    break;
-            }
-
-            NS_ASSERTION(feature.mTag, "unsupported alternate type");
-            if (!feature.mTag) {
-                continue;
-            }
-            aFontFeatures.AppendElement(feature);
-        }
-    }
-}
-
 /* static */ bool
 gfxFontShaper::MergeFontFeatures(
-    const gfxFontStyle *aStyle,
+    const nsTArray<gfxFontFeature>& aStyleRuleFeatures,
     const nsTArray<gfxFontFeature>& aFontFeatures,
     bool aDisableLigatures,
-    const nsAString& aFamilyName,
     nsDataHashtable<nsUint32HashKey,uint32_t>& aMergedFeatures)
 {
-    uint32_t numAlts = aStyle->alternateValues.Length();
-    const nsTArray<gfxFontFeature>& styleRuleFeatures =
-        aStyle->featureSettings;
-
     // bail immediately if nothing to do
-    if (styleRuleFeatures.IsEmpty() &&
+    if (aStyleRuleFeatures.IsEmpty() &&
         aFontFeatures.IsEmpty() &&
-        !aDisableLigatures &&
-        numAlts == 0) {
+        !aDisableLigatures) {
         return false;
     }
 
     aMergedFeatures.Init();
 
     // Ligature features are enabled by default in the generic shaper,
     // so we explicitly turn them off if necessary (for letter-spacing)
     if (aDisableLigatures) {
@@ -1493,35 +1399,20 @@ gfxFontShaper::MergeFontFeatures(
     uint32_t i, count;
 
     count = aFontFeatures.Length();
     for (i = 0; i < count; i++) {
         const gfxFontFeature& feature = aFontFeatures.ElementAt(i);
         aMergedFeatures.Put(feature.mTag, feature.mValue);
     }
 
-    // add font-specific feature values from style rules
-    if (aStyle->featureValueLookup && numAlts > 0) {
-        nsAutoTArray<gfxFontFeature,4> featureList;
-
-        // insert list of alternate feature settings
-        LookupAlternateValues(aStyle->featureValueLookup, aFamilyName,
-                              aStyle->alternateValues, featureList);
-
-        count = featureList.Length();
-        for (i = 0; i < count; i++) {
-            const gfxFontFeature& feature = featureList.ElementAt(i);
-            aMergedFeatures.Put(feature.mTag, feature.mValue);
-        }
-    }
-
     // add feature values from style rules
-    count = styleRuleFeatures.Length();
+    count = aStyleRuleFeatures.Length();
     for (i = 0; i < count; i++) {
-        const gfxFontFeature& feature = styleRuleFeatures.ElementAt(i);
+        const gfxFontFeature& feature = aStyleRuleFeatures.ElementAt(i);
         aMergedFeatures.Put(feature.mTag, feature.mValue);
     }
 
     return aMergedFeatures.Count() != 0;
 }
 
 void
 gfxFont::RunMetrics::CombineWith(const RunMetrics& aOther, bool aOtherIsOnLeft)
@@ -4900,25 +4791,23 @@ gfxFontStyle::gfxFontStyle(uint8_t aStyl
     if (!language) {
         NS_WARNING("null language");
         language = nsGkAtoms::x_western;
     }
 }
 
 gfxFontStyle::gfxFontStyle(const gfxFontStyle& aStyle) :
     language(aStyle.language),
-    featureValueLookup(aStyle.featureValueLookup),
     size(aStyle.size), sizeAdjust(aStyle.sizeAdjust),
     languageOverride(aStyle.languageOverride),
     weight(aStyle.weight), stretch(aStyle.stretch),
     systemFont(aStyle.systemFont), printerFont(aStyle.printerFont),
     style(aStyle.style)
 {
     featureSettings.AppendElements(aStyle.featureSettings);
-    alternateValues.AppendElements(aStyle.alternateValues);
 }
 
 int8_t
 gfxFontStyle::ComputeWeight() const
 {
     int8_t baseWeight = (weight + 50) / 100;
 
     if (baseWeight < 0)
--- a/gfx/thebes/gfxFont.h
+++ b/gfx/thebes/gfxFont.h
@@ -68,33 +68,19 @@ struct THEBES_API gfxFontStyle {
                  const nsString& aLanguageOverride);
     gfxFontStyle(const gfxFontStyle& aStyle);
 
     // the language (may be an internal langGroup code rather than an actual
     // language code) specified in the document or element's lang property,
     // or inferred from the charset
     nsRefPtr<nsIAtom> language;
 
-    // Features are composed of (1) features from style rules (2) features
-    // from feature setttings rules and (3) family-specific features.  (1) and
-    // (3) are guaranteed to be mutually exclusive
-
     // custom opentype feature settings
     nsTArray<gfxFontFeature> featureSettings;
 
-    // Some font-variant property values require font-specific settings
-    // defined via @font-feature-values rules.  These are resolved after
-    // font matching occurs.
-
-    // -- list of value tags for specific alternate features
-    nsTArray<gfxAlternateValue> alternateValues;
-
-    // -- object used to look these up once the font is matched
-    nsRefPtr<gfxFontFeatureValueSet> featureValueLookup;
-
     // The logical size of the font, in pixels
     gfxFloat size;
 
     // The aspect-value (ie., the ratio actualsize:actualxheight) that any
     // actual physical font created from this font structure must have when
     // rendering or measuring a string. A value of 0 means no adjustment
     // needs to be done.
     float sizeAdjust;
@@ -153,19 +139,17 @@ struct THEBES_API gfxFontStyle {
             (systemFont == other.systemFont) &&
             (printerFont == other.printerFont) &&
             (weight == other.weight) &&
             (stretch == other.stretch) &&
             (language == other.language) &&
             (*reinterpret_cast<const uint32_t*>(&sizeAdjust) ==
              *reinterpret_cast<const uint32_t*>(&other.sizeAdjust)) &&
             (featureSettings == other.featureSettings) &&
-            (languageOverride == other.languageOverride) &&
-            (alternateValues == other.alternateValues) &&
-            (featureValueLookup == other.featureValueLookup);
+            (languageOverride == other.languageOverride);
     }
 
     static void ParseFontFeatureSettings(const nsString& aFeatureString,
                                          nsTArray<gfxFontFeature>& aFeatures);
 
     static uint32_t ParseFontLanguageOverride(const nsString& aLangTag);
 };
 
@@ -1158,20 +1142,19 @@ public:
                            uint32_t         aLength,
                            int32_t          aScript,
                            gfxShapedText   *aShapedText) = 0;
 
     gfxFont *GetFont() const { return mFont; }
 
     // returns true if features exist in output, false otherwise
     static bool
-    MergeFontFeatures(const gfxFontStyle *aStyle,
+    MergeFontFeatures(const nsTArray<gfxFontFeature>& aStyleRuleFeatures,
                       const nsTArray<gfxFontFeature>& aFontFeatures,
                       bool aDisableLigatures,
-                      const nsAString& aFamilyName,
                       nsDataHashtable<nsUint32HashKey,uint32_t>& aMergedFeatures);
 
 protected:
     // the font this shaper is working with
     gfxFont * mFont;
 };
 
 /* a SPECIFIC single font family */
@@ -1592,20 +1575,16 @@ public:
         FONT_TYPE_CAIRO
     } FontType;
 
     virtual FontType GetType() const = 0;
 
     virtual mozilla::TemporaryRef<mozilla::gfx::ScaledFont> GetScaledFont(mozilla::gfx::DrawTarget *aTarget)
     { return gfxPlatform::GetPlatform()->GetScaledFontForFont(aTarget, this); }
 
-    bool KerningDisabled() {
-        return mKerningSet && !mKerningEnabled;
-    }
-
 protected:
 
     bool HasSubstitutionRulesWithSpaceLookups(int32_t aRunScript) {
         NS_ASSERTION(GetFontEntry()->mHasSpaceFeaturesInitialized,
                      "need to initialize space lookup flags");
         NS_ASSERTION(aRunScript < MOZ_NUM_SCRIPT_CODES, "weird script code");
         if (aRunScript == MOZ_SCRIPT_INVALID ||
             aRunScript >= MOZ_NUM_SCRIPT_CODES) {
--- a/gfx/thebes/gfxFontConstants.h
+++ b/gfx/thebes/gfxFontConstants.h
@@ -25,170 +25,9 @@
 #define NS_FONT_STRETCH_CONDENSED       (-2)
 #define NS_FONT_STRETCH_SEMI_CONDENSED  (-1)
 #define NS_FONT_STRETCH_NORMAL          0
 #define NS_FONT_STRETCH_SEMI_EXPANDED   1
 #define NS_FONT_STRETCH_EXPANDED        2
 #define NS_FONT_STRETCH_EXTRA_EXPANDED  3
 #define NS_FONT_STRETCH_ULTRA_EXPANDED  4
 
-#define NS_FONT_KERNING_AUTO                        0
-#define NS_FONT_KERNING_NONE                        1
-#define NS_FONT_KERNING_NORMAL                      2
-
-#define NS_FONT_SYNTHESIS_WEIGHT                    0x1
-#define NS_FONT_SYNTHESIS_STYLE                     0x2
-
-enum {
-    eFeatureAlternates_historical,
-    eFeatureAlternates_stylistic,
-    eFeatureAlternates_styleset,
-    eFeatureAlternates_character_variant,
-    eFeatureAlternates_swash,
-    eFeatureAlternates_ornaments,
-    eFeatureAlternates_annotation,
-
-    eFeatureAlternates_numFeatures
-};
-
-// alternates - simple enumerated values
-#define NS_FONT_VARIANT_ALTERNATES_HISTORICAL        (1 << eFeatureAlternates_historical)
-
-// alternates - values that use functional syntax
-#define NS_FONT_VARIANT_ALTERNATES_STYLISTIC         (1 << eFeatureAlternates_stylistic)
-#define NS_FONT_VARIANT_ALTERNATES_STYLESET          (1 << eFeatureAlternates_styleset)
-#define NS_FONT_VARIANT_ALTERNATES_CHARACTER_VARIANT (1 << eFeatureAlternates_character_variant)
-#define NS_FONT_VARIANT_ALTERNATES_SWASH             (1 << eFeatureAlternates_swash)
-#define NS_FONT_VARIANT_ALTERNATES_ORNAMENTS         (1 << eFeatureAlternates_ornaments)
-#define NS_FONT_VARIANT_ALTERNATES_ANNOTATION        (1 << eFeatureAlternates_annotation)
-
-#define NS_FONT_VARIANT_ALTERNATES_ENUMERATED_MASK \
-    NS_FONT_VARIANT_ALTERNATES_HISTORICAL
-
-#define NS_FONT_VARIANT_ALTERNATES_FUNCTIONAL_MASK ( \
-    NS_FONT_VARIANT_ALTERNATES_STYLISTIC | \
-    NS_FONT_VARIANT_ALTERNATES_STYLESET | \
-    NS_FONT_VARIANT_ALTERNATES_CHARACTER_VARIANT | \
-    NS_FONT_VARIANT_ALTERNATES_SWASH | \
-    NS_FONT_VARIANT_ALTERNATES_ORNAMENTS | \
-    NS_FONT_VARIANT_ALTERNATES_ANNOTATION )
-
-#define NS_FONT_VARIANT_CAPS_NORMAL                 0
-#define NS_FONT_VARIANT_CAPS_SMALLCAPS              1
-#define NS_FONT_VARIANT_CAPS_ALLSMALL               2
-#define NS_FONT_VARIANT_CAPS_PETITECAPS             3
-#define NS_FONT_VARIANT_CAPS_ALLPETITE              4
-#define NS_FONT_VARIANT_CAPS_TITLING                5
-#define NS_FONT_VARIANT_CAPS_UNICASE                6
-
-enum {
-    eFeatureEastAsian_jis78,
-    eFeatureEastAsian_jis83,
-    eFeatureEastAsian_jis90,
-    eFeatureEastAsian_jis04,
-    eFeatureEastAsian_simplified,
-    eFeatureEastAsian_traditional,
-    eFeatureEastAsian_full_width,
-    eFeatureEastAsian_prop_width,
-    eFeatureEastAsian_ruby,
-
-    eFeatureEastAsian_numFeatures
-};
-
-#define NS_FONT_VARIANT_EAST_ASIAN_JIS78        (1 << eFeatureEastAsian_jis78)
-#define NS_FONT_VARIANT_EAST_ASIAN_JIS83        (1 << eFeatureEastAsian_jis83)
-#define NS_FONT_VARIANT_EAST_ASIAN_JIS90        (1 << eFeatureEastAsian_jis90)
-#define NS_FONT_VARIANT_EAST_ASIAN_JIS04        (1 << eFeatureEastAsian_jis04)
-#define NS_FONT_VARIANT_EAST_ASIAN_SIMPLIFIED   (1 << eFeatureEastAsian_simplified)
-#define NS_FONT_VARIANT_EAST_ASIAN_TRADITIONAL  (1 << eFeatureEastAsian_traditional)
-#define NS_FONT_VARIANT_EAST_ASIAN_FULL_WIDTH   (1 << eFeatureEastAsian_full_width)
-#define NS_FONT_VARIANT_EAST_ASIAN_PROP_WIDTH   (1 << eFeatureEastAsian_prop_width)
-#define NS_FONT_VARIANT_EAST_ASIAN_RUBY         (1 << eFeatureEastAsian_ruby)
-
-#define NS_FONT_VARIANT_EAST_ASIAN_VARIANT_MASK ( \
-    NS_FONT_VARIANT_EAST_ASIAN_JIS78 | \
-    NS_FONT_VARIANT_EAST_ASIAN_JIS83 | \
-    NS_FONT_VARIANT_EAST_ASIAN_JIS90 | \
-    NS_FONT_VARIANT_EAST_ASIAN_JIS04 | \
-    NS_FONT_VARIANT_EAST_ASIAN_SIMPLIFIED | \
-    NS_FONT_VARIANT_EAST_ASIAN_TRADITIONAL )
-
-#define NS_FONT_VARIANT_EAST_ASIAN_WIDTH_MASK ( \
-    NS_FONT_VARIANT_EAST_ASIAN_FULL_WIDTH | \
-    NS_FONT_VARIANT_EAST_ASIAN_PROP_WIDTH )
-
-enum {
-    eFeatureLigatures_common,
-    eFeatureLigatures_no_common,
-    eFeatureLigatures_discretionary,
-    eFeatureLigatures_no_discretionary,
-    eFeatureLigatures_historical,
-    eFeatureLigatures_no_historical,
-    eFeatureLigatures_contextual,
-    eFeatureLigatures_no_contextual,
-
-    eFeatureLigatures_numFeatures
-};
-
-#define NS_FONT_VARIANT_LIGATURES_COMMON            (1 << eFeatureLigatures_common)
-#define NS_FONT_VARIANT_LIGATURES_NO_COMMON         (1 << eFeatureLigatures_no_common)
-#define NS_FONT_VARIANT_LIGATURES_DISCRETIONARY     (1 << eFeatureLigatures_discretionary)
-#define NS_FONT_VARIANT_LIGATURES_NO_DISCRETIONARY  (1 << eFeatureLigatures_no_discretionary)
-#define NS_FONT_VARIANT_LIGATURES_HISTORICAL        (1 << eFeatureLigatures_historical)
-#define NS_FONT_VARIANT_LIGATURES_NO_HISTORICAL     (1 << eFeatureLigatures_no_historical)
-#define NS_FONT_VARIANT_LIGATURES_CONTEXTUAL        (1 << eFeatureLigatures_contextual)
-#define NS_FONT_VARIANT_LIGATURES_NO_CONTEXTUAL     (1 << eFeatureLigatures_no_contextual)
-
-#define NS_FONT_VARIANT_LIGATURES_COMMON_MASK ( \
-    NS_FONT_VARIANT_LIGATURES_COMMON | \
-    NS_FONT_VARIANT_LIGATURES_NO_COMMON )
-
-#define NS_FONT_VARIANT_LIGATURES_DISCRETIONARY_MASK ( \
-    NS_FONT_VARIANT_LIGATURES_DISCRETIONARY | \
-    NS_FONT_VARIANT_LIGATURES_NO_DISCRETIONARY )
-
-#define NS_FONT_VARIANT_LIGATURES_HISTORICAL_MASK ( \
-    NS_FONT_VARIANT_LIGATURES_HISTORICAL | \
-    NS_FONT_VARIANT_LIGATURES_NO_HISTORICAL )
-
-#define NS_FONT_VARIANT_LIGATURES_CONTEXTUAL_MASK \
-    NS_FONT_VARIANT_LIGATURES_CONTEXTUAL | \
-    NS_FONT_VARIANT_LIGATURES_NO_CONTEXTUAL
-
-enum {
-    eFeatureNumeric_lining,
-    eFeatureNumeric_oldstyle,
-    eFeatureNumeric_proportional,
-    eFeatureNumeric_tabular,
-    eFeatureNumeric_diagonal_fractions,
-    eFeatureNumeric_stacked_fractions,
-    eFeatureNumeric_slashedzero,
-    eFeatureNumeric_ordinal,
-
-    eFeatureNumeric_numFeatures
-};
-
-#define NS_FONT_VARIANT_NUMERIC_LINING              (1 << eFeatureNumeric_lining)
-#define NS_FONT_VARIANT_NUMERIC_OLDSTYLE            (1 << eFeatureNumeric_oldstyle)
-#define NS_FONT_VARIANT_NUMERIC_PROPORTIONAL        (1 << eFeatureNumeric_proportional)
-#define NS_FONT_VARIANT_NUMERIC_TABULAR             (1 << eFeatureNumeric_tabular)
-#define NS_FONT_VARIANT_NUMERIC_DIAGONAL_FRACTIONS  (1 << eFeatureNumeric_diagonal_fractions)
-#define NS_FONT_VARIANT_NUMERIC_STACKED_FRACTIONS   (1 << eFeatureNumeric_stacked_fractions)
-#define NS_FONT_VARIANT_NUMERIC_SLASHZERO           (1 << eFeatureNumeric_slashedzero)
-#define NS_FONT_VARIANT_NUMERIC_ORDINAL             (1 << eFeatureNumeric_ordinal)
-
-#define NS_FONT_VARIANT_NUMERIC_FIGURE_MASK \
-    NS_FONT_VARIANT_NUMERIC_LINING | \
-    NS_FONT_VARIANT_NUMERIC_OLDSTYLE
-
-#define NS_FONT_VARIANT_NUMERIC_SPACING_MASK \
-    NS_FONT_VARIANT_NUMERIC_PROPORTIONAL | \
-    NS_FONT_VARIANT_NUMERIC_TABULAR
-
-#define NS_FONT_VARIANT_NUMERIC_FRACTION_MASK \
-    NS_FONT_VARIANT_NUMERIC_DIAGONAL_FRACTIONS | \
-    NS_FONT_VARIANT_NUMERIC_STACKED_FRACTIONS
-
-#define NS_FONT_VARIANT_POSITION_NORMAL             0
-#define NS_FONT_VARIANT_POSITION_SUPER              1
-#define NS_FONT_VARIANT_POSITION_SUB                2
-
 #endif
deleted file mode 100644
--- a/gfx/thebes/gfxFontFeatures.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "gfxFontFeatures.h"
-#include "nsUnicharUtils.h"
-#include "nsHashKeys.h"
-
-using namespace mozilla;
-
-gfxFontFeatureValueSet::gfxFontFeatureValueSet()
-{
-    mFontFeatureValues.Init(10);
-}
-
-bool
-gfxFontFeatureValueSet::GetFontFeatureValuesFor(const nsAString& aFamily,
-                                                uint32_t aVariantProperty,
-                                                const nsAString& aName,
-                                                nsTArray<uint32_t>& aValues)
-{
-    nsAutoString family(aFamily), name(aName);
-    ToLowerCase(family);
-    ToLowerCase(name);
-    FeatureValueHashKey key(family, aVariantProperty, name);
-
-    aValues.Clear();
-    FeatureValueHashEntry *entry = mFontFeatureValues.GetEntry(key);
-    if (entry) {
-        NS_ASSERTION(entry->mValues.Length() > 0,
-                     "null array of font feature values");
-        aValues.AppendElements(entry->mValues);
-        return true;
-    }
-
-    return false;
-}
-
-
-void
-gfxFontFeatureValueSet::AddFontFeatureValues(const nsAString& aFamily,
-                 const nsTArray<gfxFontFeatureValueSet::FeatureValues>& aValues)
-{
-    nsAutoString family(aFamily);
-    ToLowerCase(family);
-
-    uint32_t i, numFeatureValues = aValues.Length();
-    for (i = 0; i < numFeatureValues; i++) {
-        const FeatureValues& fv = aValues.ElementAt(i);
-        uint32_t alternate = fv.alternate;
-        uint32_t j, numValues = fv.valuelist.Length();
-        for (j = 0; j < numValues; j++) {
-            const ValueList& v = fv.valuelist.ElementAt(j);
-            nsAutoString name(v.name);
-            ToLowerCase(name);
-            FeatureValueHashKey key(family, alternate, name);
-            FeatureValueHashEntry *entry = mFontFeatureValues.PutEntry(key);
-            entry->mKey = key;
-            entry->mValues = v.featureSelectors;
-        }
-    }
-}
-
-bool
-gfxFontFeatureValueSet::FeatureValueHashEntry::KeyEquals(
-                                               const KeyTypePointer aKey) const
-{
-    return aKey->mPropVal == mKey.mPropVal &&
-           aKey->mFamily.Equals(mKey.mFamily) &&
-           aKey->mName.Equals(mKey.mName);
-}
-
-PLDHashNumber
-gfxFontFeatureValueSet::FeatureValueHashEntry::HashKey(
-                                                     const KeyTypePointer aKey)
-{
-    return HashString(aKey->mFamily) + HashString(aKey->mName) +
-           aKey->mPropVal * uint32_t(0xdeadbeef);
-}
-
--- a/gfx/thebes/gfxFontFeatures.h
+++ b/gfx/thebes/gfxFontFeatures.h
@@ -2,21 +2,16 @@
 
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef GFX_FONT_FEATURES_H
 #define GFX_FONT_FEATURES_H
 
-#include "gfxTypes.h"
-#include "nsTHashtable.h"
-#include "nsTArray.h"
-#include "nsString.h"
-
 // An OpenType feature tag and value pair
 struct gfxFontFeature {
     uint32_t mTag; // see http://www.microsoft.com/typography/otspec/featuretags.htm
     uint32_t mValue; // 0 = off, 1 = on, larger values may be used as parameters
                      // to features that select among multiple alternatives
 };
 
 inline bool
@@ -26,100 +21,9 @@ operator<(const gfxFontFeature& a, const
 }
 
 inline bool
 operator==(const gfxFontFeature& a, const gfxFontFeature& b)
 {
     return (a.mTag == b.mTag) && (a.mValue == b.mValue);
 }
 
-struct gfxAlternateValue {
-    uint32_t           alternate;  // constants in gfxFontConstants.h
-    nsString           value;      // string value to be looked up
-};
-
-inline bool
-operator<(const gfxAlternateValue& a, const gfxAlternateValue& b)
-{
-    return (a.alternate < b.alternate) ||
-        ((a.alternate == b.alternate) && (a.value < b.value));
-}
-
-inline bool
-operator==(const gfxAlternateValue& a, const gfxAlternateValue& b)
-{
-    return (a.alternate == b.alternate) && (a.value == b.value);
-}
-
-class THEBES_API gfxFontFeatureValueSet {
-public:
-    NS_INLINE_DECL_REFCOUNTING(gfxFontFeatureValueSet)
-
-    gfxFontFeatureValueSet();
-    virtual ~gfxFontFeatureValueSet() {}
-
-    struct ValueList {
-        ValueList(const nsAString& aName, const nsTArray<uint32_t>& aSelectors)
-          : name(aName), featureSelectors(aSelectors)
-        {}
-        nsString             name;
-        nsTArray<uint32_t>   featureSelectors;
-    };
-
-    struct FeatureValues {
-        uint32_t             alternate;
-        nsTArray<ValueList>  valuelist;
-    };
-
-    // returns true if found, false otherwise
-    bool
-    GetFontFeatureValuesFor(const nsAString& aFamily,
-                            uint32_t aVariantProperty,
-                            const nsAString& aName,
-                            nsTArray<uint32_t>& aValues);
-    void
-    AddFontFeatureValues(const nsAString& aFamily,
-                const nsTArray<gfxFontFeatureValueSet::FeatureValues>& aValues);
-
-protected:
-    struct FeatureValueHashKey {
-        nsString mFamily;
-        uint32_t mPropVal;
-        nsString mName;
-
-        FeatureValueHashKey()
-            : mPropVal(0)
-        { }
-        FeatureValueHashKey(const nsAString& aFamily,
-                            uint32_t aPropVal,
-                            const nsAString& aName)
-            : mFamily(aFamily), mPropVal(aPropVal), mName(aName)
-        { }
-        FeatureValueHashKey(const FeatureValueHashKey& aKey)
-            : mFamily(aKey.mFamily), mPropVal(aKey.mPropVal), mName(aKey.mName)
-        { }
-    };
-
-    class FeatureValueHashEntry : public PLDHashEntryHdr {
-    public:
-        typedef const FeatureValueHashKey &KeyType;
-        typedef const FeatureValueHashKey *KeyTypePointer;
-
-        FeatureValueHashEntry(KeyTypePointer aKey) { }
-        FeatureValueHashEntry(const FeatureValueHashEntry& toCopy)
-        {
-            NS_ERROR("Should not be called");
-        }
-        ~FeatureValueHashEntry() { }
-
-        bool KeyEquals(const KeyTypePointer aKey) const;
-        static KeyTypePointer KeyToPointer(KeyType aKey) { return &aKey; }
-        static PLDHashNumber HashKey(const KeyTypePointer aKey);
-        enum { ALLOW_MEMMOVE = true };
-
-        FeatureValueHashKey mKey;
-        nsTArray<uint32_t>  mValues;
-    };
-
-    nsTHashtable<FeatureValueHashEntry> mFontFeatureValues;
-  };
-
 #endif
--- a/gfx/thebes/gfxGraphiteShaper.cpp
+++ b/gfx/thebes/gfxGraphiteShaper.cpp
@@ -187,23 +187,18 @@ gfxGraphiteShaper::ShapeText(gfxContext 
         nsAutoCString langString;
         style->language->ToUTF8String(langString);
         grLang = GetGraphiteTagForLang(langString);
     }
     gr_feature_val *grFeatures = gr_face_featureval_for_lang(mGrFace, grLang);
 
     nsDataHashtable<nsUint32HashKey,uint32_t> mergedFeatures;
 
-    // if style contains font-specific features
-    if (MergeFontFeatures(style,
-                          mFont->GetFontEntry()->mFeatureSettings,
-                          aShapedText->DisableLigatures(),
-                          mFont->GetFontEntry()->FamilyName(),
-                          mergedFeatures))
-    {
+    if (MergeFontFeatures(style->featureSettings, entry->mFeatureSettings,
+                          aShapedText->DisableLigatures(), mergedFeatures)) {
         // enumerate result and insert into Graphite feature list
         GrFontFeatures f = {mGrFace, grFeatures};
         mergedFeatures.Enumerate(AddFeature, &f);
     }
 
     size_t numChars = gr_count_unicode_characters(gr_utf16,
                                                   aText, aText + aLength,
                                                   nullptr);
--- a/gfx/thebes/gfxHarfBuzzShaper.cpp
+++ b/gfx/thebes/gfxHarfBuzzShaper.cpp
@@ -94,24 +94,22 @@ HBGetTable(hb_face_t *face, hb_tag_t aTa
 }
 
 /*
  * HarfBuzz font callback functions; font_data is a ptr to a
  * FontCallbackData struct
  */
 
 struct FontCallbackData {
-    FontCallbackData(gfxHarfBuzzShaper *aShaper, gfxContext *aContext,
-                     bool aKerning)
-        : mShaper(aShaper), mContext(aContext), mKerning(aKerning)
+    FontCallbackData(gfxHarfBuzzShaper *aShaper, gfxContext *aContext)
+        : mShaper(aShaper), mContext(aContext)
     { }
 
     gfxHarfBuzzShaper *mShaper;
     gfxContext        *mContext;
-    bool               mKerning;
 };
 
 #define UNICODE_BMP_LIMIT 0x10000
 
 hb_codepoint_t
 gfxHarfBuzzShaper::GetGlyph(hb_codepoint_t unicode,
                             hb_codepoint_t variation_selector) const
 {
@@ -641,23 +639,17 @@ gfxHarfBuzzShaper::GetHKerning(uint16_t 
 
 static hb_position_t
 HBGetHKerning(hb_font_t *font, void *font_data,
               hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
               void *user_data)
 {
     const FontCallbackData *fcd =
         static_cast<const FontCallbackData*>(font_data);
-
-    // return 0 if kerning is explicitly disabled
-    if (fcd->mKerning) {
-        return fcd->mShaper->GetHKerning(first_glyph, second_glyph);
-    } else {
-        return 0.0;
-    }
+    return fcd->mShaper->GetHKerning(first_glyph, second_glyph);
 }
 
 /*
  * HarfBuzz unicode property callbacks
  */
 
 static hb_codepoint_t
 HBGetMirroring(hb_unicode_funcs_t *ufuncs, hb_codepoint_t aCh,
@@ -959,37 +951,33 @@ gfxHarfBuzzShaper::ShapeText(gfxContext 
     }
 
     if ((!mUseFontGetGlyph && mCmapFormat <= 0) ||
         (!mUseFontGlyphWidths && !mHmtxTable)) {
         // unable to shape with this font
         return false;
     }
 
-    const gfxFontStyle *style = mFont->GetStyle();
-    // kerning is enabled *except* when explicitly disabled (font-kerning: none)
-    FontCallbackData fcd(this, aContext, !mFont->KerningDisabled());
+    FontCallbackData fcd(this, aContext);
     hb_font_t *font = hb_font_create(mHBFace);
     hb_font_set_funcs(font, sHBFontFuncs, &fcd, nullptr);
     hb_font_set_ppem(font, mFont->GetAdjustedSize(), mFont->GetAdjustedSize());
     uint32_t scale = FloatToFixed(mFont->GetAdjustedSize()); // 16.16 fixed-point
     hb_font_set_scale(font, scale, scale);
 
     nsAutoTArray<hb_feature_t,20> features;
 
     gfxFontEntry *entry = mFont->GetFontEntry();
+    const gfxFontStyle *style = mFont->GetStyle();
 
     nsDataHashtable<nsUint32HashKey,uint32_t> mergedFeatures;
 
-    if (MergeFontFeatures(style,
-                          mFont->GetFontEntry()->mFeatureSettings,
-                          aShapedText->DisableLigatures(),
-                          mFont->GetFontEntry()->FamilyName(),
-                          mergedFeatures))
-    {
+    if (MergeFontFeatures(style->featureSettings,
+                      mFont->GetFontEntry()->mFeatureSettings,
+                      aShapedText->DisableLigatures(), mergedFeatures)) {
         // enumerate result and insert into hb_feature array
         mergedFeatures.Enumerate(AddFeature, &features);
     }
 
     bool isRightToLeft = aShapedText->IsRightToLeft();
     hb_buffer_t *buffer = hb_buffer_create();
     hb_buffer_set_unicode_funcs(buffer, sHBUnicodeFuncs);
     hb_buffer_set_direction(buffer, isRightToLeft ? HB_DIRECTION_RTL :
deleted file mode 100644
--- a/layout/reftests/font-features/alternates-order-ref.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-}
-body {
-  font-family: libertine, sans-serif;
-  font-size: 800%;
-  line-height: 1.2em;
-}
-
-div { margin: 0 20px; }
-span {
-  -moz-font-feature-settings: "ss05"; /* crossed W */
-}
-
-</style>
-</head>
-<body lang="en">
-<div><span id="test1">W</span> <span id="test2">W</span> <span id="test3">W</span></div>
-<div><span id="test4">W</span> <span id="test5">W</span> <span id="test6">W</span></div>
-<div><span id="test7">W</span> <span id="test8">W</span> <span id="test9">W</span></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/alternates-order.html
+++ /dev/null
@@ -1,116 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-}
-
-@font-face {
-  font-family: fontA;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-  -moz-font-feature-settings: "ss05" on;
-}
-
-@font-face {
-  font-family: fontB;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-  -moz-font-feature-settings: "ss05" off;
-}
-
-@font-feature-values libertine {
-  @styleset { 
-    crossed-doubleu: 5;
-    somethingElse: 4;
-  }
-}
-
-@font-feature-values fontA {
-  @styleset { aLtW: 5; }
-}
-
-@font-feature-values fontB {
-  @styleset { crossedW: 5; several: 1 3 5; }
-  @styleset { altW: 4; }
-}
-
-@font-feature-values fontB {
-  @styleset {
-    AlTw: 5;
-    defined-for-fontB: 5;
-    scriptJ: 3;
-  }
-}
-
-body {
-  font-family: libertine, sans-serif;
-  font-size: 800%;
-  line-height: 1.2em;
-}
-
-/* -moz-font-feature-settings: "ss05"; crossed W */
-
-div { margin: 0 20px; }
-
-#test1 {
-  font-variant-alternates: styleset(crossed-doubleu);
-}
-
-#test2 {
-  /* testing case-insensitivity of styleset name */
-  font-family: fontB;
-  font-variant-alternates: styleset(altW);
-}
-
-#test3 {
-  /* testing case-insensitivity of styleset name */
-  font-family: fontB;
-  font-variant-alternates: styleset(ALTW);
-}
-
-#test4 {
-  /* testing escapes in styleset name */
-  font-family: fontB;
-  font-variant-alternates: styleset(\41 ltW);
-}
-
-#test5 {
-  /* testing font-specificity of feature value rule */
-  font-family: fontA;
-  font-variant-alternates: styleset(defined-for-fontB);
-}
-
-#test6 {
-  /* testing one feature doesn't affect another */
-  font-variant-alternates: styleset(somethingElse);
-  -moz-font-feature-settings: "ss05" on;
-}
-
-#test7 {
-  /* testing font-specificity of feature value rule */
-  font-family: fontA;
-  font-variant-alternates: styleset(scriptJ);
-  -moz-font-feature-settings: "ss06";
-}
-
-#test8 {
-  /* testing that an undefined value doesn't affect the results */
-  font-family: fontB;
-  font-variant-alternates: styleset(scriptJ, somethingUndefined, defined-for-fontB);
-}
-
-#test9 {
-  /* testing matching of font name with escape */
-  font-family: font\62 ;
-  font-variant-alternates: styleset(defined-for-fontB);
-}
-
-</style>
-</head>
-<body lang="en">
-<div><span id="test1">W</span> <span id="test2">W</span> <span id="test3">W</span></div>
-<div><span id="test4">W</span> <span id="test5">W</span> <span id="test6">W</span></div>
-<div><span id="test7">W</span> <span id="test8">W</span> <span id="test9">W</span></div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/annotations-ref.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>Annotations test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
-<style type="text/css">
-
-body {
-  margin: 20px;
-  font-size: 800%;
-  font-family: Hiragino Maru Gothic ProN, Meiryo;
-}
-
-/* for platforms without these fonts the default glyphs will show */
-
-@font-face {
-  font-family: testMeiryo-circled;
-  src: local(Meiryo);
-  -moz-font-feature-settings: "nalt" 4;
-}
-
-@font-face {
-  font-family: testMeiryo-black-circled;
-  src: local(Meiryo);
-  -moz-font-feature-settings: "nalt" 5;
-}
-
-@font-face {
-  font-family: testMeiryo-rounded-box;
-  src: local(Meiryo);
-  -moz-font-feature-settings: "nalt" 9;
-}
-
-@font-face {
-  font-family: testHiraginoMaru-circled;
-  src: local(HiraMaruProN-W4), local(Hiragino Maru Gothic ProN W4);
-  -moz-font-feature-settings: "nalt" 1;
-}
-
-@font-face {
-  font-family: testHiraginoMaru-black-circled;
-  src: local(HiraMaruProN-W4), local(Hiragino Maru Gothic ProN W4);
-  -moz-font-feature-settings: "nalt" 4;
-}
-
-@font-face {
-  font-family: testHiraginoMaru-rounded-box;
-  src: local(HiraMaruProN-W4), local(Hiragino Maru Gothic ProN W4);
-  -moz-font-feature-settings: "nalt" 10;
-}
-
-#test1 {
-  font-family: testHiraginoMaru-circled, testMeiryo-circled;
-}
-
-#test2 {
-  font-family: testHiraginoMaru-black-circled, testMeiryo-black-circled;
-}
-
-#test3 {
-  font-family: testHiraginoMaru-rounded-box, testMeiryo-rounded-box;
-}
-
-</style>
-
-</head>
-<body>
-<div><span id="test1">1</span> <span id="test2">2</span> <span id="test3">3</span></div>
-</body>
-</html>
\ No newline at end of file
deleted file mode 100644
--- a/layout/reftests/font-features/annotations.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<title>Annotations test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
-<style type="text/css">
-
-body {
-  margin: 20px;
-  font-size: 800%;
-  font-family: Hiragino Maru Gothic ProN, Meiryo;
-}
-
-/* for platforms without these fonts the default glyphs will show */
-
-@font-feature-values Hiragino Maru Gothic ProN {
-  @annotation { circled: 1; }
-  @annotation { black-circled: 4; }
-  @annotation { black-box: 8; }
-  @annotation { black-rounded-box: 10; }
-}
-
-@font-feature-values Meiryo {
-  @annotation { 
-    circled: 4;
-    black-circled: 5;
-    black-box: 7;
-    black-rounded-box: 9;
-  }
-}
-
-#test1 {
-  font-variant-alternates: annotation(circled);
-}
-
-#test2 {
-  font-variant-alternates: annotation(black-circled);
-}
-
-#test3 {
-  font-variant-alternates: annotation(black-rounded-box);
-}
-
-</style>
-
-</head>
-<body>
-<div><span id="test1">1</span> <span id="test2">2</span> <span id="test3">3</span></div>
-</body>
-</html>
\ No newline at end of file
deleted file mode 100644
--- a/layout/reftests/font-features/font-features-order-3.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-  -moz-font-feature-settings: "liga" on, "hlig" on;
-}
-body {
-  font-family: libertine, sans-serif;
-  font-size: 400%;
-  line-height: 2em;
-  /* font feature settings property should override font setting */
-  -moz-font-feature-settings: "liga" off, "hlig" off;
-}
-</style>
-</head>
-<body lang="en">
-fastest firefox
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-features-order-4.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-  font-feature-settings: "liga" on, "hlig" on;
-}
-body {
-  font-family: libertine, sans-serif;
-  font-size: 400%;
-  line-height: 2em;
-  /* font variant property should override font setting */
-  font-variant-ligatures: no-common-ligatures no-historical-ligatures;
-}
-</style>
-</head>
-<body lang="en">
-fastest firefox
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-features-order-5.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-  font-feature-settings: "liga" on, "hlig" on;
-}
-body {
-  font-family: libertine, sans-serif;
-  font-size: 400%;
-  line-height: 2em;
-  /* font variant property should override font setting but font feature
-     settings property should override that */
-  font-variant-ligatures: no-common-ligatures no-historical-ligatures;
-  font-feature-settings: "liga" on, "hlig" on;
-}
-</style>
-</head>
-<body lang="en">
-fastest firefox
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-kerning-1.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-}
-body {
-  margin: 10px;
-  font-family: libertine, sans-serif;
-  font-size: 600%;
-  line-height: 1.2em;
-  /* font-feature-settings should take precedence over font-kerning,
-     so kerning should be DISabled here */
-  font-feature-settings: "kern" off;
-  font-kerning: normal;
-}
-</style>
-</head>
-<body lang="en">
-<div>Ta To</div>
-<div>AVA</div>
-<div>AWAY</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-kerning-2.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-}
-body {
-  margin: 10px;
-  font-family: libertine, sans-serif;
-  font-size: 600%;
-  line-height: 1.2em;
-  /* font-feature-settings should take precedence over font-kerning,
-     so kerning should be ENabled here. */
-  font-feature-settings: "kern" on;
-  font-kerning: none;
-}
-</style>
-</head>
-<body lang="en">
-<div>Ta To</div>
-<div>AVA</div>
-<div>AWAY</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-kerning-3.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-  font-feature-settings: "kern" off;
-}
-body {
-  margin: 10px;
-  font-family: libertine, sans-serif;
-  font-size: 600%;
-  line-height: 1.2em;
-}
-</style>
-</head>
-<body lang="en">
-<div>Ta To</div>
-<div>AVA</div>
-<div>AWAY</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-kerning-auto.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-}
-body {
-  margin: 10px;
-  font-family: libertine, sans-serif;
-  font-size: 600%;
-  line-height: 1.2em;
-  font-kerning: auto;
-}
-</style>
-</head>
-<body lang="en">
-<div>Ta To</div>
-<div>AVA</div>
-<div>AWAY</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-kerning-kern.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-}
-body {
-  margin: 10px;
-  font-family: libertine, sans-serif;
-  font-size: 600%;
-  line-height: 1.2em;
-  font-feature-settings: "kern" on;
-}
-</style>
-</head>
-<body lang="en">
-<div>Ta To</div>
-<div>AVA</div>
-<div>AWAY</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-kerning-nokern.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-}
-body {
-  margin: 10px;
-  font-family: libertine, sans-serif;
-  font-size: 600%;
-  line-height: 1.2em;
-  font-feature-settings: "kern" off;
-}
-</style>
-</head>
-<body lang="en">
-<div>Ta To</div>
-<div>AVA</div>
-<div>AWAY</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-kerning-none.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-}
-body {
-  margin: 10px;
-  font-family: libertine, sans-serif;
-  font-size: 600%;
-  line-height: 1.2em;
-  font-kerning: none;
-}
-</style>
-</head>
-<body lang="en">
-<div>Ta To</div>
-<div>AVA</div>
-<div>AWAY</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-kerning-normal.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: libertine;
-  src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
-}
-body {
-  margin: 10px;
-  font-family: libertine, sans-serif;
-  font-size: 600%;
-  line-height: 1.2em;
-  font-kerning: normal;
-}
-</style>
-</head>
-<body lang="en">
-<div>Ta To</div>
-<div>AVA</div>
-<div>AWAY</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-kerning-table-none.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: gentium;
-  /* font that has an old-style 'kern' table rather than GPOS 'kern' feature */
-  src: url(../fonts/sil/GenR102.ttf);
-}
-body {
-  margin: 10px;
-  font-family: gentium;
-  font-size: 600%;
-  line-height: 1.2em;
-  font-kerning: none;
-}
-</style>
-</head>
-<body lang="en">
-<div>Ta To</div>
-<div>AVA</div>
-<div>AWAY</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-kerning-table-normal.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<style type="text/css">
-@font-face {
-  font-family: gentium;
-  src: url(../fonts/sil/GenR102.ttf);
-}
-body {
-  margin: 10px;
-  font-family: gentium;
-  font-size: 600%;
-  line-height: 1.2em;
-  font-kerning: normal;
-}
-</style>
-</head>
-<body lang="en">
-<div>Ta To</div>
-<div>AVA</div>
-<div>AWAY</div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-alternates-ref.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-alternates test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-
-<style type="text/css">
-</style>
-
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-alternates", true, false));
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-alternates.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-alternates test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-
-<style type="text/css">
-</style>
-
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-alternates", false, false));
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-caps-ref.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-caps test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-caps", true, false));
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-caps.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-caps test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-caps", false, false));
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-debug.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "all", false, true));
-</script>
-</body>
-</html>
\ No newline at end of file
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-east-asian-ref.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-east-asian test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-east-asian", true, false));
-</script>
-</body>
-</html>
\ No newline at end of file
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-east-asian.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-east-asian test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-east-asian", false, false));
-</script>
-</body>
-</html>
\ No newline at end of file
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-features.css
+++ /dev/null
@@ -1,63 +0,0 @@
-body { margin: 10px; }
-
-@font-face {
-  font-family: gsub-test;
-  src: url(../fonts/gsubtest/gsubtest-lookup3.otf);
-}
-
-td.prop {
-  font-family: Menlo, monospace;
-  font-weight: normal;
-  text-align: left;
-  font-size: 80%;
-}
-
-td.features {
-  font-family: gsub-test;
-}
-
-.invalid {
-  color: red;
-}
-
-@font-feature-values gsub-test {
-  @styleset { ok-alt-a: 1 3 5; ok-alt-b: 19; }
-  @character-variant { ok-1: 78 2; }
-  @character-variant { ok-3: 23; }
-  @character-variant { not-good: 0 2; }
-  @annotation { ok-4: 1; }
-  @annotation { bogus-font-doesnt-support: 23; }
-  @annotation { circled: 1; }
-  @character-variant { multi-def: 4; }
-  @annotation { multi-def: 3; }
-  @styleset { multi-def2: 3 4 5; }
-  @styleset { MULTI-def2: 2 6; }
-  @styleset { out-of-bounds1: 0; out-of-bounds2: 100; }
-}
-
-@font-feature-values bogus-family {
-  @styleset { bogus: 3 4 7; }
-}
-
-@font-feature-values GSUB-tEsT {
-  @styleset { mixed-case: 3 4 7; }
-}
-
-@font-feature-values gSuB-tEsT {
-  @styleset { 3blah: 1 3; }
-}
-
-@font-feature-values gSuB-tEsT {
-  @styleset { moxie: 14; }
-  @styleset { 3blah: 1; }
-}
-
-@font-feature-values gSUB-TeST {
-  @styleset { moxie2: 14; }
-  @bongo { blah: 1; }
-}
-
-@font-feature-values gSUB-TEst {
-  @bongo { blah2: 1; }
-  @styleset { moxie3: 14; }
-}
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-features.js
+++ /dev/null
@@ -1,220 +0,0 @@
-
-// data associated with gsubtest test font for testing font features
-
-// prefix
-gPrefix = "";
-
-// equivalent properties
-// setting prop: value should match the specific feature settings listed
-//
-// each of these tests evaluate whether a given feature is enabled as required
-// and also whether features that shouldn't be enabled are or not.
-var gPropertyData = [
-  // font-variant-caps
-  // valid values
-  { prop: "font-variant-caps", value: "normal", features: {"smcp": 0} },
-  { prop: "font-variant-caps", value: "small-caps", features: {"smcp": 1, "c2sc": 0} },
-  { prop: "font-variant-caps", value: "all-small-caps", features: {"smcp": 1, "c2sc": 1, "pcap": 0} },
-  { prop: "font-variant-caps", value: "petite-caps", features: {"pcap": 1, "smcp": 0} },
-  { prop: "font-variant-caps", value: "all-petite-caps", features: {"c2pc": 1, "pcap": 1, "smcp": 0} },
-  { prop: "font-variant-caps", value: "titling-caps", features: {"titl": 1, "smcp": 0} },
-  { prop: "font-variant-caps", value: "unicase", features: {"unic": 1, "titl": 0} },
-
-  // invalid values
-  { prop: "font-variant-caps", value: "normal small-caps", features: {"smcp": 0}, invalid: true },
-  { prop: "font-variant-caps", value: "small-caps potato", features: {"smcp": 0}, invalid: true },
-  { prop: "font-variant-caps", value: "small-caps petite-caps", features: {"smcp": 0, "pcap": 0}, invalid: true },
-  { prop: "font-variant-caps", value: "small-caps all-small-caps", features: {"smcp": 0, "c2sc": 0}, invalid: true },
-  { prop: "font-variant-caps", value: "small-cap", features: {"smcp": 0}, invalid: true },
-
-  // font-variant-east-asian
-  // valid values
-  { prop: "font-variant-east-asian", value: "jis78", features: {"jp78": 1, "jp04": 0} },
-  { prop: "font-variant-east-asian", value: "jis83", features: {"jp83": 1, "jp04": 0} },
-  { prop: "font-variant-east-asian", value: "jis90", features: {"jp90": 1, "jp04": 0} },
-  { prop: "font-variant-east-asian", value: "jis04", features: {"jp04": 1, "jp78": 0} },
-  { prop: "font-variant-east-asian", value: "simplified", features: {"smpl": 1, "jp04": 0} },
-  { prop: "font-variant-east-asian", value: "traditional", features: {"trad": 1, "jp04": 0} },
-  { prop: "font-variant-east-asian", value: "full-width", features: {"fwid": 1, "jp04": 0} },
-  { prop: "font-variant-east-asian", value: "proportional-width", features: {"pwid": 1, "jp04": 0} },
-  { prop: "font-variant-east-asian", value: "ruby", features: {"ruby": 1, "jp04": 0} },
-  { prop: "font-variant-east-asian", value: "jis78 full-width", features: {"jp78": 1, "fwid": 1, "jp83": 0} },
-  { prop: "font-variant-east-asian", value: "jis78 full-width ruby", features: {"jp78": 1, "fwid": 1, "jp83": 0, "ruby": 1} },
-  { prop: "font-variant-east-asian", value: "simplified proportional-width", features: {"smpl": 1, "pwid": 1, "jp83": 0} },
-  { prop: "font-variant-east-asian", value: "ruby simplified", features: {"ruby": 1, "smpl": 1, "trad": 0} },
-
-  // invalid values
-  { prop: "font-variant-east-asian", value: "ruby normal", features: {"ruby": 0}, invalid: true },
-  { prop: "font-variant-east-asian", value: "jis90 jis04", features: {"jp90": 0, "jp04": 0}, invalid: true },
-  { prop: "font-variant-east-asian", value: "simplified traditional", features: {"smpl": 0, "trad": 0}, invalid: true },
-  { prop: "font-variant-east-asian", value: "full-width proportional-width", features: {"fwid": 0, "pwid": 0}, invalid: true },
-  { prop: "font-variant-east-asian", value: "ruby simplified ruby", features: {"ruby": 0, "smpl": 0, "jp04": 0}, invalid: true },
-  { prop: "font-variant-east-asian", value: "jis78 ruby simplified", features: {"ruby": 0, "smpl": 0, "jp78": 0}, invalid: true },
-
-  // font-variant-ligatures
-  // valid values
-  { prop: "font-variant-ligatures", value: "normal", features: {"liga": 1, "dlig": 0} },
-  { prop: "font-variant-ligatures", value: "common-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0, "hlig": 0, "calt": 1} },
-  { prop: "font-variant-ligatures", value: "no-common-ligatures", features: {"liga": 0, "clig": 0, "dlig": 0, "hlig": 0, "calt": 1} },
-  { prop: "font-variant-ligatures", value: "discretionary-ligatures", features: {"liga": 1, "clig": 1, "dlig": 1, "hlig": 0, "calt": 1} },
-  { prop: "font-variant-ligatures", value: "no-discretionary-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0, "hlig": 0, "calt": 1} },
-  { prop: "font-variant-ligatures", value: "historical-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0, "hlig": 1, "calt": 1} },
-  { prop: "font-variant-ligatures", value: "no-historical-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0, "hlig": 0, "calt": 1} },
-  { prop: "font-variant-ligatures", value: "contextual", features: {"liga": 1, "clig": 1, "dlig": 0, "hlig": 0, "calt": 1} },
-  { prop: "font-variant-ligatures", value: "no-contextual", features: {"liga": 1, "clig": 1, "dlig": 0, "hlig": 0, "calt": 0} },
-  { prop: "font-variant-ligatures", value: "common-ligatures no-discretionary-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0, "hlig": 0, "calt": 1} },
-  { prop: "font-variant-ligatures", value: "historical-ligatures no-common-ligatures", features: {"clig": 0, "liga": 0, "dlig": 0, "hlig": 1, "calt": 1} },
-  { prop: "font-variant-ligatures", value: "no-historical-ligatures discretionary-ligatures", features: {"liga": 1, "clig": 1, "dlig": 1, "hlig": 0, "calt": 1} },
-  { prop: "font-variant-ligatures", value: "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual", features: {"clig": 1, "dlig": 0, "hlig": 1, "liga": 1, "calt": 0} },
-
-  // invalid values
-  { prop: "font-variant-ligatures", value: "common-ligatures normal", features: {"liga": 1, "clig": 1, "dlig": 0}, invalid: true },
-  { prop: "font-variant-ligatures", value: "common-ligatures no-common-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0}, invalid: true },
-  { prop: "font-variant-ligatures", value: "common-ligatures common-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0}, invalid: true },
-  { prop: "font-variant-ligatures", value: "no-historical-ligatures historical-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0, "hlig": 0}, invalid: true },
-  { prop: "font-variant-ligatures", value: "no-contextual contextual", features: {"liga": 1, "clig": 1, "dlig": 0, "hlig": 0}, invalid: true },
-  { prop: "font-variant-ligatures", value: "no-discretionary-ligatures discretionary-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0}, invalid: true },
-  { prop: "font-variant-ligatures", value: "common-ligatures no-discretionary-ligatures no-common-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0}, invalid: true },
-
-  // font-variant-numeric
-  // valid values
-  { prop: "font-variant-numeric", value: "normal", features: {"lnum": 0, "tnum": 0, "pnum": 0, "onum": 0} },
-  { prop: "font-variant-numeric", value: "lining-nums", features: {"lnum": 1, "onum": 0, "pnum": 0} },
-  { prop: "font-variant-numeric", value: "oldstyle-nums", features: {"lnum": 0, "onum": 1, "pnum": 0} },
-  { prop: "font-variant-numeric", value: "proportional-nums", features: {"lnum": 0, "onum": 0, "pnum": 1, "tnum": 0} },
-  { prop: "font-variant-numeric", value: "proportional-nums oldstyle-nums", features: {"lnum": 0, "onum": 1, "pnum": 1, "tnum": 0} },
-  { prop: "font-variant-numeric", value: "tabular-nums", features: {"tnum": 1, "onum": 0, "pnum": 0} },
-  { prop: "font-variant-numeric", value: "diagonal-fractions", features: {"frac": 1, "afrc": 0, "pnum": 0} },
-  { prop: "font-variant-numeric", value: "stacked-fractions", features: {"frac": 0, "afrc": 1, "pnum": 0} },
-  { prop: "font-variant-numeric", value: "slashed-zero", features: {"zero": 1, "pnum": 0} },
-  { prop: "font-variant-numeric", value: "ordinal", features: {"ordn": 1, "pnum": 0} },
-  { prop: "font-variant-numeric", value: "lining-nums diagonal-fractions", features: {"frac": 1, "afrc": 0, "lnum": 1} },
-  { prop: "font-variant-numeric", value: "tabular-nums stacked-fractions", features: {"frac": 0, "afrc": 1, "tnum": 1} },
-  { prop: "font-variant-numeric", value: "tabular-nums slashed-zero stacked-fractions", features: {"frac": 0, "afrc": 1, "tnum": 1, "zero": 1} },
-  { prop: "font-variant-numeric", value: "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal", features: {"frac": 1, "afrc": 0, "tnum": 0, "pnum": 1, "onum": 1, "ordn": 1, "zero": 1} },
-
-  // invalid values
-  { prop: "font-variant-numeric", value: "lining-nums normal", features: {"lnum": 0, "onum": 0}, invalid: true },
-  { prop: "font-variant-numeric", value: "lining-nums oldstyle-nums", features: {"lnum": 0, "onum": 0}, invalid: true },
-  { prop: "font-variant-numeric", value: "lining-nums normal slashed-zero ordinal", features: {"lnum": 0, "onum": 0, "zero": 0}, invalid: true },
-  { prop: "font-variant-numeric", value: "proportional-nums tabular-nums", features: {"pnum": 0, "tnum": 0}, invalid: true },
-  { prop: "font-variant-numeric", value: "diagonal-fractions stacked-fractions", features: {"frac": 0, "afrc": 0}, invalid: true },
-  { prop: "font-variant-numeric", value: "slashed-zero diagonal-fractions slashed-zero", features: {"frac": 0, "afrc": 0, "zero": 0}, invalid: true },
-  { prop: "font-variant-numeric", value: "lining-nums slashed-zero diagonal-fractions oldstyle-nums", features: {"frac": 0, "afrc": 0, "zero": 0, "onum": 0}, invalid: true },
-
-  // font-variant-position
-  // valid values
-  { prop: "font-variant-position", value: "normal", features: {"subs": 0, "sups": 0} },
-  { prop: "font-variant-position", value: "super", features: {"subs": 0, "sups": 1} },
-  { prop: "font-variant-position", value: "sub", features: {"subs": 1, "sups": 0} },
-
-  // invalid values
-  { prop: "font-variant-position", value: "super sub", features: {"subs": 0, "sups": 0}, invalid: true },
-];
-
-// note: the code below requires an array "gFeatures" from :
-//   layout/reftests/fonts/gsubtest/gsubtest-features.js
-
-// The font defines feature lookups for all OpenType features for a
-// specific set of PUA codepoints, as listed in the gFeatures array.
-// Using these codepoints and feature combinations, tests can be
-// constructed to detect when certain features are enabled or not.
-
-// return a created table containing tests for a given property
-//
-// Ex: { prop: "font-variant-ligatures", value: "common-ligatures", features: {"liga": 1, "clig": 1, "dlig": 0, "hlig": 0} }
-//
-// This means that for the property 'font-variant-ligatures' with the value 'common-ligatures', the features listed should
-// either be explicitly enabled or disabled.
-
-// propData is the prop/value list with corresponding feature assertions
-// whichProp is either "all" or a specific subproperty (i.e. "font-variant-position")
-// isRef is true when this is the reference
-// debug outputs the prop/value pair along with the tests
-
-function createFeatureTestTable(propData, whichProp, isRef, debug)
-{
-  var table = document.createElement("table");
-
-  if (typeof(isRef) == "undefined") {
-    isRef = false;
-  }
-
-  if (typeof(debug) == "undefined") {
-    debug = false;
-  }
-
-  var doAll = (whichProp == "all");
-  for (var i in propData) {
-    var data = propData[i];
-
-    if (!doAll && data.prop != whichProp) continue;
-
-    var row = document.createElement("tr");
-    var invalid = false;
-    if ("invalid" in data) {
-      invalid = true;
-      row.className = "invalid";
-    }
-
-    var cell = document.createElement("td");
-    cell.className = "prop";
-    var styledecl = gPrefix + data.prop + ": " + data.value + ";";
-    cell.innerHTML = styledecl;
-    row.appendChild(cell);
-    if (debug) {
-      table.appendChild(row);
-    }
-
-    row = document.createElement("tr");
-    if (invalid) {
-      row.className = "invalid";
-    }
-
-    cell = document.createElement("td");
-    cell.className = "features";
-    if (!isRef) {
-      cell.style.cssText = styledecl;
-    }
-
-    for (var f in data.features) {
-      var feature = data.features[f];
-
-      var cp, unsupported = "F".charCodeAt(0);
-      var basecp = gFeatures[f];
-
-      if (typeof(basecp) == "undefined") {
-        cp = unsupported;
-      } else {
-        switch(feature) {
-        case 0:
-          cp = basecp;
-          break;
-        case 1:
-          cp = basecp + 1;
-          break;
-        case 2:
-          cp = basecp + 2;
-          break;
-        case 3:
-          cp = basecp + 3;
-          break;
-        default:
-          cp = basecp + 1;
-          break;
-        }
-      }
-
-      var span = document.createElement("span");
-      span.innerHTML = (isRef ? "P " : "&#x" + cp.toString(16) + "; ");
-      span.title = f + "=" + feature;
-      cell.appendChild(span);
-    }
-    row.appendChild(cell);
-    table.appendChild(row);
-  }
-
-  return table;
-}
-
-
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-ligatures-ref.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-ligatures test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-ligatures", true, false));
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-ligatures.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-ligatures test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-ligatures", false, false));
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-numeric-ref.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-numeric test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-numeric", true, false));
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-numeric.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-numeric test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-numeric", false, false));
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-position-ref.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-position test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-position", true, false));
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/font-features/font-variant-position.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
-<title>font-variant-position test</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
-<script type="text/javascript" src="font-variant-features.js"></script>
-<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
-</head>
-<body>
-<div id="content"></div>
-<script type="text/javascript">
-  document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-position", false, false));
-</script>
-</body>
-</html>
--- a/layout/reftests/font-features/reftest.list
+++ b/layout/reftests/font-features/reftest.list
@@ -46,48 +46,16 @@ HTTP(..) == font-features-turkish-overri
 HTTP(..) == font-features-turkish-override-3.html font-features-ref.html
 HTTP(..) == font-features-turkish-override-4.html font-features-ref.html
 skip-if(B2G) HTTP(..) == font-features-turkish-override-5.html font-features-turkish.html # bug 773482
 
 # check that last value wins if a feature is repeated
 HTTP(..) == font-features-order-1.html font-features-ref.html
 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
-
-# check priority involving feature settings and font-variant-alternates
-pref(layout.css.font-features.enabled,true) 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
-
-# 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
-
-# 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
-
 # sanity check for kerning - with no spaces, kerning should occur
 HTTP(..) == kerning-sanity-check-kern.html kerning-sanity-check-default.html
 HTTP(..) != kerning-sanity-check-nokern.html kerning-sanity-check-default.html
 
 # OpenType features should work across inter-word spaces
 HTTP(..) == font-features-across-space-1.html font-features-across-space-1-ref.html
 # requires Japanese font with feature support, WinXP lacks one
 random-if(!winWidget&&!cocoaWidget) fails-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) HTTP(..) == fwid-spaces.html fwid-spaces-ref.html
--- a/layout/style/Declaration.cpp
+++ b/layout/style/Declaration.cpp
@@ -532,78 +532,44 @@ Declaration::GetValue(nsCSSProperty aPro
       const nsCSSValue &stretch =
         *data->ValueFor(eCSSProperty_font_stretch);
       const nsCSSValue &sizeAdjust =
         *data->ValueFor(eCSSProperty_font_size_adjust);
       const nsCSSValue &featureSettings =
         *data->ValueFor(eCSSProperty_font_feature_settings);
       const nsCSSValue &languageOverride =
         *data->ValueFor(eCSSProperty_font_language_override);
-      const nsCSSValue &fontKerning =
-        *data->ValueFor(eCSSProperty_font_kerning);
-      const nsCSSValue &fontSynthesis =
-        *data->ValueFor(eCSSProperty_font_synthesis);
-      const nsCSSValue &fontVariantAlternates =
-        *data->ValueFor(eCSSProperty_font_variant_alternates);
-      const nsCSSValue &fontVariantCaps =
-        *data->ValueFor(eCSSProperty_font_variant_caps);
-      const nsCSSValue &fontVariantEastAsian =
-        *data->ValueFor(eCSSProperty_font_variant_east_asian);
-      const nsCSSValue &fontVariantLigatures =
-        *data->ValueFor(eCSSProperty_font_variant_ligatures);
-      const nsCSSValue &fontVariantNumeric =
-        *data->ValueFor(eCSSProperty_font_variant_numeric);
-      const nsCSSValue &fontVariantPosition =
-        *data->ValueFor(eCSSProperty_font_variant_position);
 
       if (systemFont &&
           systemFont->GetUnit() != eCSSUnit_None &&
           systemFont->GetUnit() != eCSSUnit_Null) {
         if (style.GetUnit() != eCSSUnit_System_Font ||
             variant.GetUnit() != eCSSUnit_System_Font ||
             weight.GetUnit() != eCSSUnit_System_Font ||
             size.GetUnit() != eCSSUnit_System_Font ||
             lh.GetUnit() != eCSSUnit_System_Font ||
             family.GetUnit() != eCSSUnit_System_Font ||
             stretch.GetUnit() != eCSSUnit_System_Font ||
             sizeAdjust.GetUnit() != eCSSUnit_System_Font ||
             featureSettings.GetUnit() != eCSSUnit_System_Font ||
-            languageOverride.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) {
+            languageOverride.GetUnit() != eCSSUnit_System_Font) {
           // This can't be represented as a shorthand.
           return;
         }
         systemFont->AppendToString(eCSSProperty__x_system_font, aValue);
       } else {
         // The font-stretch, font-size-adjust,
-        // -moz-font-feature-settings, -moz-font-language-override
-        // along with kerning, synthesis and other font-variant
-        // subproperties are reset by this shorthand property to their
+        // -moz-font-feature-settings, and -moz-font-language-override
+        // properties are reset by this shorthand property to their
         // initial values, but can't be represented in its syntax.
         if (stretch.GetUnit() != eCSSUnit_Enumerated ||
             stretch.GetIntValue() != NS_STYLE_FONT_STRETCH_NORMAL ||
             sizeAdjust.GetUnit() != eCSSUnit_None ||
             featureSettings.GetUnit() != eCSSUnit_Normal ||
-            languageOverride.GetUnit() != eCSSUnit_Normal ||
-            fontKerning.GetIntValue() != NS_FONT_KERNING_AUTO ||
-            fontSynthesis.GetIntValue() !=
-              (NS_FONT_SYNTHESIS_WEIGHT | NS_FONT_SYNTHESIS_STYLE) ||
-            fontVariantAlternates.GetUnit() != eCSSUnit_Normal ||
-            fontVariantCaps.GetUnit() != eCSSUnit_Normal ||
-            fontVariantEastAsian.GetUnit() != eCSSUnit_Normal ||
-            fontVariantLigatures.GetUnit() != eCSSUnit_Normal ||
-            fontVariantNumeric.GetUnit() != eCSSUnit_Normal ||
-            fontVariantPosition.GetUnit() != eCSSUnit_Normal) {
+            languageOverride.GetUnit() != eCSSUnit_Normal) {
           return;
         }
 
         if (style.GetUnit() != eCSSUnit_Enumerated ||
             style.GetIntValue() != NS_FONT_STYLE_NORMAL) {
           style.AppendToString(eCSSProperty_font_style, aValue);
           aValue.Append(PRUnichar(' '));
         }
--- a/layout/style/Rule.h
+++ b/layout/style/Rule.h
@@ -60,18 +60,17 @@ public:
     NAMESPACE_RULE,
     STYLE_RULE,
     MEDIA_RULE,
     FONT_FACE_RULE,
     PAGE_RULE,
     KEYFRAME_RULE,
     KEYFRAMES_RULE,
     DOCUMENT_RULE,
-    SUPPORTS_RULE,
-    FONT_FEATURE_VALUES_RULE
+    SUPPORTS_RULE
   };
 
   virtual int32_t GetType() const = 0;
 
   nsCSSStyleSheet* GetStyleSheet() const;
   nsHTMLCSSStyleSheet* GetHTMLCSSStyleSheet() const;
 
   // Return the document the rule lives in, if any
--- a/layout/style/nsCSSFontDescList.h
+++ b/layout/style/nsCSSFontDescList.h
@@ -4,13 +4,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 CSS_FONT_DESC(font-family, Family)
 CSS_FONT_DESC(font-style, Style)
 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)
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -158,24 +158,21 @@ CSS_KEY(-moz-workspace, _moz_workspace)
 CSS_KEY(-moz-zoom-in, _moz_zoom_in)
 CSS_KEY(-moz-zoom-out, _moz_zoom_out)
 CSS_KEY(absolute, absolute)
 CSS_KEY(active, active)
 CSS_KEY(activeborder, activeborder)
 CSS_KEY(activecaption, activecaption)
 CSS_KEY(alias, alias)
 CSS_KEY(all, all)
-CSS_KEY(all-petite-caps, all_petite_caps)
 CSS_KEY(all-scroll, all_scroll)
-CSS_KEY(all-small-caps, all_small_caps)
 CSS_KEY(alpha, alpha)
 CSS_KEY(alternate, alternate)
 CSS_KEY(alternate-reverse, alternate_reverse)
 CSS_KEY(always, always)
-CSS_KEY(annotation, annotation)
 CSS_KEY(appworkspace, appworkspace)
 CSS_KEY(armenian, armenian)
 CSS_KEY(auto, auto)
 CSS_KEY(avoid, avoid)
 CSS_KEY(background, background)
 CSS_KEY(backwards, backwards)
 CSS_KEY(balance, balance)
 CSS_KEY(baseline, baseline)
@@ -198,51 +195,46 @@ CSS_KEY(buttonhighlight, buttonhighlight
 CSS_KEY(buttonshadow, buttonshadow)
 CSS_KEY(buttontext, buttontext)
 CSS_KEY(capitalize, capitalize)
 CSS_KEY(caption, caption)
 CSS_KEY(captiontext, captiontext)
 CSS_KEY(cell, cell)
 CSS_KEY(center, center)
 CSS_KEY(ch, ch)
-CSS_KEY(character-variant, character_variant)
 CSS_KEY(circle, circle)
 CSS_KEY(cjk-ideographic, cjk_ideographic)
 CSS_KEY(clip, clip)
 CSS_KEY(close-quote, close_quote)
 CSS_KEY(closest-corner, closest_corner)
 CSS_KEY(closest-side, closest_side)
 CSS_KEY(cm, cm)
 CSS_KEY(col-resize, col_resize)
 CSS_KEY(collapse, collapse)
-CSS_KEY(common-ligatures, common_ligatures)
 CSS_KEY(column, column)
 CSS_KEY(column-reverse, column_reverse)
 CSS_KEY(condensed, condensed)
 CSS_KEY(contain, contain)
 CSS_KEY(content-box, content_box)
 CSS_KEY(context-menu, context_menu)
 CSS_KEY(continuous, continuous)
 CSS_KEY(copy, copy)
-CSS_KEY(contextual, contextual)
 CSS_KEY(cover, cover)
 CSS_KEY(crop, crop)
 CSS_KEY(cross, cross)
 CSS_KEY(crosshair, crosshair)
 CSS_KEY(currentcolor, currentcolor)
 CSS_KEY(dashed, dashed)
 CSS_KEY(decimal, decimal)
 CSS_KEY(decimal-leading-zero, decimal_leading_zero)
 CSS_KEY(default, default)
 CSS_KEY(deg, deg)
-CSS_KEY(diagonal-fractions, diagonal_fractions)
 CSS_KEY(dialog, dialog)
 CSS_KEY(disabled, disabled)
 CSS_KEY(disc, disc)
-CSS_KEY(discretionary-ligatures, discretionary_ligatures)
 CSS_KEY(dotted, dotted)
 CSS_KEY(double, double)
 CSS_KEY(e-resize, e_resize)
 CSS_KEY(each-box, each_box)
 CSS_KEY(ease, ease)
 CSS_KEY(ease-in, ease_in)
 CSS_KEY(ease-in-out, ease_in_out)
 CSS_KEY(ease-out, ease_out)
@@ -276,18 +268,16 @@ CSS_KEY(groove, groove)
 CSS_KEY(hebrew, hebrew)
 CSS_KEY(help, help)
 CSS_KEY(hidden, hidden)
 CSS_KEY(hide, hide)
 CSS_KEY(highlight, highlight)
 CSS_KEY(highlighttext, highlighttext)
 CSS_KEY(hiragana, hiragana)
 CSS_KEY(hiragana-iroha, hiragana_iroha)
-CSS_KEY(historical-forms, historical_forms)
-CSS_KEY(historical-ligatures, historical_ligatures)
 CSS_KEY(horizontal, horizontal)
 CSS_KEY(hz, hz)
 CSS_KEY(icon, icon)
 CSS_KEY(ignore, ignore)
 CSS_KEY(in, in)
 CSS_KEY(interlace, interlace)
 CSS_KEY(inactive, inactive)
 CSS_KEY(inactiveborder, inactiveborder)
@@ -302,33 +292,28 @@ CSS_KEY(inline, inline)
 CSS_KEY(inline-axis, inline_axis)
 CSS_KEY(inline-block, inline_block)
 CSS_KEY(inline-flex, inline_flex)
 CSS_KEY(inline-table, inline_table)
 CSS_KEY(inset, inset)
 CSS_KEY(inside, inside)
 CSS_KEY(interpolatematrix, interpolatematrix)
 CSS_KEY(italic, italic)
-CSS_KEY(jis78, jis78)
-CSS_KEY(jis83, jis83)
-CSS_KEY(jis90, jis90)
-CSS_KEY(jis04, jis04)
 CSS_KEY(justify, justify)
 CSS_KEY(katakana, katakana)
 CSS_KEY(katakana-iroha, katakana_iroha)
 CSS_KEY(keep-all, keep_all)
 CSS_KEY(khz, khz)
 CSS_KEY(landscape, landscape)
 CSS_KEY(large, large)
 CSS_KEY(larger, larger)
 CSS_KEY(left, left)
 CSS_KEY(lighter, lighter)
 CSS_KEY(line-through, line_through)
 CSS_KEY(linear, linear)
-CSS_KEY(lining-nums, lining_nums)
 CSS_KEY(list-item, list_item)
 CSS_KEY(logical, logical)
 CSS_KEY(lower-alpha, lower_alpha)
 CSS_KEY(lower-greek, lower_greek)
 CSS_KEY(lower-latin, lower_latin)
 CSS_KEY(lower-roman, lower_roman)
 CSS_KEY(lowercase, lowercase)
 CSS_KEY(ltr, ltr)
@@ -347,55 +332,45 @@ CSS_KEY(mix, mix)
 CSS_KEY(mm, mm)
 CSS_KEY(move, move)
 CSS_KEY(ms, ms)
 CSS_KEY(n-resize, n_resize)
 CSS_KEY(narrower, narrower)
 CSS_KEY(ne-resize, ne_resize)
 CSS_KEY(nesw-resize, nesw_resize)
 CSS_KEY(no-close-quote, no_close_quote)
-CSS_KEY(no-common-ligatures, no_common_ligatures)
-CSS_KEY(no-contextual, no_contextual)
-CSS_KEY(no-discretionary-ligatures, no_discretionary_ligatures)
 CSS_KEY(no-drop, no_drop)
-CSS_KEY(no-historical-ligatures, no_historical_ligatures)
 CSS_KEY(no-open-quote, no_open_quote)
 CSS_KEY(no-repeat, no_repeat)
 CSS_KEY(none, none)
 CSS_KEY(normal, normal)
 CSS_KEY(not-allowed, not_allowed)
 CSS_KEY(nowrap, nowrap)
 CSS_KEY(ns-resize, ns_resize)
 CSS_KEY(nw-resize, nw_resize)
 CSS_KEY(nwse-resize, nwse_resize)
 CSS_KEY(oblique, oblique)
-CSS_KEY(oldstyle-nums, oldstyle_nums)
 CSS_KEY(open-quote, open_quote)
-CSS_KEY(ordinal, ordinal)
-CSS_KEY(ornaments, ornaments)
 CSS_KEY(outset, outset)
 CSS_KEY(outside, outside)
 CSS_KEY(overline, overline)
 CSS_KEY(padding-box, padding_box)
 CSS_KEY(painted, painted)
 CSS_KEY(paused, paused)
 CSS_KEY(pc, pc)
 CSS_KEY(perspective, perspective)
-CSS_KEY(petite-caps, petite_caps)
 CSS_KEY(physical, physical)
 CSS_KEY(pointer, pointer)
 CSS_KEY(portrait, portrait)
 CSS_KEY(pre, pre)
 CSS_KEY(pre-wrap, pre_wrap)
 CSS_KEY(pre-line, pre_line)
 CSS_KEY(preserve-3d, preserve_3d)
 CSS_KEY(progress, progress)
 CSS_KEY(progressive, progressive)
-CSS_KEY(proportional-nums, proportional_nums)
-CSS_KEY(proportional-width, proportional_width)
 CSS_KEY(pt, pt)
 CSS_KEY(px, px)
 CSS_KEY(rad, rad)
 CSS_KEY(read-only, read_only)
 CSS_KEY(read-write, read_write)
 CSS_KEY(relative, relative)
 CSS_KEY(repeat, repeat)
 CSS_KEY(repeat-x, repeat_x)
@@ -408,17 +383,16 @@ CSS_KEY(rotate3d, rotate3d)
 CSS_KEY(rotatex, rotatex)
 CSS_KEY(rotatey, rotatey)
 CSS_KEY(rotatez, rotatez)
 CSS_KEY(round, round)
 CSS_KEY(row, row)
 CSS_KEY(row-resize, row_resize)
 CSS_KEY(row-reverse, row_reverse)
 CSS_KEY(rtl, rtl)
-CSS_KEY(ruby, ruby)
 CSS_KEY(running, running)
 CSS_KEY(s, s)
 CSS_KEY(s-resize, s_resize)
 CSS_KEY(scale, scale)
 CSS_KEY(scale3d, scale3d)
 CSS_KEY(scalex, scalex)
 CSS_KEY(scaley, scaley)
 CSS_KEY(scalez, scalez)
@@ -430,96 +404,84 @@ CSS_KEY(select-after, select_after)
 CSS_KEY(select-all, select_all)
 CSS_KEY(select-before, select_before)
 CSS_KEY(select-menu, select_menu)
 CSS_KEY(select-same, select_same)
 CSS_KEY(semi-condensed, semi_condensed)
 CSS_KEY(semi-expanded, semi_expanded)
 CSS_KEY(separate, separate)
 CSS_KEY(show, show)
-CSS_KEY(simplified, simplified)
 CSS_KEY(skew, skew)
 CSS_KEY(skewx, skewx)
 CSS_KEY(skewy, skewy)
-CSS_KEY(slashed-zero, slashed_zero)
 CSS_KEY(small, small)
 CSS_KEY(small-caps, small_caps)
 CSS_KEY(small-caption, small_caption)
 CSS_KEY(smaller, smaller)
 CSS_KEY(soft, soft)
 CSS_KEY(solid, solid)
 CSS_KEY(space-around, space_around)
 CSS_KEY(space-between, space_between)
 CSS_KEY(square, square)
-CSS_KEY(stacked-fractions, stacked_fractions)
 CSS_KEY(start, start)
 CSS_KEY(static, static)
 CSS_KEY(status-bar, status_bar)
 CSS_KEY(step-end, step_end)
 CSS_KEY(step-start, step_start)
 CSS_KEY(stretch, stretch)
 CSS_KEY(stretch-to-fit, stretch_to_fit)
 CSS_KEY(stroke, stroke)
-CSS_KEY(style, style)
-CSS_KEY(styleset, styleset)
-CSS_KEY(stylistic, stylistic)
 CSS_KEY(sub, sub)
 CSS_KEY(super, super)
 CSS_KEY(sw-resize, sw_resize)
-CSS_KEY(swash, swash)
 CSS_KEY(table, table)
 CSS_KEY(table-caption, table_caption)
 CSS_KEY(table-cell, table_cell)
 CSS_KEY(table-column, table_column)
 CSS_KEY(table-column-group, table_column_group)
 CSS_KEY(table-footer-group, table_footer_group)
 CSS_KEY(table-header-group, table_header_group)
 CSS_KEY(table-row, table_row)
 CSS_KEY(table-row-group, table_row_group)
-CSS_KEY(tabular-nums, tabular_nums)
 CSS_KEY(text, text)
 CSS_KEY(text-bottom, text_bottom)
 CSS_KEY(text-top, text_top)
 CSS_KEY(thick, thick)
 CSS_KEY(thin, thin)
 CSS_KEY(threeddarkshadow, threeddarkshadow)
 CSS_KEY(threedface, threedface)
 CSS_KEY(threedhighlight, threedhighlight)
 CSS_KEY(threedlightshadow, threedlightshadow)
 CSS_KEY(threedshadow, threedshadow)
-CSS_KEY(titling-caps, titling_caps)
 CSS_KEY(toggle, toggle)
 CSS_KEY(top, top)
 CSS_KEY(top-outside, top_outside)
-CSS_KEY(traditional, traditional)
 CSS_KEY(translate, translate)
 CSS_KEY(translate3d, translate3d)
 CSS_KEY(translatex, translatex)
 CSS_KEY(translatey, translatey)
 CSS_KEY(translatez, translatez)
 CSS_KEY(transparent, transparent) // for nsComputedDOMStyle only
 CSS_KEY(tri-state, tri_state)
 CSS_KEY(ultra-condensed, ultra_condensed)
 CSS_KEY(ultra-expanded, ultra_expanded)
 CSS_KEY(underline, underline)
-CSS_KEY(unicase, unicase)
 CSS_KEY(upper-alpha, upper_alpha)
 CSS_KEY(upper-latin, upper_latin)
 CSS_KEY(upper-roman, upper_roman)
 CSS_KEY(uppercase, uppercase)
 CSS_KEY(vertical, vertical)
 CSS_KEY(vertical-text, vertical_text)
 CSS_KEY(visible, visible)
 CSS_KEY(visiblefill, visiblefill)
 CSS_KEY(visiblepainted, visiblepainted)
 CSS_KEY(visiblestroke, visiblestroke)
 CSS_KEY(w-resize, w_resize)
 CSS_KEY(wait, wait)
 CSS_KEY(wavy, wavy)
-CSS_KEY(weight, weight)
 CSS_KEY(wider, wider)
 CSS_KEY(window, window)
 CSS_KEY(windowframe, windowframe)
 CSS_KEY(windowtext, windowtext)
 CSS_KEY(write-only, write_only)
 CSS_KEY(x-large, x_large)
 CSS_KEY(x-small, x_small)
 CSS_KEY(xx-large, xx_large)
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -370,19 +370,16 @@ protected:
   bool ParseMediaRule(RuleAppendFunc aAppendFunc, void* aProcessData);
   bool ParseMozDocumentRule(RuleAppendFunc aAppendFunc, void* aProcessData);
   bool ParseNameSpaceRule(RuleAppendFunc aAppendFunc, void* aProcessData);
   void ProcessNameSpace(const nsString& aPrefix,
                         const nsString& aURLSpec, RuleAppendFunc aAppendFunc,
                         void* aProcessData);
 
   bool ParseFontFaceRule(RuleAppendFunc aAppendFunc, void* aProcessData);
-  bool ParseFontFeatureValuesRule(RuleAppendFunc aAppendFunc,
-                                  void* aProcessData);
-  bool ParseFontFeatureValueSet(nsCSSFontFeatureValuesRule *aRule);
   bool ParseFontDescriptor(nsCSSFontFaceRule* aRule);
   bool ParseFontDescriptorValue(nsCSSFontDesc aDescID,
                                 nsCSSValue& aValue);
 
   bool ParsePageRule(RuleAppendFunc aAppendFunc, void* aProcessData);
   bool ParseKeyframesRule(RuleAppendFunc aAppendFunc, void* aProcessData);
   already_AddRefed<nsCSSKeyframeRule> ParseKeyframeRule();
   bool ParseKeyframeSelectorList(InfallibleTArray<float>& aSelectorList);
@@ -560,24 +557,16 @@ protected:
 
   // for 'clip' and '-moz-image-region'
   bool ParseRect(nsCSSProperty aPropID);
   bool ParseColumns();
   bool ParseContent();
   bool ParseCounterData(nsCSSProperty aPropID);
   bool ParseCursor();
   bool ParseFont();
-  bool ParseFontSynthesis(nsCSSValue& aValue);
-  bool ParseSingleAlternate(int32_t& aWhichFeature, nsCSSValue& aValue);
-  bool ParseFontVariantAlternates(nsCSSValue& aValue);
-  bool ParseBitmaskValues(nsCSSValue& aValue, const int32_t aKeywordTable[],
-                          const int32_t aMasks[]);
-  bool ParseFontVariantEastAsian(nsCSSValue& aValue);
-  bool ParseFontVariantLigatures(nsCSSValue& aValue);
-  bool ParseFontVariantNumeric(nsCSSValue& aValue);
   bool ParseFontWeight(nsCSSValue& aValue);
   bool ParseOneFamily(nsAString& aFamily, bool& aOneKeyword);
   bool ParseFamily(nsCSSValue& aValue);
   bool ParseFontFeatureSettings(nsCSSValue& aValue);
   bool ParseFontSrc(nsCSSValue& aValue);
   bool ParseFontSrcFormat(InfallibleTArray<nsCSSValue>& values);
   bool ParseFontRanges(nsCSSValue& aValue);
   bool ParseListStyle();
@@ -671,23 +660,22 @@ protected:
   }
   bool IsParsingCompoundProperty(void) const {
     return mParsingCompoundProperty;
   }
 
   /* Functions for transform Parsing */
   bool ParseSingleTransform(bool aIsPrefixed, nsCSSValue& aValue, bool& aIs3D);
   bool ParseFunction(const nsString &aFunction, const int32_t aAllowedTypes[],
-                     int32_t aVariantMaskAll, uint16_t aMinElems,
-                     uint16_t aMaxElems, nsCSSValue &aValue);
+                       uint16_t aMinElems, uint16_t aMaxElems,
+                       nsCSSValue &aValue);
   bool ParseFunctionInternals(const int32_t aVariantMask[],
-                              int32_t aVariantMaskAll,
-                              uint16_t aMinElems,
-                              uint16_t aMaxElems,
-                              InfallibleTArray<nsCSSValue>& aOutput);
+                                uint16_t aMinElems,
+                                uint16_t aMaxElems,
+                                InfallibleTArray<nsCSSValue>& aOutput);
 
   /* Functions for transform-origin/perspective-origin Parsing */
   bool ParseTransformOrigin(bool aPerspective);
 
   /* Find and return the namespace ID associated with aPrefix.
      If aPrefix has not been declared in an @namespace rule, returns
      kNameSpaceID_Unknown. */
   int32_t GetNamespaceIdForPrefix(const nsString& aPrefix);
@@ -1633,21 +1621,16 @@ CSSParserImpl::ParseAtRule(RuleAppendFun
   } else if (mToken.mIdent.LowerCaseEqualsLiteral("-moz-document")) {
     parseFunc = &CSSParserImpl::ParseMozDocumentRule;
     newSection = eCSSSection_General;
 
   } else if (mToken.mIdent.LowerCaseEqualsLiteral("font-face")) {
     parseFunc = &CSSParserImpl::ParseFontFaceRule;
     newSection = eCSSSection_General;
 
-  } else if (mToken.mIdent.LowerCaseEqualsLiteral("font-feature-values") &&
-             nsCSSFontFeatureValuesRule::PrefEnabled()) {
-    parseFunc = &CSSParserImpl::ParseFontFeatureValuesRule;
-    newSection = eCSSSection_General;
-
   } else if (mToken.mIdent.LowerCaseEqualsLiteral("page")) {
     parseFunc = &CSSParserImpl::ParsePageRule;
     newSection = eCSSSection_General;
 
   } else if ((nsCSSProps::IsEnabled(eCSSPropertyAlias_MozAnimation) &&
               mToken.mIdent.LowerCaseEqualsLiteral("-moz-keyframes")) ||
              mToken.mIdent.LowerCaseEqualsLiteral("keyframes")) {
     parseFunc = &CSSParserImpl::ParseKeyframesRule;
@@ -2363,243 +2346,16 @@ CSSParserImpl::ParseFontDescriptor(nsCSS
 
   if (!ExpectEndProperty())
     return false;
 
   aRule->SetDesc(descID, value);
   return true;
 }
 
-// @font-feature-values <font-family># {
-//   @<feature-type> {
-//     <feature-ident> : <feature-index>+;
-//     <feature-ident> : <feature-index>+;
-//     ...
-//   }
-//   ...
-// }
-
-bool
-CSSParserImpl::ParseFontFeatureValuesRule(RuleAppendFunc aAppendFunc,
-                                          void* aData)
-{
-  nsRefPtr<nsCSSFontFeatureValuesRule>
-               valuesRule(new nsCSSFontFeatureValuesRule());
-
-  // parse family list
-  nsCSSValue familyValue;
-
-  if (!ParseFamily(familyValue) ||
-      familyValue.GetUnit() != eCSSUnit_Families)
-  {
-    REPORT_UNEXPECTED_TOKEN(PEFFVNoFamily);
-    return false;
-  }
-
-  // add family to rule
-  nsAutoString familyList;
-  bool hasGeneric;
-  familyValue.GetStringValue(familyList);
-  valuesRule->SetFamilyList(familyList, hasGeneric);
-
-  // family list has generic ==> parse error
-  if (hasGeneric) {
-    REPORT_UNEXPECTED_TOKEN(PEFFVGenericInFamilyList);
-    return false;
-  }
-
-  // open brace
-  if (!ExpectSymbol('{', true)) {
-    REPORT_UNEXPECTED_TOKEN(PEFFVBlockStart);
-    return false;
-  }
-
-  // list of sets of feature values, each set bound to a specific
-  // feature-type (e.g. swash, annotation)
-  for (;;) {
-    if (!GetToken(true)) {
-      REPORT_UNEXPECTED_EOF(PEFFVUnexpectedEOF);
-      break;
-    }
-    if (mToken.IsSymbol('}')) { // done!
-      UngetToken();
-      break;
-    }
-
-    if (!ParseFontFeatureValueSet(valuesRule)) {
-      if (!SkipAtRule(false)) {
-        break;
-      }
-    }
-  }
-  if (!ExpectSymbol('}', true)) {
-    REPORT_UNEXPECTED_TOKEN(PEFFVUnexpectedBlockEnd);
-    SkipUntil('}');
-    return false;
-  }
-
-  (*aAppendFunc)(valuesRule, aData);
-  return true;
-}
-
-#define NUMVALUES_NO_LIMIT  0xFFFF
-
-// parse a single value set containing name-value pairs for a single feature type
-//   @<feature-type> { [ <feature-ident> : <feature-index>+ ; ]* }
-//   Ex: @swash { flowing: 1; delicate: 2; }
-bool
-CSSParserImpl::ParseFontFeatureValueSet(nsCSSFontFeatureValuesRule
-                                                            *aFeatureValuesRule)
-{
-  // -- @keyword (e.g. swash, styleset)
-  if (eCSSToken_AtKeyword != mToken.mType) {
-    REPORT_UNEXPECTED_TOKEN(PEFontFeatureValuesNoAt);
-    OUTPUT_ERROR();
-    UngetToken();
-    return false;
-  }
-
-  // which font-specific variant of font-variant-alternates
-  int32_t whichVariant;
-  nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(mToken.mIdent);
-  if (keyword == eCSSKeyword_UNKNOWN ||
-      !nsCSSProps::FindKeyword(keyword,
-                               nsCSSProps::kFontVariantAlternatesFuncsKTable,
-                               whichVariant))
-  {
-    if (!NonMozillaVendorIdentifier(mToken.mIdent)) {
-      REPORT_UNEXPECTED_TOKEN(PEFFVUnknownFontVariantPropValue);
-      OUTPUT_ERROR();
-    }
-    UngetToken();
-    return false;
-  }
-
-  nsAutoString featureType(mToken.mIdent);
-
-  // open brace
-  if (!ExpectSymbol('{', true)) {
-    REPORT_UNEXPECTED_TOKEN(PEFFVValueSetStart);
-    return false;
-  }
-
-  // styleset and character-variant can be multi-valued, otherwise single value
-  int32_t limitNumValues;
-
-  switch (keyword) {
-    case eCSSKeyword_styleset:
-      limitNumValues = NUMVALUES_NO_LIMIT;
-      break;
-    case eCSSKeyword_character_variant:
-      limitNumValues = 2;
-      break;
-    default:
-      limitNumValues = 1;
-      break;
-  }
-
-  // -- ident integer+ [, ident integer+]
-  nsAutoTArray<gfxFontFeatureValueSet::ValueList, 5> values;
-
-  // list of font-feature-values-declaration's
-  for (;;) {
-    nsAutoString valueId;
-
-    if (!GetToken(true)) {
-      REPORT_UNEXPECTED_EOF(PEFFVUnexpectedEOF);
-      break;
-    }
-
-    // ignore extra semicolons
-    if (mToken.IsSymbol(';')) {
-      continue;
-    }
-
-    // close brace ==> done
-    if (mToken.IsSymbol('}')) {
-      break;
-    }
-
-    // ident
-    if (eCSSToken_Ident != mToken.mType) {
-      REPORT_UNEXPECTED_TOKEN(PEFFVExpectedIdent);
-      if (!SkipDeclaration(true)) {
-        break;
-      }
-      continue;
-    }
-
-    valueId.Assign(mToken.mIdent);
-
-    // colon
-    if (!ExpectSymbol(':', true)) {
-      REPORT_UNEXPECTED_TOKEN(PEParseDeclarationNoColon);
-      OUTPUT_ERROR();
-      if (!SkipDeclaration(true)) {
-        break;
-      }
-      continue;
-    }
-
-    // value list
-    nsAutoTArray<uint32_t,4>   featureSelectors;
-
-    nsCSSValue intValue;
-    while (ParseNonNegativeVariant(intValue, VARIANT_INTEGER, nullptr)) {
-      featureSelectors.AppendElement(uint32_t(intValue.GetIntValue()));
-    }
-
-    int32_t numValues = featureSelectors.Length();
-
-    if (numValues == 0) {
-      REPORT_UNEXPECTED_TOKEN(PEFFVExpectedValue);
-      OUTPUT_ERROR();
-      if (!SkipDeclaration(true)) {
-        break;
-      }
-      continue;
-    }
-
-    if (numValues > limitNumValues) {
-      REPORT_UNEXPECTED_P(PEFFVTooManyValues, featureType);
-      OUTPUT_ERROR();
-      if (!SkipDeclaration(true)) {
-        break;
-      }
-      continue;
-    }
-
-    if (!GetToken(true)) {
-      REPORT_UNEXPECTED_EOF(PEFFVUnexpectedEOF);
-      gfxFontFeatureValueSet::ValueList v(valueId, featureSelectors);
-      values.AppendElement(v);
-      break;
-    }
-
-    // ';' or '}' to end definition
-    if (!mToken.IsSymbol(';') && !mToken.IsSymbol('}')) {
-      REPORT_UNEXPECTED_TOKEN(PEFFVValueDefinitionTrailing);
-      OUTPUT_ERROR();
-      if (!SkipDeclaration(true)) {
-        break;
-      }
-      continue;
-    }
-
-    gfxFontFeatureValueSet::ValueList v(valueId, featureSelectors);
-    values.AppendElement(v);
-
-    if (mToken.IsSymbol('}')) {
-      break;
-    }
- }
-
-  aFeatureValuesRule->AddValueList(whichVariant, values);
-  return true;
-}
 
 bool
 CSSParserImpl::ParseKeyframesRule(RuleAppendFunc aAppendFunc, void* aData)
 {
   if (!GetToken(true)) {
     REPORT_UNEXPECTED_EOF(PEKeyframeNameEOF);
     return false;
   }
@@ -6609,26 +6365,16 @@ CSSParserImpl::ParseSingleValueProperty(
     NS_ABORT_IF_FALSE(false, "not a single value property");
     return false;
   }
 
   if (nsCSSProps::PropHasFlags(aPropID, CSS_PROPERTY_VALUE_PARSER_FUNCTION)) {
     switch (aPropID) {
       case eCSSProperty_font_family:
         return ParseFamily(aValue);
-      case eCSSProperty_font_synthesis:
-        return ParseFontSynthesis(aValue);
-      case eCSSProperty_font_variant_alternates:
-        return ParseFontVariantAlternates(aValue);
-      case eCSSProperty_font_variant_east_asian:
-        return ParseFontVariantEastAsian(aValue);
-      case eCSSProperty_font_variant_ligatures:
-        return ParseFontVariantLigatures(aValue);
-      case eCSSProperty_font_variant_numeric:
-        return ParseFontVariantNumeric(aValue);
       case eCSSProperty_font_feature_settings:
         return ParseFontFeatureSettings(aValue);
       case eCSSProperty_font_weight:
         return ParseFontWeight(aValue);
       case eCSSProperty_marks:
         return ParseMarks(aValue);
       case eCSSProperty_text_decoration_line:
         return ParseTextDecorationLine(aValue);
@@ -8242,17 +7988,17 @@ CSSParserImpl::ParseCalcTerm(nsCSSValue&
       SkipUntil(')');
       return false;
     }
     return true;
   }
   // ... or just a value
   UngetToken();
   // Always pass VARIANT_NUMBER to ParseVariant so that unitless zero
-  // always gets picked up
+  // always gets picked up 
   if (!ParseVariant(aValue, aVariantMask | VARIANT_NUMBER, nullptr)) {
     return false;
   }
   // ...and do the VARIANT_NUMBER check ourselves.
   if (!(aVariantMask & VARIANT_NUMBER) && aValue.GetUnit() == eCSSUnit_Number) {
     return false;
   }
   // If we did the value parsing, we need to adjust aVariantMask to
@@ -8552,46 +8298,30 @@ CSSParserImpl::ParseFont()
         AppendValue(eCSSProperty_font_variant, family);
         AppendValue(eCSSProperty_font_weight, family);
         AppendValue(eCSSProperty_font_size, family);
         AppendValue(eCSSProperty_line_height, family);
         AppendValue(eCSSProperty_font_stretch, family);
         AppendValue(eCSSProperty_font_size_adjust, family);
         AppendValue(eCSSProperty_font_feature_settings, family);
         AppendValue(eCSSProperty_font_language_override, 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);
         nsCSSValue systemFont(eCSSUnit_System_Font);
         AppendValue(eCSSProperty_font_family, systemFont);
         AppendValue(eCSSProperty_font_style, systemFont);
         AppendValue(eCSSProperty_font_variant, systemFont);
         AppendValue(eCSSProperty_font_weight, systemFont);
         AppendValue(eCSSProperty_font_size, systemFont);
         AppendValue(eCSSProperty_line_height, systemFont);
         AppendValue(eCSSProperty_font_stretch, systemFont);
         AppendValue(eCSSProperty_font_size_adjust, systemFont);
         AppendValue(eCSSProperty_font_feature_settings, systemFont);
         AppendValue(eCSSProperty_font_language_override, 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;
     }
     return false;
   }
 
   // Get optional font-style, font-variant and font-weight (in any order)
   const int32_t numProps = 3;
@@ -8645,298 +8375,23 @@ CSSParserImpl::ParseFont()
       AppendValue(eCSSProperty_font_weight, values[2]);
       AppendValue(eCSSProperty_font_size, size);
       AppendValue(eCSSProperty_line_height, lineHeight);
       AppendValue(eCSSProperty_font_stretch,
                   nsCSSValue(NS_FONT_STRETCH_NORMAL, eCSSUnit_Enumerated));
       AppendValue(eCSSProperty_font_size_adjust, nsCSSValue(eCSSUnit_None));
       AppendValue(eCSSProperty_font_feature_settings, nsCSSValue(eCSSUnit_Normal));
       AppendValue(eCSSProperty_font_language_override, 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_caps, 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;
     }
   }
   return false;
 }
 
 bool
-CSSParserImpl::ParseFontSynthesis(nsCSSValue& aValue)
-{
-  if (!ParseVariant(aValue, VARIANT_HK | VARIANT_NONE,
-                    nsCSSProps::kFontSynthesisKTable)) {
-    return false;
-  }
-
-  // first value 'none' ==> done
-  if (eCSSUnit_None == aValue.GetUnit() ||
-      eCSSUnit_Initial == aValue.GetUnit() ||
-      eCSSUnit_Inherit == aValue.GetUnit())
-  {
-    return true;
-  }
-
-  // look for a second value
-  int32_t intValue = aValue.GetIntValue();
-  nsCSSValue nextValue;
-
-  if (ParseEnum(nextValue, nsCSSProps::kFontSynthesisKTable)) {
-    int32_t nextIntValue = nextValue.GetIntValue();
-    if (nextIntValue & intValue) {
-      return false;
-    }
-    aValue.SetIntValue(nextIntValue | intValue, eCSSUnit_Enumerated);
-  }
-
-  return true;
-}
-
-// font-variant-alternates allows for a combination of multiple
-// simple enumerated values and functional values.  Functional values have
-// parameter lists with one or more idents which are later resolved
-// based on values defined in @font-feature-value rules.
-//
-// font-variant-alternates: swash(flowing), historical-forms, styleset(alt-g, alt-m);
-//
-// So for this the nsCSSValue is set to a pair value, with one
-// value for a bitmask of both simple and functional property values
-// and another value containing a ValuePairList with lists of idents
-// for each functional property value.
-//
-// pairValue
-//   o intValue
-//       NS_FONT_VARIANT_ALTERNATES_SWASH |
-//       NS_FONT_VARIANT_ALTERNATES_STYLESET
-//   o valuePairList, each element with
-//     - intValue - indicates which alternate
-//     - string or valueList of strings
-//
-// Note: when only 'historical-forms' is specified, there are no
-// functional values to store, in which case the valuePairList is a
-// single element dummy list.  In all other cases, the length of the
-// list will match the number of functional values.
-
-#define MAX_ALLOWED_FEATURES 512
-
-bool
-CSSParserImpl::ParseSingleAlternate(int32_t& aWhichFeature,
-                                    nsCSSValue& aValue)
-{
-  if (!GetToken(true)) {
-    return false;
-  }
-
-  bool isIdent = (mToken.mType == eCSSToken_Ident);
-  if (mToken.mType != eCSSToken_Function && !isIdent) {
-    UngetToken();
-    return false;
-  }
-
-  // ident ==> simple enumerated prop val (e.g. historical-forms)
-  // function ==> e.g. swash(flowing) styleset(alt-g, alt-m)
-
-  nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(mToken.mIdent);
-  if (!(eCSSKeyword_UNKNOWN < keyword &&
-        nsCSSProps::FindKeyword(keyword,
-                                (isIdent ?
-                                 nsCSSProps::kFontVariantAlternatesKTable :
-                                 nsCSSProps::kFontVariantAlternatesFuncsKTable),
-                                aWhichFeature)))
-  {
-    // failed, pop token
-    UngetToken();
-    return false;
-  }
-
-  if (isIdent) {
-    aValue.SetIntValue(aWhichFeature, eCSSUnit_Enumerated);
-    return true;
-  }
-
-  uint16_t maxElems = 1;
-  if (keyword == eCSSKeyword_styleset ||
-      keyword == eCSSKeyword_character_variant) {
-    maxElems = MAX_ALLOWED_FEATURES;
-  }
-  return ParseFunction(mToken.mIdent, nullptr, VARIANT_IDENTIFIER,
-                       1, maxElems, aValue);
-}
-
-bool
-CSSParserImpl::ParseFontVariantAlternates(nsCSSValue& aValue)
-{
-  if (ParseVariant(aValue, VARIANT_INHERIT | VARIANT_NORMAL, nullptr)) {
-    return true;
-  }
-
-  // iterate through parameters
-  nsCSSValue listValue;
-  int32_t feature, featureFlags = 0;
-
-  // if no functional values, this may be a list with a single, unused element
-  listValue.SetListValue();
-
-  nsCSSValueList* list = nullptr;
-  nsCSSValue value;
-  while (ParseSingleAlternate(feature, value)) {
-
-    // check to make sure value not already set
-    if (feature == 0 ||
-        feature & featureFlags) {
-      return false;
-    }
-
-    featureFlags |= feature;
-
-    // if function, need to add to the list of functions
-    if (value.GetUnit() == eCSSUnit_Function) {
-      if (!list) {
-        list = listValue.GetListValue();
-      } else {
-        list->mNext = new nsCSSValueList;
-        list = list->mNext;
-      }
-      list->mValue = value;
-    }
-  }
-
-  nsCSSValue featureValue;
-  featureValue.SetIntValue(featureFlags, eCSSUnit_Enumerated);
-  aValue.SetPairValue(featureValue, listValue);
-
-  return true;
-}
-
-#define MASK_END_VALUE  -1
-
-// aMasks - array of masks for mutually-exclusive property values,
-//          e.g. proportial-nums, tabular-nums
-
-bool
-CSSParserImpl::ParseBitmaskValues(nsCSSValue& aValue,
-                                  const int32_t aKeywordTable[],
-                                  const int32_t aMasks[])
-{
-  if (!ParseVariant(aValue, VARIANT_HMK, aKeywordTable)) {
-    return false;
-  }
-
-  // first value 'normal', 'inherit', 'initial' ==> done
-  if (eCSSUnit_Normal == aValue.GetUnit() ||
-      eCSSUnit_Initial == aValue.GetUnit() ||
-      eCSSUnit_Inherit == aValue.GetUnit())
-  {
-    return true;
-  }
-
-  // look for more values
-  nsCSSValue nextValue;
-  int32_t mergedValue = aValue.GetIntValue();
-
-  while (ParseEnum(nextValue, aKeywordTable))
-  {
-    int32_t nextIntValue = nextValue.GetIntValue();
-
-    // check to make sure value not already set
-    if (nextIntValue & mergedValue) {
-      return false;
-    }
-
-    const int32_t *m = aMasks;
-    int32_t c = 0;
-
-    while (*m != MASK_END_VALUE) {
-      if (*m & nextIntValue) {
-        c = mergedValue & *m;
-        break;
-      }
-      m++;
-    }
-
-    if (c) {
-      return false;
-    }
-
-    mergedValue |= nextIntValue;
-  }
-
-  aValue.SetIntValue(mergedValue, eCSSUnit_Enumerated);
-
-  return true;
-}
-
-static const int32_t maskEastAsian[] = {
-  NS_FONT_VARIANT_EAST_ASIAN_VARIANT_MASK,
-  NS_FONT_VARIANT_EAST_ASIAN_WIDTH_MASK,
-  MASK_END_VALUE
-};
-
-bool
-CSSParserImpl::ParseFontVariantEastAsian(nsCSSValue& aValue)
-{
-  NS_ASSERTION(maskEastAsian[NS_ARRAY_LENGTH(maskEastAsian) - 1] ==
-                 MASK_END_VALUE,
-               "incorrectly terminated array");
-
-  return ParseBitmaskValues(aValue, nsCSSProps::kFontVariantEastAsianKTable,
-                            maskEastAsian);
-}
-
-static const int32_t maskLigatures[] = {
-  NS_FONT_VARIANT_LIGATURES_COMMON_MASK,
-  NS_FONT_VARIANT_LIGATURES_DISCRETIONARY_MASK,
-  NS_FONT_VARIANT_LIGATURES_HISTORICAL_MASK,
-  NS_FONT_VARIANT_LIGATURES_CONTEXTUAL_MASK,
-  MASK_END_VALUE
-};
-
-bool
-CSSParserImpl::ParseFontVariantLigatures(nsCSSValue& aValue)
-{
-  NS_ASSERTION(maskLigatures[NS_ARRAY_LENGTH(maskLigatures) - 1] ==
-                 MASK_END_VALUE,
-               "incorrectly terminated array");
-
-  return ParseBitmaskValues(aValue, nsCSSProps::kFontVariantLigaturesKTable,
-                            maskLigatures);
-}
-
-static const int32_t maskNumeric[] = {
-  NS_FONT_VARIANT_NUMERIC_FIGURE_MASK,
-  NS_FONT_VARIANT_NUMERIC_SPACING_MASK,
-  NS_FONT_VARIANT_NUMERIC_FRACTION_MASK,
-  MASK_END_VALUE
-};
-
-bool
-CSSParserImpl::ParseFontVariantNumeric(nsCSSValue& aValue)
-{
-  NS_ASSERTION(maskNumeric[NS_ARRAY_LENGTH(maskNumeric) - 1] ==
-                 MASK_END_VALUE,
-               "incorrectly terminated array");
-
-  return ParseBitmaskValues(aValue, nsCSSProps::kFontVariantNumericKTable,
-                            maskNumeric);
-}
-
-bool
 CSSParserImpl::ParseFontWeight(nsCSSValue& aValue)
 {
   if (ParseVariant(aValue, VARIANT_HKI | VARIANT_SYSFONT,
                    nsCSSProps::kFontWeightKTable)) {
     if (eCSSUnit_Integer == aValue.GetUnit()) { // ensure unit value
       int32_t intValue = aValue.GetIntValue();
       if ((100 <= intValue) &&
           (intValue <= 900) &&
@@ -9697,31 +9152,24 @@ CSSParserImpl::ParseTextOverflow(nsCSSVa
 ///////////////////////////////////////////////////////
 // transform Parsing Implementation
 
 /* Reads a function list of arguments.  Do not call this function
  * directly; it's mean to be caled from ParseFunction.
  */
 bool
 CSSParserImpl::ParseFunctionInternals(const int32_t aVariantMask[],
-                                      int32_t aVariantMaskAll,
                                       uint16_t aMinElems,
                                       uint16_t aMaxElems,
                                       InfallibleTArray<nsCSSValue> &aOutput)
 {
-  NS_ASSERTION((aVariantMask && !aVariantMaskAll) ||
-               (!aVariantMask && aVariantMaskAll),
-               "only one of the two variant mask parameters can be set");
-
   for (uint16_t index = 0; index < aMaxElems; ++index) {
     nsCSSValue newValue;
-    int32_t m = aVariantMaskAll ? aVariantMaskAll : aVariantMask[index];
-    if (!ParseVariant(newValue, m, nullptr)) {
+    if (!ParseVariant(newValue, aVariantMask[index], nullptr))
       return false;
-    }
 
     aOutput.AppendElement(newValue);
 
     // See whether to continue or whether to look for end of function.
     if (!ExpectSymbol(',', true)) {
       // We need to read the closing parenthesis, and also must take care
       // that we haven't read too few symbols.
       return ExpectSymbol(')', true) && (index + 1) >= aMinElems;
@@ -9739,34 +9187,29 @@ CSSParserImpl::ParseFunctionInternals(co
  *
  * On error, the return value is false.
  *
  * @param aFunction The name of the function that we're reading.
  * @param aAllowedTypes An array of values corresponding to the legal
  *        types for each element in the function.  The zeroth element in the
  *        array corresponds to the first function parameter, etc.  The length
  *        of this array _must_ be greater than or equal to aMaxElems or the
- *        behavior is undefined.  If not null, aAllowTypesAll must be 0.
- * @param aAllowedTypesAll If set, every element tested for these types
+ *        behavior is undefined.
  * @param aMinElems Minimum number of elements to read.  Reading fewer than
  *        this many elements will result in the function failing.
  * @param aMaxElems Maximum number of elements to read.  Reading more than
  *        this many elements will result in the function failing.
  * @param aValue (out) The value that was parsed.
  */
 bool
 CSSParserImpl::ParseFunction(const nsString &aFunction,
                              const int32_t aAllowedTypes[],
-                             int32_t aAllowedTypesAll,
                              uint16_t aMinElems, uint16_t aMaxElems,
                              nsCSSValue &aValue)
 {
-  NS_ASSERTION((aAllowedTypes && !aAllowedTypesAll) ||
-               (!aAllowedTypes && aAllowedTypesAll),
-               "only one of the two allowed type parameter can be set");
   typedef InfallibleTArray<nsCSSValue>::size_type arrlen_t;
 
   /* 2^16 - 2, so that if we have 2^16 - 2 transforms, we have 2^16 - 1
    * elements stored in the the nsCSSValue::Array.
    */
   static const arrlen_t MAX_ALLOWED_ELEMS = 0xFFFE;
 
   /* Make a copy of the function name, since the reference is _probably_ to
@@ -9774,20 +9217,19 @@ CSSParserImpl::ParseFunction(const nsStr
    * function.
    */
   nsString functionName(aFunction);
 
   /* Read in a list of values as an array, failing if we can't or if
    * it's out of bounds.
    */
   InfallibleTArray<nsCSSValue> foundValues;
-  if (!ParseFunctionInternals(aAllowedTypes, aAllowedTypesAll, aMinElems,
-                              aMaxElems, foundValues)) {
-    return false;
-  }
+  if (!ParseFunctionInternals(aAllowedTypes, aMinElems, aMaxElems,
+                              foundValues))
+    return false;
 
   /* Now, convert this array into an nsCSSValue::Array object.
    * We'll need N + 1 spots, one for the function name and the rest for the
    * arguments.  In case the user has given us more than 2^16 - 2 arguments,
    * we'll truncate them at 2^16 - 2 arguments.
    */
   uint16_t numElements = (foundValues.Length() <= MAX_ALLOWED_ELEMS ?
                           foundValues.Length() + 1 : MAX_ALLOWED_ELEMS);
@@ -10052,18 +9494,17 @@ CSSParserImpl::ParseSingleTransform(bool
     case eCSSKeyword_translatez:
       mToken.mIdent.Replace(mToken.mIdent.Length() - 1, 1, PRUnichar('Z'));
       break;
 
     default:
       break;
   }
 
-  return ParseFunction(mToken.mIdent, variantMask, 0, minElems,
-                       maxElems, aValue);
+  return ParseFunction(mToken.mIdent, variantMask, minElems, maxElems, aValue);
 }
 
 /* Parses a transform property list by continuously reading in properties
  * and constructing a matrix from it.
  */
 bool CSSParserImpl::ParseTransform(bool aIsPrefixed)
 {
   nsCSSValue value;
--- a/layout/style/nsCSSPropAliasList.h
+++ b/layout/style/nsCSSPropAliasList.h
@@ -50,10 +50,8 @@ CSS_PROP_ALIAS(-moz-animation, animation
 CSS_PROP_ALIAS(-moz-animation-delay, animation_delay, MozAnimationDelay, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-direction, animation_direction, MozAnimationDirection, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-duration, animation_duration, MozAnimationDuration, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-fill-mode, animation_fill_mode, MozAnimationFillMode, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-iteration-count, animation_iteration_count, MozAnimationIterationCount, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-name, animation_name, MozAnimationName, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-play-state, animation_play_state, MozAnimationPlayState, "layout.css.prefixes.animations")
 CSS_PROP_ALIAS(-moz-animation-timing-function, animation_timing_function, MozAnimationTimingFunction, "layout.css.prefixes.animations")
-CSS_PROP_ALIAS(font-feature-settings, font_feature_settings, FontFeatureSettings, "layout.css.font-features.enabled")
-CSS_PROP_ALIAS(font-language-override, font_language_override, FontLanguageOverride, "layout.css.font-features.enabled")
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -1705,28 +1705,16 @@ CSS_PROP_FONT(
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
         CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
     "",
     0,
     nullptr,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_FONT(
-    font-kerning,
-    font_kerning,
-    FontKerning,
-    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,
     CSS_PROP_DOMPROP_PREFIXED(FontLanguageOverride),
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
         CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
     "",
     VARIANT_NORMAL | VARIANT_INHERIT | VARIANT_STRING,
@@ -1781,118 +1769,29 @@ CSS_PROP_FONT(
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
         CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
     "",
     VARIANT_HK | VARIANT_SYSFONT,
     kFontStyleKTable,
     offsetof(nsStyleFont, mFont.style),
     eStyleAnimType_EnumU8)
- CSS_PROP_FONT(
-    font-synthesis,
-    font_synthesis,
-    FontSynthesis,
-    CSS_PROPERTY_PARSE_VALUE |
-        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,
-    eStyleAnimType_None)
 CSS_PROP_FONT(
     font-variant,
     font_variant,
     FontVariant,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
         CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
     "",
     VARIANT_HK | VARIANT_SYSFONT,
     kFontVariantKTable,
     offsetof(nsStyleFont, mFont.variant),
     eStyleAnimType_EnumU8)
 CSS_PROP_FONT(
-    font-variant-alternates,
-    font_variant_alternates,
-    FontVariantAlternates,
-    CSS_PROPERTY_PARSE_VALUE |
-        CSS_PROPERTY_VALUE_PARSER_FUNCTION |
-        CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
-        CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
-    "layout.css.font-features.enabled",
-    VARIANT_HK,
-    kFontVariantAlternatesKTable,
-    CSS_PROP_NO_OFFSET,
-    eStyleAnimType_None)
-CSS_PROP_FONT(
-    font-variant-caps,
-    font_variant_caps,
-    FontVariantCaps,
-    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,
-    eStyleAnimType_None)
-CSS_PROP_FONT(
-    font-variant-east-asian,
-    font_variant_east_asian,
-    FontVariantEastAsian,
-    CSS_PROPERTY_PARSE_VALUE |
-        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,
-    eStyleAnimType_None)
-CSS_PROP_FONT(
-    font-variant-ligatures,
-    font_variant_ligatures,
-    FontVariantLigatures,
-    CSS_PROPERTY_PARSE_VALUE |
-        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,
-    eStyleAnimType_None)
-CSS_PROP_FONT(
-    font-variant-numeric,
-    font_variant_numeric,
-    FontVariantNumeric,
-    CSS_PROPERTY_PARSE_VALUE |
-        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,
-    eStyleAnimType_None)
-CSS_PROP_FONT(
-    font-variant-position,
-    font_variant_position,
-    FontVariantPosition,
-    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,
-    eStyleAnimType_None)
-CSS_PROP_FONT(
     font-weight,
     font_weight,
     FontWeight,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_VALUE_PARSER_FUNCTION |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
         CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
         // NOTE: This property has range restrictions on interpolation!
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -405,27 +405,17 @@ nsCSSProps::LookupFontDesc(const nsACStr
   NS_ABORT_IF_FALSE(gFontDescTable, "no lookup table, needs addref");
   return nsCSSFontDesc(gFontDescTable->Lookup(aFontDesc));
 }
 
 nsCSSFontDesc
 nsCSSProps::LookupFontDesc(const nsAString& aFontDesc)
 {
   NS_ABORT_IF_FALSE(gFontDescTable, "no lookup table, needs addref");
-  nsCSSFontDesc which = nsCSSFontDesc(gFontDescTable->Lookup(aFontDesc));
-
-  // check for unprefixed font-feature-settings/font-language-override
-  if (which == eCSSFontDesc_UNKNOWN &&
-      mozilla::Preferences::GetBool("layout.css.font-features.enabled")) {
-    nsAutoString prefixedProp;
-    prefixedProp.AppendLiteral("-moz-");
-    prefixedProp.Append(aFontDesc);
-    which = nsCSSFontDesc(gFontDescTable->Lookup(prefixedProp));
-  }
-  return which;
+  return nsCSSFontDesc(gFontDescTable->Lookup(aFontDesc));
 }
 
 const nsAFlatCString&
 nsCSSProps::GetStringValue(nsCSSProperty aProperty)
 {
   NS_ABORT_IF_FALSE(gPropertyTable, "no lookup table, needs addref");
   if (gPropertyTable) {
     return gPropertyTable->GetStringValue(int32_t(aProperty));
@@ -1018,23 +1008,16 @@ const int32_t nsCSSProps::kFontKTable[] 
   eCSSKeyword__moz_dialog, NS_STYLE_FONT_DIALOG,
   eCSSKeyword__moz_button, NS_STYLE_FONT_BUTTON,
   eCSSKeyword__moz_pull_down_menu, NS_STYLE_FONT_PULL_DOWN_MENU,
   eCSSKeyword__moz_list, NS_STYLE_FONT_LIST,
   eCSSKeyword__moz_field, NS_STYLE_FONT_FIELD,
   eCSSKeyword_UNKNOWN,-1
 };
 
-const int32_t nsCSSProps::kFontKerningKTable[] = {
-  eCSSKeyword_auto, NS_FONT_KERNING_AUTO,
-  eCSSKeyword_none, NS_FONT_KERNING_NONE,
-  eCSSKeyword_normal, NS_FONT_KERNING_NORMAL,
-  eCSSKeyword_UNKNOWN,-1
-};
-
 const int32_t nsCSSProps::kFontSizeKTable[] = {
   eCSSKeyword_xx_small, NS_STYLE_FONT_SIZE_XXSMALL,
   eCSSKeyword_x_small, NS_STYLE_FONT_SIZE_XSMALL,
   eCSSKeyword_small, NS_STYLE_FONT_SIZE_SMALL,
   eCSSKeyword_medium, NS_STYLE_FONT_SIZE_MEDIUM,
   eCSSKeyword_large, NS_STYLE_FONT_SIZE_LARGE,
   eCSSKeyword_x_large, NS_STYLE_FONT_SIZE_XLARGE,
   eCSSKeyword_xx_large, NS_STYLE_FONT_SIZE_XXLARGE,
@@ -1058,97 +1041,22 @@ const int32_t nsCSSProps::kFontStretchKT
 
 const int32_t nsCSSProps::kFontStyleKTable[] = {
   eCSSKeyword_normal, NS_STYLE_FONT_STYLE_NORMAL,
   eCSSKeyword_italic, NS_STYLE_FONT_STYLE_ITALIC,
   eCSSKeyword_oblique, NS_STYLE_FONT_STYLE_OBLIQUE,
   eCSSKeyword_UNKNOWN,-1
 };
 
-const int32_t nsCSSProps::kFontSynthesisKTable[] = {
-  eCSSKeyword_weight, NS_FONT_SYNTHESIS_WEIGHT,
-  eCSSKeyword_style, NS_FONT_SYNTHESIS_STYLE,
-  eCSSKeyword_UNKNOWN,-1
-};
-
-
 const int32_t nsCSSProps::kFontVariantKTable[] = {
   eCSSKeyword_normal, NS_STYLE_FONT_VARIANT_NORMAL,
   eCSSKeyword_small_caps, NS_STYLE_FONT_VARIANT_SMALL_CAPS,
   eCSSKeyword_UNKNOWN,-1
 };
 
-const int32_t nsCSSProps::kFontVariantAlternatesKTable[] = {
-  eCSSKeyword_historical_forms, NS_FONT_VARIANT_ALTERNATES_HISTORICAL,
-  eCSSKeyword_UNKNOWN,-1
-};
-
-const int32_t nsCSSProps::kFontVariantAlternatesFuncsKTable[] = {
-  eCSSKeyword_stylistic, NS_FONT_VARIANT_ALTERNATES_STYLISTIC,
-  eCSSKeyword_styleset, NS_FONT_VARIANT_ALTERNATES_STYLESET,
-  eCSSKeyword_character_variant, NS_FONT_VARIANT_ALTERNATES_CHARACTER_VARIANT,
-  eCSSKeyword_swash, NS_FONT_VARIANT_ALTERNATES_SWASH,
-  eCSSKeyword_ornaments, NS_FONT_VARIANT_ALTERNATES_ORNAMENTS,
-  eCSSKeyword_annotation, NS_FONT_VARIANT_ALTERNATES_ANNOTATION,
-  eCSSKeyword_UNKNOWN,-1
-};
-
-const int32_t nsCSSProps::kFontVariantCapsKTable[] = {
-  eCSSKeyword_small_caps, NS_FONT_VARIANT_CAPS_SMALLCAPS,
-  eCSSKeyword_all_small_caps, NS_FONT_VARIANT_CAPS_ALLSMALL,
-  eCSSKeyword_petite_caps, NS_FONT_VARIANT_CAPS_PETITECAPS,
-  eCSSKeyword_all_petite_caps, NS_FONT_VARIANT_CAPS_ALLPETITE,
-  eCSSKeyword_titling_caps, NS_FONT_VARIANT_CAPS_TITLING,
-  eCSSKeyword_unicase, NS_FONT_VARIANT_CAPS_UNICASE,
-  eCSSKeyword_UNKNOWN,-1
-};
-
-const int32_t nsCSSProps::kFontVariantEastAsianKTable[] = {
-  eCSSKeyword_jis78, NS_FONT_VARIANT_EAST_ASIAN_JIS78,
-  eCSSKeyword_jis83, NS_FONT_VARIANT_EAST_ASIAN_JIS83,
-  eCSSKeyword_jis90, NS_FONT_VARIANT_EAST_ASIAN_JIS90,
-  eCSSKeyword_jis04, NS_FONT_VARIANT_EAST_ASIAN_JIS04,
-  eCSSKeyword_simplified, NS_FONT_VARIANT_EAST_ASIAN_SIMPLIFIED,
-  eCSSKeyword_traditional, NS_FONT_VARIANT_EAST_ASIAN_TRADITIONAL,
-  eCSSKeyword_full_width, NS_FONT_VARIANT_EAST_ASIAN_FULL_WIDTH,
-  eCSSKeyword_proportional_width, NS_FONT_VARIANT_EAST_ASIAN_PROP_WIDTH,
-  eCSSKeyword_ruby, NS_FONT_VARIANT_EAST_ASIAN_RUBY,
-  eCSSKeyword_UNKNOWN,-1
-};
-
-const int32_t nsCSSProps::kFontVariantLigaturesKTable[] = {
-  eCSSKeyword_common_ligatures, NS_FONT_VARIANT_LIGATURES_COMMON,
-  eCSSKeyword_no_common_ligatures, NS_FONT_VARIANT_LIGATURES_NO_COMMON,
-  eCSSKeyword_discretionary_ligatures, NS_FONT_VARIANT_LIGATURES_DISCRETIONARY,
-  eCSSKeyword_no_discretionary_ligatures, NS_FONT_VARIANT_LIGATURES_NO_DISCRETIONARY,
-  eCSSKeyword_historical_ligatures, NS_FONT_VARIANT_LIGATURES_HISTORICAL,
-  eCSSKeyword_no_historical_ligatures, NS_FONT_VARIANT_LIGATURES_NO_HISTORICAL,
-  eCSSKeyword_contextual, NS_FONT_VARIANT_LIGATURES_CONTEXTUAL,
-  eCSSKeyword_no_contextual, NS_FONT_VARIANT_LIGATURES_NO_CONTEXTUAL,
-  eCSSKeyword_UNKNOWN,-1
-};
-
-const int32_t nsCSSProps::kFontVariantNumericKTable[] = {
-  eCSSKeyword_lining_nums, NS_FONT_VARIANT_NUMERIC_LINING,
-  eCSSKeyword_oldstyle_nums, NS_FONT_VARIANT_NUMERIC_OLDSTYLE,
-  eCSSKeyword_proportional_nums, NS_FONT_VARIANT_NUMERIC_PROPORTIONAL,
-  eCSSKeyword_tabular_nums, NS_FONT_VARIANT_NUMERIC_TABULAR,
-  eCSSKeyword_diagonal_fractions, NS_FONT_VARIANT_NUMERIC_DIAGONAL_FRACTIONS,
-  eCSSKeyword_stacked_fractions, NS_FONT_VARIANT_NUMERIC_STACKED_FRACTIONS,
-  eCSSKeyword_slashed_zero, NS_FONT_VARIANT_NUMERIC_SLASHZERO,
-  eCSSKeyword_ordinal, NS_FONT_VARIANT_NUMERIC_ORDINAL,
-  eCSSKeyword_UNKNOWN,-1
-};
-
-const int32_t nsCSSProps::kFontVariantPositionKTable[] = {
-  eCSSKeyword_super, NS_FONT_VARIANT_POSITION_SUPER,
-  eCSSKeyword_sub, NS_FONT_VARIANT_POSITION_SUB,
-  eCSSKeyword_UNKNOWN,-1
-};
-
 const int32_t nsCSSProps::kFontWeightKTable[] = {
   eCSSKeyword_normal, NS_STYLE_FONT_WEIGHT_NORMAL,
   eCSSKeyword_bold, NS_STYLE_FONT_WEIGHT_BOLD,
   eCSSKeyword_bolder, NS_STYLE_FONT_WEIGHT_BOLDER,
   eCSSKeyword_lighter, NS_STYLE_FONT_WEIGHT_LIGHTER,
   eCSSKeyword_UNKNOWN,-1
 };
 
@@ -2159,29 +2067,21 @@ static const nsCSSProperty gBorderEndWid
 
 static const nsCSSProperty gFontSubpropTable[] = {
   eCSSProperty_font_family,
   eCSSProperty_font_style,
   eCSSProperty_font_variant,
   eCSSProperty_font_weight,
   eCSSProperty_font_size,
   eCSSProperty_line_height,
-  eCSSProperty_font_size_adjust,
-  eCSSProperty_font_stretch,
+  eCSSProperty_font_size_adjust, // XXX Added LDB.
+  eCSSProperty_font_stretch, // XXX Added LDB.
   eCSSProperty__x_system_font,
   eCSSProperty_font_feature_settings,
   eCSSProperty_font_language_override,
-  eCSSProperty_font_kerning,
-  eCSSProperty_font_synthesis,
-  eCSSProperty_font_variant_alternates,
-  eCSSProperty_font_variant_caps,
-  eCSSProperty_font_variant_east_asian,
-  eCSSProperty_font_variant_ligatures,
-  eCSSProperty_font_variant_numeric,
-  eCSSProperty_font_variant_position,
   eCSSProperty_UNKNOWN
 };
 
 static const nsCSSProperty gListStyleSubpropTable[] = {
   eCSSProperty_list_style_type,
   eCSSProperty_list_style_image,
   eCSSProperty_list_style_position,
   eCSSProperty_UNKNOWN
--- a/layout/style/nsCSSProps.h
+++ b/layout/style/nsCSSProps.h
@@ -187,17 +187,17 @@ public:
   static const nsAFlatCString& GetStringValue(nsCSSFontDesc aFontDesc);
 
   // Get the property to report the computed value of aProperty as being
   // the computed value of.  aProperty must have the
   // CSS_PROPERTY_REPORT_OTHER_NAME bit set.
   static nsCSSProperty OtherNameFor(nsCSSProperty aProperty);
 
   // Given a CSS Property and a Property Enum Value
-  // Return back a const nsString& representation of the
+  // Return back a const nsString& representation of the 
   // value. Return back nullstr if no value is found
   static const nsAFlatCString& LookupPropertyValue(nsCSSProperty aProperty, int32_t aValue);
 
   // Get a color name for a predefined color value like buttonhighlight or activeborder
   // Sets the aStr param to the name of the propertyID
   static bool GetColorName(int32_t aPropID, nsCString &aStr);
 
   // Returns the index of |aKeyword| in |aTable|, if it exists there;
@@ -393,29 +393,20 @@ public:
   static const int32_t kAlignItemsKTable[];
   static const int32_t kAlignSelfKTable[];
   static const int32_t kFlexDirectionKTable[];
   static const int32_t kJustifyContentKTable[];
 #endif // MOZ_FLEXBOX
   static const int32_t kFloatKTable[];
   static const int32_t kFloatEdgeKTable[];
   static const int32_t kFontKTable[];
-  static const int32_t kFontKerningKTable[];
   static const int32_t kFontSizeKTable[];
   static const int32_t kFontStretchKTable[];
   static const int32_t kFontStyleKTable[];
-  static const int32_t kFontSynthesisKTable[];
   static const int32_t kFontVariantKTable[];
-  static const int32_t kFontVariantAlternatesKTable[];
-  static const int32_t kFontVariantAlternatesFuncsKTable[];
-  static const int32_t kFontVariantCapsKTable[];
-  static const int32_t kFontVariantEastAsianKTable[];
-  static const int32_t kFontVariantLigaturesKTable[];
-  static const int32_t kFontVariantNumericKTable[];
-  static const int32_t kFontVariantPositionKTable[];
   static const int32_t kFontWeightKTable[];
   static const int32_t kIMEModeKTable[];
   static const int32_t kLineHeightKTable[];
   static const int32_t kListStylePositionKTable[];
   static const int32_t kListStyleKTable[];
   static const int32_t kMaskTypeKTable[];
   static const int32_t kObjectOpacityKTable[];
   static const int32_t kObjectPatternKTable[];
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -644,17 +644,17 @@ void RuleHash::AppendRule(const RuleSele
   else if (selector->mLowercaseTag) {
     RuleValue ruleValue(aRuleInfo, mRuleCount++, mQuirksMode);
     if (!mTagTable.ops) {
       PL_DHashTableInit(&mTagTable, &RuleHash_TagTable_Ops, nullptr,
                         sizeof(RuleHashTagTableEntry), 16);
     }
     AppendRuleToTagTable(&mTagTable, selector->mLowercaseTag, ruleValue);
     RULE_HASH_STAT_INCREMENT(mTagSelectors);
-    if (selector->mCasedTag &&
+    if (selector->mCasedTag && 
         selector->mCasedTag != selector->mLowercaseTag) {
       AppendRuleToTagTable(&mTagTable, selector->mCasedTag, ruleValue);
       RULE_HASH_STAT_INCREMENT(mTagSelectors);
     }
   }
   else if (kNameSpaceID_Unknown != selector->mNameSpace) {
     if (!mNameSpaceTable.ops) {
       PL_DHashTableInit(&mNameSpaceTable, &RuleHash_NameSpaceTable_Ops, nullptr,
@@ -973,17 +973,16 @@ struct RuleCascadeData {
   PLDHashTable             mAttributeSelectors;
   PLDHashTable             mAnonBoxRules;
 #ifdef MOZ_XUL
   PLDHashTable             mXULTreeRules;
 #endif
 
   nsTArray<nsFontFaceRuleContainer> mFontFaceRules;
   nsTArray<nsCSSKeyframesRule*> mKeyframesRules;
-  nsTArray<nsCSSFontFeatureValuesRule*> mFontFeatureValuesRules;
   nsTArray<nsCSSPageRule*> mPageRules;
 
   // Looks up or creates the appropriate list in |mAttributeSelectors|.
   // Returns null only on allocation failure.
   nsTArray<nsCSSSelector*>* AttributeListFor(nsIAtom* aAttribute);
 
   nsMediaQueryResultCacheKey mCacheKey;
   RuleCascadeData*  mNext; // for a different medium
@@ -1025,17 +1024,16 @@ RuleCascadeData::SizeOfIncludingThis(nsM
                                         SizeOfRuleHashTableEntry, aMallocSizeOf);
 #ifdef MOZ_XUL
   n += PL_DHashTableSizeOfExcludingThis(&mXULTreeRules,
                                         SizeOfRuleHashTableEntry, aMallocSizeOf);
 #endif
 
   n += mFontFaceRules.SizeOfExcludingThis(aMallocSizeOf);
   n += mKeyframesRules.SizeOfExcludingThis(aMallocSizeOf);
-  n += mFontFeatureValuesRules.SizeOfExcludingThis(aMallocSizeOf);
   n += mPageRules.SizeOfExcludingThis(aMallocSizeOf);
 
   return n;
 }
 
 nsTArray<nsCSSSelector*>*
 RuleCascadeData::AttributeListFor(nsIAtom* aAttribute)
 {
@@ -1434,21 +1432,21 @@ static bool AttrMatchesValue(const nsAtt
   const nsDefaultStringComparator defaultComparator;
   const nsASCIICaseInsensitiveStringComparator ciComparator;
   const nsStringComparator& comparator =
       (aAttrSelector->mCaseSensitive || !isHTML)
                 ? static_cast<const nsStringComparator&>(defaultComparator)
                 : static_cast<const nsStringComparator&>(ciComparator);
 
   switch (aAttrSelector->mFunction) {
-    case NS_ATTR_FUNC_EQUALS:
+    case NS_ATTR_FUNC_EQUALS: 
       return aValue.Equals(aAttrSelector->mValue, comparator);
-    case NS_ATTR_FUNC_INCLUDES:
+    case NS_ATTR_FUNC_INCLUDES: 
       return ValueIncludes(aValue, aAttrSelector->mValue, comparator);
-    case NS_ATTR_FUNC_DASHMATCH:
+    case NS_ATTR_FUNC_DASHMATCH: 
       return nsStyleUtil::DashMatchCompare(aValue, aAttrSelector->mValue, comparator);
     case NS_ATTR_FUNC_ENDSMATCH:
       return StringEndsWith(aValue, aAttrSelector->mValue, comparator);
     case NS_ATTR_FUNC_BEGINSMATCH:
       return StringBeginsWith(aValue, aAttrSelector->mValue, comparator);
     case NS_ATTR_FUNC_CONTAINSMATCH:
       return FindInReadable(aAttrSelector->mValue, aValue, comparator);
     default:
@@ -2746,31 +2744,16 @@ nsCSSRuleProcessor::AppendPageRules(
     if (!aArray.AppendElements(cascade->mPageRules)) {
       return false;
     }
   }
   
   return true;
 }
 
-bool
-nsCSSRuleProcessor::AppendFontFeatureValuesRules(
-                              nsPresContext *aPresContext,
-                              nsTArray<nsCSSFontFeatureValuesRule*>& aArray)
-{
-  RuleCascadeData* cascade = GetRuleCascade(aPresContext);
-
-  if (cascade) {
-    if (!aArray.AppendElements(cascade->mFontFeatureValuesRules))
-      return false;
-  }
-
-  return true;
-}
-
 nsresult
 nsCSSRuleProcessor::ClearRuleCascades()
 {
   // We rely on our caller (perhaps indirectly) to do something that
   // will rebuild style data and the user font set (either
   // nsIPresShell::ReconstructStyleData or
   // nsPresContext::RebuildAllStyleData).
   RuleCascadeData *data = mRuleCascades;
@@ -3059,24 +3042,22 @@ static PLDHashTableOps gRulesByWeightOps
     PL_DHashFinalizeStub,
     InitWeightEntry
 };
 
 struct CascadeEnumData {
   CascadeEnumData(nsPresContext* aPresContext,
                   nsTArray<nsFontFaceRuleContainer>& aFontFaceRules,
                   nsTArray<nsCSSKeyframesRule*>& aKeyframesRules,
-                  nsTArray<nsCSSFontFeatureValuesRule*>& aFontFeatureValuesRules,
                   nsTArray<nsCSSPageRule*>& aPageRules,
                   nsMediaQueryResultCacheKey& aKey,
                   uint8_t aSheetType)
     : mPresContext(aPresContext),
       mFontFaceRules(aFontFaceRules),
       mKeyframesRules(aKeyframesRules),
-      mFontFeatureValuesRules(aFontFeatureValuesRules),
       mPageRules(aPageRules),
       mCacheKey(aKey),
       mSheetType(aSheetType)
   {
     if (!PL_DHashTableInit(&mRulesByWeight, &gRulesByWeightOps, nullptr,
                           sizeof(RuleByWeightEntry), 64))
       mRulesByWeight.ops = nullptr;
 
@@ -3090,17 +3071,16 @@ struct CascadeEnumData {
     if (mRulesByWeight.ops)
       PL_DHashTableFinish(&mRulesByWeight);
     PL_FinishArenaPool(&mArena);
   }
 
   nsPresContext* mPresContext;
   nsTArray<nsFontFaceRuleContainer>& mFontFaceRules;
   nsTArray<nsCSSKeyframesRule*>& mKeyframesRules;
-  nsTArray<nsCSSFontFeatureValuesRule*>& mFontFeatureValuesRules;
   nsTArray<nsCSSPageRule*>& mPageRules;
   nsMediaQueryResultCacheKey& mCacheKey;
   PLArenaPool mArena;
   // Hooray, a manual PLDHashTable since nsClassHashtable doesn't
   // provide a getter that gives me a *reference* to the value.
   PLDHashTable mRulesByWeight; // of PerWeightDataListItem linked lists
   uint8_t mSheetType;
 };
@@ -3108,19 +3088,17 @@ struct CascadeEnumData {
 /*
  * This enumerates style rules in a sheet (and recursively into any
  * grouping rules) in order to:
  *  (1) add any style rules, in order, into data->mRulesByWeight (for
  *      the primary CSS cascade), where they are separated by weight
  *      but kept in order per-weight, and
  *  (2) add any @font-face rules, in order, into data->mFontFaceRules.
  *  (3) add any @keyframes rules, in order, into data->mKeyframesRules.
- *  (4) add any @font-feature-value rules, in order,
- *      into data->mFontFeatureValuesRules.
- *  (5) add any @page rules, in order, into data->mPageRules.
+ *  (4) add any @page rules, in order, into data->mPageRules.
  */
 static bool
 CascadeRuleEnumFunc(css::Rule* aRule, void* aData)
 {
   CascadeEnumData* data = (CascadeEnumData*)aData;
   int32_t type = aRule->GetType();
 
   if (css::Rule::STYLE_RULE == type) {
@@ -3163,23 +3141,16 @@ CascadeRuleEnumFunc(css::Rule* aRule, vo
   }
   else if (css::Rule::KEYFRAMES_RULE == type) {
     nsCSSKeyframesRule *keyframesRule =
       static_cast<nsCSSKeyframesRule*>(aRule);
     if (!data->mKeyframesRules.AppendElement(keyframesRule)) {
       return false;
     }
   }
-  else if (css::Rule::FONT_FEATURE_VALUES_RULE == type) {
-    nsCSSFontFeatureValuesRule *fontFeatureValuesRule =
-      static_cast<nsCSSFontFeatureValuesRule*>(aRule);
-    if (!data->mFontFeatureValuesRules.AppendElement(fontFeatureValuesRule)) {
-      return false;
-    }
-  }
   else if (css::Rule::PAGE_RULE == type) {
     nsCSSPageRule* pageRule = static_cast<nsCSSPageRule*>(aRule);
     if (!data->mPageRules.AppendElement(pageRule)) {
       return false;
     }
   }
   return true;
 }
@@ -3276,17 +3247,16 @@ nsCSSRuleProcessor::RefreshRuleCascade(n
 
   if (mSheets.Length() != 0) {
     nsAutoPtr<RuleCascadeData> newCascade(
       new RuleCascadeData(aPresContext->Medium(),
                           eCompatibility_NavQuirks == aPresContext->CompatibilityMode()));
     if (newCascade) {
       CascadeEnumData data(aPresContext, newCascade->mFontFaceRules,
                            newCascade->mKeyframesRules,
-                           newCascade->mFontFeatureValuesRules,
                            newCascade->mPageRules,
                            newCascade->mCacheKey,
                            mSheetType);
       if (!data.mRulesByWeight.ops)
         return; /* out of memory */
 
       for (uint32_t i = 0; i < mSheets.Length(); ++i) {
         if (!CascadeSheet(mSheets.ElementAt(i), &data))
--- a/layout/style/nsCSSRuleProcessor.h
+++ b/layout/style/nsCSSRuleProcessor.h
@@ -123,19 +123,16 @@ public:
                            nsTArray<nsFontFaceRuleContainer>& aArray);
 
   bool AppendKeyframesRules(nsPresContext* aPresContext,
                             nsTArray<nsCSSKeyframesRule*>& aArray);
 
   bool AppendPageRules(nsPresContext* aPresContext,
                        nsTArray<nsCSSPageRule*>& aArray);
 
-  bool AppendFontFeatureValuesRules(nsPresContext* aPresContext,
-                              nsTArray<nsCSSFontFeatureValuesRule*>& aArray);
-
   /**
    * Returns the scope element for the scoped style sheets this rule
    * processor is for.  If this is not a rule processor for scoped style
    * sheets, it returns null.
    */
   mozilla::dom::Element* GetScopeElement() const { return mScopeElement; }
 
 #ifdef DEBUG
--- a/layout/style/nsCSSRules.cpp
+++ b/layout/style/nsCSSRules.cpp
@@ -29,17 +29,16 @@
 #include "nsError.h"
 #include "nsStyleUtil.h"
 #include "mozilla/css/Declaration.h"
 #include "nsCSSParser.h"
 #include "nsPrintfCString.h"
 #include "nsDOMClassInfoID.h"
 #include "mozilla/dom/CSSStyleDeclarationBinding.h"
 #include "StyleRule.h"
-#include "nsFont.h"
 
 using namespace mozilla;
 
 #define IMPL_STYLE_RULE_INHERIT_GET_DOM_RULE_WEAK(class_, super_) \
   /* virtual */ nsIDOMCSSRule* class_::GetDOMRule()               \
   { return this; }                                                \
   /* virtual */ nsIDOMCSSRule* class_::GetExistingDOMRule()       \
   { return this; }
@@ -714,17 +713,17 @@ GroupRule::AppendRulesToCssText(nsAStrin
       domRule->GetCssText(cssText);
       aCssText.Append(NS_LITERAL_STRING("  ") +
                       cssText +
                       NS_LITERAL_STRING("\n"));
     }
   }
 
   aCssText.AppendLiteral("}");
-
+  
   return NS_OK;
 }
 
 // nsIDOMCSSMediaRule or nsIDOMCSSMozDocumentRule methods
 nsresult
 GroupRule::GetCssRules(nsIDOMCSSRuleList* *aRuleList)
 {
   if (!mRuleCollection) {
@@ -1906,265 +1905,16 @@ nsCSSFontFaceRule::SizeOfIncludingThis(n
   return aMallocSizeOf(this);
 
   // Measurement of the following members may be added later if DMD finds it is
   // worthwhile:
   // - mDecl
 }
 
 
-// -----------------------------------
-// nsCSSFontFeatureValuesRule
-//
-
-/* virtual */ already_AddRefed<css::Rule>
-nsCSSFontFeatureValuesRule::Clone() const
-{
-  nsRefPtr<css::Rule> clone = new nsCSSFontFeatureValuesRule(*this);
-  return clone.forget();
-}
-
-NS_IMPL_ADDREF(nsCSSFontFeatureValuesRule)
-NS_IMPL_RELEASE(nsCSSFontFeatureValuesRule)
-
-DOMCI_DATA(CSSFontFeatureValuesRule, nsCSSFontFeatureValuesRule)
-
-// QueryInterface implementation for nsCSSFontFeatureValuesRule
-NS_INTERFACE_MAP_BEGIN(nsCSSFontFeatureValuesRule)
-  NS_INTERFACE_MAP_ENTRY(nsIStyleRule)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMCSSFontFeatureValuesRule)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMCSSRule)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStyleRule)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSFontFeatureValuesRule)
-NS_INTERFACE_MAP_END
-
-IMPL_STYLE_RULE_INHERIT(nsCSSFontFeatureValuesRule, Rule)
-
-static void
-FamilyListToString(const nsTArray<nsString>& aFamilyList, nsAString& aOutStr)
-{
-  uint32_t i, n = aFamilyList.Length();
-
-  for (i = 0; i < n; i++) {
-    nsStyleUtil::AppendEscapedCSSString(aFamilyList[i], aOutStr);
-    if (i != n - 1) {
-      aOutStr.AppendLiteral(", ");
-    }
-  }
-}
-
-static void
-FeatureValuesToString(
-  const nsTArray<gfxFontFeatureValueSet::FeatureValues>& aFeatureValues,
-  nsAString& aOutStr)
-{
-  uint32_t i, n;
-
-  // append values
-  n = aFeatureValues.Length();
-  for (i = 0; i < n; i++) {
-    const gfxFontFeatureValueSet::FeatureValues& fv = aFeatureValues[i];
-
-    // @alternate
-    aOutStr.AppendLiteral("  @");
-    nsAutoString functAlt;
-    nsStyleUtil::GetFunctionalAlternatesName(fv.alternate, functAlt);
-    aOutStr.Append(functAlt);
-    aOutStr.AppendLiteral(" {");
-
-    // for each ident-values tuple
-    uint32_t j, numValues = fv.valuelist.Length();
-    for (j = 0; j < numValues; j++) {
-      aOutStr.AppendLiteral(" ");
-      const gfxFontFeatureValueSet::ValueList& vlist = fv.valuelist[j];
-      nsStyleUtil::AppendEscapedCSSIdent(vlist.name, aOutStr);
-      aOutStr.AppendLiteral(":");
-
-      uint32_t k, numSelectors = vlist.featureSelectors.Length();
-      for (k = 0; k < numSelectors; k++) {
-        aOutStr.AppendLiteral(" ");
-        aOutStr.AppendInt(vlist.featureSelectors[k]);
-      }
-
-      aOutStr.AppendLiteral(";");
-    }
-    aOutStr.AppendLiteral(" }\n");
-  }
-}
-
-static void
-FontFeatureValuesRuleToString(
-  const nsTArray<nsString>& aFamilyList,
-  const nsTArray<gfxFontFeatureValueSet::FeatureValues>& aFeatureValues,
-  nsAString& aOutStr)
-{
-  aOutStr.AssignLiteral("@font-feature-values ");
-  nsAutoString familyListStr, valueTextStr;
-  FamilyListToString(aFamilyList, familyListStr);
-  aOutStr.Append(familyListStr);
-  aOutStr.AppendLiteral(" {\n");
-  FeatureValuesToString(aFeatureValues, valueTextStr);
-  aOutStr.Append(valueTextStr);
-  aOutStr.AppendLiteral("}");
-}
-
-#ifdef DEBUG
-void
-nsCSSFontFeatureValuesRule::List(FILE* out, int32_t aIndent) const
-{
-  nsAutoString text;
-  FontFeatureValuesRuleToString(mFamilyList, mFeatureValues, text);
-  NS_ConvertUTF16toUTF8 utf8(text);
-
-  // replace newlines with newlines plus indent spaces
-  char* indent = new char[(aIndent + 1) * 2];
-  int32_t i;
-  for (i = 1; i < (aIndent + 1) * 2 - 1; i++) {
-    indent[i] = 0x20;
-  }
-  indent[0] = 0xa;
-  indent[aIndent * 2 + 1] = 0;
-  utf8.ReplaceSubstring("\n", indent);
-  delete [] indent;
-
-  for (i = aIndent; --i >= 0; ) fputs("  ", out);
-  fprintf(out, "%s\n", utf8.get());
-}
-#endif
-
-/* virtual */ int32_t
-nsCSSFontFeatureValuesRule::GetType() const
-{
-  return Rule::FONT_FEATURE_VALUES_RULE;
-}
-
-NS_IMETHODIMP
-nsCSSFontFeatureValuesRule::GetType(uint16_t* aType)
-{
-  *aType = nsIDOMCSSRule::FONT_FEATURE_VALUES_RULE;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsCSSFontFeatureValuesRule::GetCssText(nsAString& aCssText)
-{
-  FontFeatureValuesRuleToString(mFamilyList, mFeatureValues, aCssText);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsCSSFontFeatureValuesRule::SetCssText(const nsAString& aCssText)
-{
-  // FIXME: implement???
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-nsCSSFontFeatureValuesRule::GetParentStyleSheet(nsIDOMCSSStyleSheet** aSheet)
-{
-  return Rule::GetParentStyleSheet(aSheet);
-}
-
-NS_IMETHODIMP
-nsCSSFontFeatureValuesRule::GetParentRule(nsIDOMCSSRule** aParentRule)
-{
-  return Rule::GetParentRule(aParentRule);
-}
-
-NS_IMETHODIMP
-nsCSSFontFeatureValuesRule::GetFontFamily(nsAString& aFontFamily)
-{
-  FamilyListToString(mFamilyList, aFontFamily);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsCSSFontFeatureValuesRule::SetFontFamily(const nsAString& aFontFamily)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-nsCSSFontFeatureValuesRule::GetValueText(nsAString& aValueText)
-{
-  FeatureValuesToString(mFeatureValues, aValueText);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsCSSFontFeatureValuesRule::SetValueText(const nsAString& aValueText)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-struct MakeFamilyArray {
-  MakeFamilyArray(nsTArray<nsString>& aFamilyArray)
-    : familyArray(aFamilyArray), hasGeneric(false)
-  {}
-
-  static bool
-  AddFamily(const nsString& aFamily, bool aGeneric, void* aData)
-  {
-    MakeFamilyArray *familyArr = reinterpret_cast<MakeFamilyArray*> (aData);
-    if (!aGeneric && !aFamily.IsEmpty()) {
-      familyArr->familyArray.AppendElement(aFamily);
-    }
-    if (aGeneric) {
-      familyArr->hasGeneric = true;
-    }
-    return true;
-  }
-
-  nsTArray<nsString>& familyArray;
-  bool hasGeneric;
-};
-
-void
-nsCSSFontFeatureValuesRule::SetFamilyList(const nsAString& aFamilyList,
-                                          bool& aContainsGeneric)
-{
-  nsFont font(aFamilyList, 0, 0, 0, 0, 0, 0);
-  MakeFamilyArray families(mFamilyList);
-  font.EnumerateFamilies(MakeFamilyArray::AddFamily, (void*) &families);
-  aContainsGeneric = families.hasGeneric;
-}
-
-void
-nsCSSFontFeatureValuesRule::AddValueList(int32_t aVariantAlternate,
-                     nsTArray<gfxFontFeatureValueSet::ValueList>& aValueList)
-{
-  uint32_t i, len = mFeatureValues.Length();
-  bool foundAlternate = false;
-
-  // add to an existing list for a given property value
-  for (i = 0; i < len; i++) {
-    gfxFontFeatureValueSet::FeatureValues& f = mFeatureValues.ElementAt(i);
-
-    if (f.alternate == uint32_t(aVariantAlternate)) {
-      f.valuelist.AppendElements(aValueList);
-      foundAlternate = true;
-      break;
-    }
-  }
-
-  // create a new list for a given property value
-  if (!foundAlternate) {
-    gfxFontFeatureValueSet::FeatureValues &f = *mFeatureValues.AppendElement();
-    f.alternate = aVariantAlternate;
-    f.valuelist.AppendElements(aValueList);
-  }
-}
-
-size_t
-nsCSSFontFeatureValuesRule::SizeOfIncludingThis(
-  nsMallocSizeOfFun aMallocSizeOf) const
-{
-  return aMallocSizeOf(this);
-}
-
 // -------------------------------------------
 // nsCSSKeyframeStyleDeclaration
 //
 
 nsCSSKeyframeStyleDeclaration::nsCSSKeyframeStyleDeclaration(nsCSSKeyframeRule *aRule)
   : mRule(aRule)
 {
 }
--- a/layout/style/nsCSSRules.h
+++ b/layout/style/nsCSSRules.h
@@ -10,34 +10,32 @@
 #define nsCSSRules_h_
 
 #include "mozilla/Attributes.h"
 
 #include "mozilla/css/GroupRule.h"
 #include "mozilla/Preferences.h"
 #include "nsIDOMCSSConditionRule.h"
 #include "nsIDOMCSSFontFaceRule.h"
-#include "nsIDOMCSSFontFeatureValuesRule.h"
 #include "nsIDOMCSSGroupingRule.h"
 #include "nsIDOMCSSMediaRule.h"
 #include "nsIDOMCSSMozDocumentRule.h"
 #include "nsIDOMCSSSupportsRule.h"
 #include "nsIDOMMozCSSKeyframeRule.h"
 #include "nsIDOMMozCSSKeyframesRule.h"
 #include "nsIDOMCSSStyleDeclaration.h"
 #include "nsAutoPtr.h"
 #include "nsCSSProperty.h"
 #include "nsCSSValue.h"
 #include "nsIDOMCSSCharsetRule.h"
 #include "nsTArray.h"
 #include "nsDOMCSSDeclaration.h"
 #include "Declaration.h"
 #include "nsIDOMCSSPageRule.h"
 #include "StyleRule.h"
-#include "gfxFontFeatures.h"
 
 class nsMediaList;
 
 namespace mozilla {
 
 class ErrorResult;
 
 namespace css {
@@ -209,17 +207,17 @@ public:
                                JS::Handle<JSObject*> scope) MOZ_OVERRIDE;
 
 protected:
   friend class nsCSSFontFaceRule;
 #define CSS_FONT_DESC(name_, method_) nsCSSValue m##method_;
 #include "nsCSSFontDescList.h"
 #undef CSS_FONT_DESC
 
-  static nsCSSValue nsCSSFontFaceStyleDecl::* const Fields[];
+  static nsCSSValue nsCSSFontFaceStyleDecl::* const Fields[];  
   inline nsCSSFontFaceRule* ContainingRule();
   inline const nsCSSFontFaceRule* ContainingRule() const;
 
 private:
   // NOT TO BE IMPLEMENTED
   // This object cannot be allocated on its own, only as part of
   // nsCSSFontFaceRule.
   void* operator new(size_t size) CPP_THROW_NEW;
@@ -261,17 +259,17 @@ public:
 
   virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const MOZ_OVERRIDE;
 
 protected:
   friend class nsCSSFontFaceStyleDecl;
   nsCSSFontFaceStyleDecl mDecl;
 };
 
-// nsFontFaceRuleContainer - used for associating sheet type with
+// nsFontFaceRuleContainer - used for associating sheet type with 
 // specific @font-face rules
 struct nsFontFaceRuleContainer {
   nsRefPtr<nsCSSFontFaceRule> mRule;
   uint8_t mSheetType;
 };
 
 inline nsCSSFontFaceRule*
 nsCSSFontFaceStyleDecl::ContainingRule()
@@ -282,71 +280,16 @@ nsCSSFontFaceStyleDecl::ContainingRule()
 
 inline const nsCSSFontFaceRule*
 nsCSSFontFaceStyleDecl::ContainingRule() const
 {
   return reinterpret_cast<const nsCSSFontFaceRule*>
     (reinterpret_cast<const char*>(this) - offsetof(nsCSSFontFaceRule, mDecl));
 }
 
-class nsCSSFontFeatureValuesRule MOZ_FINAL :
-                                       public mozilla::css::Rule,
-                                       public nsIDOMCSSFontFeatureValuesRule
-{
-public:
-  nsCSSFontFeatureValuesRule() {}
-
-  nsCSSFontFeatureValuesRule(const nsCSSFontFeatureValuesRule& aCopy)
-    // copy everything except our reference count
-    : mozilla::css::Rule(aCopy),
-      mFamilyList(aCopy.mFamilyList),
-      mFeatureValues(aCopy.mFeatureValues) {}
-
-  NS_DECL_ISUPPORTS
-
-  // nsIStyleRule methods
-#ifdef DEBUG
-  virtual void List(FILE* out = stdout, int32_t aIndent = 0) const MOZ_OVERRIDE;
-#endif
-
-  // Rule methods
-  DECL_STYLE_RULE_INHERIT
-
-  virtual int32_t GetType() const MOZ_OVERRIDE;
-  virtual already_AddRefed<mozilla::css::Rule> Clone() const MOZ_OVERRIDE;
-
-  // nsIDOMCSSRule interface
-  NS_DECL_NSIDOMCSSRULE
-
-  // nsIDOMCSSFontFaceRule interface
-  NS_DECL_NSIDOMCSSFONTFEATUREVALUESRULE
-
-  const nsTArray<nsString>& GetFamilyList() { return mFamilyList; }
-  void SetFamilyList(const nsAString& aFamilyList, bool& aContainsGeneric);
-
-  void AddValueList(int32_t aVariantAlternate,
-                    nsTArray<gfxFontFeatureValueSet::ValueList>& aValueList);
-
-  const nsTArray<gfxFontFeatureValueSet::FeatureValues>& GetFeatureValues()
-  {
-    return mFeatureValues;
-  }
-
-  virtual size_t SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const;
-
-  static bool PrefEnabled()
-  {
-    return mozilla::Preferences::GetBool("layout.css.font-features.enabled");
-  }
-
-protected:
-  nsTArray<nsString> mFamilyList;
-  nsTArray<gfxFontFeatureValueSet::FeatureValues> mFeatureValues;
-};
-
 namespace mozilla {
 namespace css {
 
 class CharsetRule MOZ_FINAL : public Rule,
                               public nsIDOMCSSCharsetRule
 {
 public:
   CharsetRule(const nsAString& aEncoding);
--- a/layout/style/nsCSSValue.cpp
+++ b/layout/style/nsCSSValue.cpp
@@ -801,87 +801,54 @@ nsCSSValue::AppendToString(nsCSSProperty
     NS_ABORT_IF_FALSE(GetUnit() == eCSSUnit_Calc, "unexpected unit");
     CSSValueSerializeCalcOps ops(aProperty, aResult);
     css::SerializeCalc(*this, ops);
   }
   else if (eCSSUnit_Integer == unit) {
     aResult.AppendInt(GetIntValue(), 10);
   }
   else if (eCSSUnit_Enumerated == unit) {
-    int32_t intValue = GetIntValue();
-    switch(aProperty) {
-
-    case eCSSProperty_text_decoration_line:
+    if (eCSSProperty_text_decoration_line == aProperty) {
+      int32_t intValue = GetIntValue();
       if (NS_STYLE_TEXT_DECORATION_LINE_NONE == intValue) {
         AppendASCIItoUTF16(nsCSSProps::LookupPropertyValue(aProperty, intValue),
                            aResult);
       } else {
         // Ignore the "override all" internal value.
         // (It doesn't have a string representation.)
         intValue &= ~NS_STYLE_TEXT_DECORATION_LINE_OVERRIDE_ALL;
         nsStyleUtil::AppendBitmaskCSSValue(
           aProperty, intValue,
           NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE,
           NS_STYLE_TEXT_DECORATION_LINE_PREF_ANCHORS,
           aResult);
       }
-      break;
-
-    case eCSSProperty_marks:
+    }
+    else if (eCSSProperty_marks == aProperty) {
+      int32_t intValue = GetIntValue();
       if (intValue == NS_STYLE_PAGE_MARKS_NONE) {
         AppendASCIItoUTF16(nsCSSProps::LookupPropertyValue(aProperty, intValue),
                            aResult);
       } else {
         nsStyleUtil::AppendBitmaskCSSValue(aProperty, intValue,
                                            NS_STYLE_PAGE_MARKS_CROP,
                                            NS_STYLE_PAGE_MARKS_REGISTER,
                                            aResult);
       }
-      break;
-
-    case eCSSProperty_paint_order:
+    }
+    else if (eCSSProperty_paint_order == aProperty) {
       MOZ_STATIC_ASSERT
         (NS_STYLE_PAINT_ORDER_BITWIDTH * NS_STYLE_PAINT_ORDER_LAST_VALUE <= 8,
          "SVGStyleStruct::mPaintOrder and the following cast not big enough");
       nsStyleUtil::AppendPaintOrderValue(static_cast<uint8_t>(GetIntValue()),
                                          aResult);
-      break;
-
-    case eCSSProperty_font_synthesis:
-      nsStyleUtil::AppendBitmaskCSSValue(aProperty, intValue,
-                                         NS_FONT_SYNTHESIS_WEIGHT,
-                                         NS_FONT_SYNTHESIS_STYLE,
-                                         aResult);
-      break;
-
-    case eCSSProperty_font_variant_east_asian:
-      nsStyleUtil::AppendBitmaskCSSValue(aProperty, intValue,
-                                         NS_FONT_VARIANT_EAST_ASIAN_JIS78,
-                                         NS_FONT_VARIANT_EAST_ASIAN_RUBY,
-                                         aResult);
-      break;
-
-    case eCSSProperty_font_variant_ligatures:
-      nsStyleUtil::AppendBitmaskCSSValue(aProperty, intValue,
-                                         NS_FONT_VARIANT_LIGATURES_COMMON,
-                                         NS_FONT_VARIANT_LIGATURES_NO_CONTEXTUAL,
-                                         aResult);
-      break;
-
-    case eCSSProperty_font_variant_numeric:
-      nsStyleUtil::AppendBitmaskCSSValue(aProperty, intValue,
-                                         NS_FONT_VARIANT_NUMERIC_LINING,
-                                         NS_FONT_VARIANT_NUMERIC_ORDINAL,
-                                         aResult);
-      break;
-
-    default:
-      const nsAFlatCString& name = nsCSSProps::LookupPropertyValue(aProperty, intValue);
+    }
+    else {
+      const nsAFlatCString& name = nsCSSProps::LookupPropertyValue(aProperty, GetIntValue());
       AppendASCIItoUTF16(name, aResult);
-      break;
     }
   }
   else if (eCSSUnit_EnumColor == unit) {
     // we can lookup the property in the ColorTable and then
     // get a string mapping the name
     nsAutoCString str;
     if (nsCSSProps::GetColorName(GetIntValue(), str)){
       AppendASCIItoUTF16(str, aResult);
@@ -1085,37 +1052,17 @@ nsCSSValue::AppendToString(nsCSSProperty
       if (++i == gradient->mStops.Length()) {
         break;
       }
       aResult.AppendLiteral(", ");
     }
 
     aResult.AppendLiteral(")");
   } else if (eCSSUnit_Pair == unit) {
-    if (eCSSProperty_font_variant_alternates == aProperty) {
-      int32_t intValue = GetPairValue().mXValue.GetIntValue();
-      nsAutoString out;
-
-      // simple, enumerated values
-      nsStyleUtil::AppendBitmaskCSSValue(aProperty,
-          intValue & NS_FONT_VARIANT_ALTERNATES_ENUMERATED_MASK,
-          NS_FONT_VARIANT_ALTERNATES_HISTORICAL,
-          NS_FONT_VARIANT_ALTERNATES_HISTORICAL,
-          out);
-
-      // functional values
-      const nsCSSValueList *list = GetPairValue().mYValue.GetListValue();
-      nsAutoTArray<gfxAlternateValue,8> altValues;
-
-      nsStyleUtil::ComputeFunctionalAlternates(list, altValues);
-      nsStyleUtil::SerializeFunctionalAlternates(altValues, out);
-      aResult.Append(out);
-    } else {
-      GetPairValue().AppendToString(aProperty, aResult);
-    }
+    GetPairValue().AppendToString(aProperty, aResult);
   } else if (eCSSUnit_Triplet == unit) {
     GetTripletValue().AppendToString(aProperty, aResult);
   } else if (eCSSUnit_Rect == unit) {
     GetRectValue().AppendToString(aProperty, aResult);
   } else if (eCSSUnit_List == unit || eCSSUnit_ListDep == unit) {
     GetListValue()->AppendToString(aProperty, aResult);
   } else if (eCSSUnit_PairList == unit || eCSSUnit_PairListDep == unit) {
     switch (aProperty) {
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -1328,193 +1328,32 @@ nsComputedDOMStyle::DoGetFontFeatureSett
     nsStyleUtil::AppendFontFeatureSettings(font->mFont.fontFeatureSettings,
                                            result);
     val->SetString(result);
   }
   return val;
 }
 
 CSSValue*
-nsComputedDOMStyle::DoGetFontKerning()
-{
-  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
-  val->SetIdent(
-    nsCSSProps::ValueToKeywordEnum(StyleFont()->mFont.kerning,
-                                   nsCSSProps::kFontKerningKTable));
-  return val;
-}
-
-CSSValue*
 nsComputedDOMStyle::DoGetFontLanguageOverride()
 {
   nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
 
   const nsStyleFont* font = StyleFont();
   if (font->mFont.languageOverride.IsEmpty()) {
     val->SetIdent(eCSSKeyword_normal);
   } else {
     nsString str;
     nsStyleUtil::AppendEscapedCSSString(font->mFont.languageOverride, str);
     val->SetString(str);
   }
   return val;
 }
 
 CSSValue*
-nsComputedDOMStyle::DoGetFontSynthesis()
-{
-  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
-
-  int32_t intValue = StyleFont()->mFont.synthesis;
-
-  if (0 == intValue) {
-    val->SetIdent(eCSSKeyword_none);
-  } else {
-    nsAutoString valueStr;
-
-    nsStyleUtil::AppendBitmaskCSSValue(eCSSProperty_font_synthesis,
-      intValue, NS_FONT_SYNTHESIS_WEIGHT,
-      NS_FONT_SYNTHESIS_STYLE, valueStr);
-    val->SetString(valueStr);
-  }
-
-  return val;
-}
-
-CSSValue*
-nsComputedDOMStyle::DoGetFontVariantAlternates()
-{
-  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
-
-  int32_t intValue = StyleFont()->mFont.variantAlternates;
-
-  if (0 == intValue) {
-    val->SetIdent(eCSSKeyword_normal);
-    return val;
-  }
-
-  // first, include enumerated values
-  nsAutoString valueStr;
-
-  nsStyleUtil::AppendBitmaskCSSValue(eCSSProperty_font_variant_alternates,
-    intValue & NS_FONT_VARIANT_ALTERNATES_ENUMERATED_MASK,
-    NS_FONT_VARIANT_ALTERNATES_HISTORICAL,
-    NS_FONT_VARIANT_ALTERNATES_HISTORICAL, valueStr);
-
-  // next, include functional values if present
-  if (intValue & NS_FONT_VARIANT_ALTERNATES_FUNCTIONAL_MASK) {
-    nsStyleUtil::SerializeFunctionalAlternates(StyleFont()->mFont.alternateValues,
-                                               valueStr);
-  }
-
-  val->SetString(valueStr);
-  return val;
-}
-
-
-CSSValue*
-nsComputedDOMStyle::DoGetFontVariantCaps()
-{
-  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
-
-  int32_t intValue = StyleFont()->mFont.variantCaps;
-
-  if (0 == intValue) {
-    val->SetIdent(eCSSKeyword_normal);
-  } else {
-    val->SetIdent(
-      nsCSSProps::ValueToKeywordEnum(intValue,
-                                     nsCSSProps::kFontVariantCapsKTable));
-  }
-
-  return val;
-}
-
-CSSValue*
-nsComputedDOMStyle::DoGetFontVariantEastAsian()
-{
-  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
-
-  int32_t intValue = StyleFont()->mFont.variantEastAsian;
-
-  if (0 == intValue) {
-    val->SetIdent(eCSSKeyword_normal);
-  } else {
-    nsAutoString valueStr;
-
-    nsStyleUtil::AppendBitmaskCSSValue(eCSSProperty_font_variant_east_asian,
-      intValue, NS_FONT_VARIANT_EAST_ASIAN_JIS78,
-      NS_FONT_VARIANT_EAST_ASIAN_RUBY, valueStr);
-    val->SetString(valueStr);
-  }
-
-  return val;
-}
-
-CSSValue*
-nsComputedDOMStyle::DoGetFontVariantLigatures()
-{
-  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
-
-  int32_t intValue = StyleFont()->mFont.variantLigatures;
-
-  if (0 == intValue) {
-    val->SetIdent(eCSSKeyword_normal);
-  } else {
-    nsAutoString valueStr;
-
-    nsStyleUtil::AppendBitmaskCSSValue(eCSSProperty_font_variant_ligatures,
-      intValue, NS_FONT_VARIANT_LIGATURES_COMMON,
-      NS_FONT_VARIANT_LIGATURES_NO_CONTEXTUAL, valueStr);
-    val->SetString(valueStr);
-  }
-
-  return val;
-}
-
-CSSValue*
-nsComputedDOMStyle::DoGetFontVariantNumeric()
-{
-  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
-
-  int32_t intValue = StyleFont()->mFont.variantNumeric;
-
-  if (0 == intValue) {
-    val->SetIdent(eCSSKeyword_normal);
-  } else {
-    nsAutoString valueStr;
-
-    nsStyleUtil::AppendBitmaskCSSValue(eCSSProperty_font_variant_numeric,
-      intValue, NS_FONT_VARIANT_NUMERIC_LINING,
-      NS_FONT_VARIANT_NUMERIC_ORDINAL, valueStr);
-    val->SetString(valueStr);
-  }
-
-  return val;
-}
-
-CSSValue*
-nsComputedDOMStyle::DoGetFontVariantPosition()
-{
-  nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
-
-  int32_t intValue = StyleFont()->mFont.variantPosition;
-
-  if (0 == intValue) {
-    val->SetIdent(eCSSKeyword_normal);
-  } else {
-    val->SetIdent(
-      nsCSSProps::ValueToKeywordEnum(intValue,
-                                     nsCSSProps::kFontVariantPositionKTable));
-  }
-
-  return val;
-}
-
-CSSValue*
 nsComputedDOMStyle::GetBackgroundList(uint8_t nsStyleBackground::Layer::* aMember,
                                       uint32_t nsStyleBackground::* aCount,
                                       const int32_t aTable[])
 {
   const nsStyleBackground* bg = StyleBackground();
 
   nsDOMCSSValueList *valueList = GetROCSSValueList(true);
 
@@ -4917,29 +4756,21 @@ nsComputedDOMStyle::GetQueryableProperty
     COMPUTED_STYLE_MAP_ENTRY(flex_basis,                    FlexBasis),
     COMPUTED_STYLE_MAP_ENTRY(flex_direction,                FlexDirection),
     COMPUTED_STYLE_MAP_ENTRY(flex_grow,                     FlexGrow),
     COMPUTED_STYLE_MAP_ENTRY(flex_shrink,                   FlexShrink),
 #endif // MOZ_FLEXBOX
     COMPUTED_STYLE_MAP_ENTRY(float,                         Float),
     //// COMPUTED_STYLE_MAP_ENTRY(font,                     Font),
     COMPUTED_STYLE_MAP_ENTRY(font_family,                   FontFamily),
-    COMPUTED_STYLE_MAP_ENTRY(font_kerning,                  FontKerning),
     COMPUTED_STYLE_MAP_ENTRY(font_size,                     FontSize),
     COMPUTED_STYLE_MAP_ENTRY(font_size_adjust,              FontSizeAdjust),
     COMPUTED_STYLE_MAP_ENTRY(font_stretch,                  FontStretch),
     COMPUTED_STYLE_MAP_ENTRY(font_style,                    FontStyle),
-    COMPUTED_STYLE_MAP_ENTRY(font_synthesis,                FontSynthesis),
     COMPUTED_STYLE_MAP_ENTRY(font_variant,                  FontVariant),
-    COMPUTED_STYLE_MAP_ENTRY(font_variant_alternates,       FontVariantAlternates),
-    COMPUTED_STYLE_MAP_ENTRY(font_variant_caps,             FontVariantCaps),
-    COMPUTED_STYLE_MAP_ENTRY(font_variant_east_asian,       FontVariantEastAsian),
-    COMPUTED_STYLE_MAP_ENTRY(font_variant_ligatures,        FontVariantLigatures),
-    COMPUTED_STYLE_MAP_ENTRY(font_variant_numeric,          FontVariantNumeric),
-    COMPUTED_STYLE_MAP_ENTRY(font_variant_position,         FontVariantPosition),
     COMPUTED_STYLE_MAP_ENTRY(font_weight,                   FontWeight),
     COMPUTED_STYLE_MAP_ENTRY_LAYOUT(height,                 Height),
     COMPUTED_STYLE_MAP_ENTRY(ime_mode,                      IMEMode),
 #ifdef MOZ_FLEXBOX
     COMPUTED_STYLE_MAP_ENTRY(justify_content,               JustifyContent),
 #endif // MOZ_FLEXBOX
     COMPUTED_STYLE_MAP_ENTRY_LAYOUT(left,                   Left),
     COMPUTED_STYLE_MAP_ENTRY(letter_spacing,                LetterSpacing),
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -183,31 +183,23 @@ private:
   mozilla::dom::CSSValue* DoGetRight();
   mozilla::dom::CSSValue* DoGetBottom();
   mozilla::dom::CSSValue* DoGetStackSizing();
 
   /* Font properties */
   mozilla::dom::CSSValue* DoGetColor();
   mozilla::dom::CSSValue* DoGetFontFamily();
   mozilla::dom::CSSValue* DoGetFontFeatureSettings();
-  mozilla::dom::CSSValue* DoGetFontKerning();
   mozilla::dom::CSSValue* DoGetFontLanguageOverride();
   mozilla::dom::CSSValue* DoGetFontSize();
   mozilla::dom::CSSValue* DoGetFontSizeAdjust();
   mozilla::dom::CSSValue* DoGetFontStretch();
   mozilla::dom::CSSValue* DoGetFontStyle();
-  mozilla::dom::CSSValue* DoGetFontSynthesis();
+  mozilla::dom::CSSValue* DoGetFontWeight();
   mozilla::dom::CSSValue* DoGetFontVariant();
-  mozilla::dom::CSSValue* DoGetFontVariantAlternates();
-  mozilla::dom::CSSValue* DoGetFontVariantCaps();
-  mozilla::dom::CSSValue* DoGetFontVariantEastAsian();
-  mozilla::dom::CSSValue* DoGetFontVariantLigatures();
-  mozilla::dom::CSSValue* DoGetFontVariantNumeric();
-  mozilla::dom::CSSValue* DoGetFontVariantPosition();
-  mozilla::dom::CSSValue* DoGetFontWeight();
 
   /* Background properties */
   mozilla::dom::CSSValue* DoGetBackgroundAttachment();
   mozilla::dom::CSSValue* DoGetBackgroundColor();
   mozilla::dom::CSSValue* DoGetBackgroundImage();
   mozilla::dom::CSSValue* DoGetBackgroundPosition();
   mozilla::dom::CSSValue* DoGetBackgroundRepeat();
   mozilla::dom::CSSValue* DoGetBackgroundClip();
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -34,17 +34,16 @@
 #include "nsBidiUtils.h"
 #include "nsStyleStructInlines.h"
 #include "nsCSSProps.h"
 #include "nsTArray.h"
 #include "nsContentUtils.h"
 #include "CSSCalc.h"
 #include "nsPrintfCString.h"
 #include "nsRenderingContext.h"
-#include "nsStyleUtil.h"
 
 #include "mozilla/LookAndFeel.h"
 
 #if defined(_MSC_VER) || defined(__MINGW32__)
 #include <malloc.h>
 #ifdef _MSC_VER
 #define alloca _alloca
 #endif
@@ -3269,119 +3268,16 @@ nsRuleNode::SetFont(nsPresContext* aPres
   else if (eCSSUnit_Inherit == scriptLevelValue->GetUnit()) {
     aCanStoreInRuleTree = false;
     aFont->mScriptLevel = aParentFont->mScriptLevel;
   }
   else if (eCSSUnit_Initial == scriptLevelValue->GetUnit()) {
     aFont->mScriptLevel = 0;
   }
 
-  // font-kerning: none, enum, inherit, initial, -moz-system-font
-  SetDiscrete(*aRuleData->ValueForFontKerning(),
-              aFont->mFont.kerning, aCanStoreInRuleTree,
-              SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT,
-              aParentFont->mFont.kerning,
-              defaultVariableFont->kerning,
-              0, 0, 0, systemFont.kerning);
-
-  // font-synthesis: none, enum (bit field), inherit, initial, -moz-system-font
-  SetDiscrete(*aRuleData->ValueForFontSynthesis(),
-              aFont->mFont.synthesis, aCanStoreInRuleTree,
-              SETDSC_NONE | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT,
-              aParentFont->mFont.synthesis,
-              defaultVariableFont->synthesis,
-              0, 0, 0, systemFont.synthesis);
-
-  // font-variant-alternates: normal, enum (bit field) + functions, inherit,
-  //                          initial, -moz-system-font
-  const nsCSSValue* variantAlternatesValue =
-    aRuleData->ValueForFontVariantAlternates();
-  int32_t variantAlternates = 0;
-
-  switch (variantAlternatesValue->GetUnit()) {
-  case eCSSUnit_Inherit:
-    aFont->mFont.CopyAlternates(aParentFont->mFont);
-    aCanStoreInRuleTree = false;
-    break;
-
-  case eCSSUnit_Initial:
-  case eCSSUnit_Normal:
-    aFont->mFont.variantAlternates = 0;
-    aFont->mFont.alternateValues.Clear();
-    aFont->mFont.featureValueLookup = nullptr;
-    break;
-
-  case eCSSUnit_Pair:
-    NS_ASSERTION(variantAlternatesValue->GetPairValue().mXValue.GetUnit() ==
-                   eCSSUnit_Enumerated, "strange unit for variantAlternates");
-    variantAlternates =
-      variantAlternatesValue->GetPairValue().mXValue.GetIntValue();
-    aFont->mFont.variantAlternates = variantAlternates;
-
-    if (variantAlternates & NS_FONT_VARIANT_ALTERNATES_FUNCTIONAL_MASK) {
-      // fetch the feature lookup object from the styleset
-      aFont->mFont.featureValueLookup =
-        aPresContext->StyleSet()->GetFontFeatureValuesLookup();
-
-      NS_ASSERTION(variantAlternatesValue->GetPairValue().mYValue.GetUnit() ==
-                   eCSSUnit_List, "function list not a list value");
-      nsStyleUtil::ComputeFunctionalAlternates(
-        variantAlternatesValue->GetPairValue().mYValue.GetListValue(),
-        aFont->mFont.alternateValues);
-    }
-    break;
-
-  default:
-    break;
-  }
-
-  // font-variant-caps: normal, enum, inherit, initial, -moz-system-font
-  SetDiscrete(*aRuleData->ValueForFontVariantCaps(),
-              aFont->mFont.variantCaps, aCanStoreInRuleTree,
-              SETDSC_NORMAL | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT,
-              aParentFont->mFont.variantCaps,
-              defaultVariableFont->variantCaps,
-              0, 0, 0, systemFont.variantCaps);
-
-  // font-variant-east-asian: normal, enum (bit field), inherit, initial,
-  //                          -moz-system-font
-  SetDiscrete(*aRuleData->ValueForFontVariantEastAsian(),
-              aFont->mFont.variantEastAsian, aCanStoreInRuleTree,
-              SETDSC_NORMAL | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT,
-              aParentFont->mFont.variantEastAsian,
-              defaultVariableFont->variantEastAsian,
-              0, 0, 0, systemFont.variantEastAsian);
-
-  // font-variant-ligatures: normal, enum (bit field), inherit, initial,
-  //                         -moz-system-font
-  SetDiscrete(*aRuleData->ValueForFontVariantLigatures(),
-              aFont->mFont.variantLigatures, aCanStoreInRuleTree,
-              SETDSC_NORMAL | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT,
-              aParentFont->mFont.variantLigatures,
-              defaultVariableFont->variantLigatures,
-              0, 0, 0, systemFont.variantLigatures);
-
-  // font-variant-numeric: normal, enum (bit field), inherit, initial,
-  //                       -moz-system-font
-  SetDiscrete(*aRuleData->ValueForFontVariantNumeric(),
-              aFont->mFont.variantNumeric, aCanStoreInRuleTree,
-              SETDSC_NORMAL | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT,
-              aParentFont->mFont.variantNumeric,
-              defaultVariableFont->variantNumeric,
-              0, 0, 0, systemFont.variantNumeric);
-
-  // font-variant-position: normal, enum, inherit, initial,
-  //                        -moz-system-font
-  SetDiscrete(*aRuleData->ValueForFontVariantPosition(),
-              aFont->mFont.variantPosition, aCanStoreInRuleTree,
-              SETDSC_NORMAL | SETDSC_ENUMERATED | SETDSC_SYSTEM_FONT,
-              aParentFont->mFont.variantPosition,
-              defaultVariableFont->variantPosition,
-              0, 0, 0, systemFont.variantPosition);
-
   // font-feature-settings
   const nsCSSValue* featureSettingsValue =
     aRuleData->ValueForFontFeatureSettings();
 
   switch (featureSettingsValue->GetUnit()) {
   case eCSSUnit_Null:
     break;
 
--- a/layout/style/nsStyleSet.cpp
+++ b/layout/style/nsStyleSet.cpp
@@ -105,17 +105,16 @@ static const nsStyleSet::sheetType gCSSS
 };
 
 nsStyleSet::nsStyleSet()
   : mRuleTree(nullptr),
     mBatching(0),
     mInShutdown(false),
     mAuthorStyleDisabled(false),
     mInReconstruct(false),
-    mInitFontFeatureValuesLookup(true),
     mDirty(0),
     mUnusedRuleNodeCount(0)
 {
 }
 
 size_t
 nsStyleSet::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
 {
@@ -1100,17 +1099,17 @@ nsStyleSet::WalkRuleProcessors(nsIStyleR
     (*aFunc)(mRuleProcessors[eAgentSheet], aData);
 
   bool skipUserStyles = aData->mElement->IsInNativeAnonymousSubtree();
   if (!skipUserStyles && mRuleProcessors[eUserSheet]) // NOTE: different
     (*aFunc)(mRuleProcessors[eUserSheet], aData);
 
   if (mRuleProcessors[ePresHintSheet])
     (*aFunc)(mRuleProcessors[ePresHintSheet], aData);
-
+  
   bool cutOffInheritance = false;
   if (mBindingManager) {
     // We can supply additional document-level sheets that should be walked.
     if (aWalkAllXBLStylesheets) {
       mBindingManager->WalkAllRules(aFunc, aData);
     } else {
       mBindingManager->WalkRules(aFunc, aData, &cutOffInheritance);
     }
@@ -1537,69 +1536,16 @@ nsStyleSet::AppendKeyframesRules(nsPresC
                                     (mRuleProcessors[gCSSSheetTypes[i]].get());
     if (ruleProc && !ruleProc->AppendKeyframesRules(aPresContext, aArray))
       return false;
   }
   return true;
 }
 
 bool
-nsStyleSet::AppendFontFeatureValuesRules(nsPresContext* aPresContext,
-                                 nsTArray<nsCSSFontFeatureValuesRule*>& aArray)
-{
-  NS_ENSURE_FALSE(mInShutdown, false);
-
-  for (uint32_t i = 0; i < NS_ARRAY_LENGTH(gCSSSheetTypes); ++i) {
-    nsCSSRuleProcessor *ruleProc = static_cast<nsCSSRuleProcessor*>
-                                    (mRuleProcessors[gCSSSheetTypes[i]].get());
-    if (ruleProc &&
-        !ruleProc->AppendFontFeatureValuesRules(aPresContext, aArray))
-    {
-      return false;
-    }
-  }
-  return true;
-}
-
-already_AddRefed<gfxFontFeatureValueSet>
-nsStyleSet::GetFontFeatureValuesLookup()
-{
-  if (mInitFontFeatureValuesLookup) {
-    mInitFontFeatureValuesLookup = false;
-
-    nsTArray<nsCSSFontFeatureValuesRule*> rules;
-    AppendFontFeatureValuesRules(PresContext(), rules);
-
-    mFontFeatureValuesLookup = new gfxFontFeatureValueSet();
-
-    uint32_t i, numRules = rules.Length();
-    for (i = 0; i < numRules; i++) {
-      nsCSSFontFeatureValuesRule *rule = rules[i];
-
-      const nsTArray<nsString>& familyList = rule->GetFamilyList();
-      const nsTArray<gfxFontFeatureValueSet::FeatureValues>&
-        featureValues = rule->GetFeatureValues();
-
-      // for each family
-      uint32_t f, numFam;
-
-      numFam = familyList.Length();
-      for (f = 0; f < numFam; f++) {
-        const nsString& family = familyList.ElementAt(f);
-        nsAutoString silly(family);
-        mFontFeatureValuesLookup->AddFontFeatureValues(silly, featureValues);
-      }
-    }
-  }
-
-  nsRefPtr<gfxFontFeatureValueSet> lookup = mFontFeatureValuesLookup;
-  return lookup.forget();
-}
-
-bool
 nsStyleSet::AppendPageRules(nsPresContext* aPresContext,
                             nsTArray<nsCSSPageRule*>& aArray)
 {
   NS_ENSURE_FALSE(mInShutdown, false);
 
   for (uint32_t i = 0; i < NS_ARRAY_LENGTH(gCSSSheetTypes); ++i) {
     if (gCSSSheetTypes[i] == eScopedDocSheet)
       continue;
@@ -1861,17 +1807,17 @@ struct MOZ_STACK_CLASS AttributeData : p
   AttributeData(nsPresContext* aPresContext,
                 Element* aElement, nsIAtom* aAttribute, int32_t aModType,
                 bool aAttrHasChanged, TreeMatchContext& aTreeMatchContext)
     : AttributeRuleProcessorData(aPresContext, aElement, aAttribute, aModType,
                                  aAttrHasChanged, aTreeMatchContext),
       mHint(nsRestyleHint(0))
   {}
   nsRestyleHint   mHint;
-};
+}; 
 
 static bool
 SheetHasAttributeStyle(nsIStyleRuleProcessor* aProcessor, void *aData)
 {
   AttributeData* data = (AttributeData*)aData;
   nsRestyleHint hint = aProcessor->HasAttributeDependentStyle(data);
   data->mHint = nsRestyleHint(data->mHint | hint);
   return true; // continue
--- a/layout/style/nsStyleSet.h
+++ b/layout/style/nsStyleSet.h
@@ -18,22 +18,21 @@
 #include "nsCSSStyleSheet.h"
 #include "nsBindingManager.h"
 #include "nsRuleNode.h"
 #include "nsTArray.h"
 #include "nsCOMArray.h"
 #include "nsAutoPtr.h"
 #include "nsIStyleRule.h"
 #include "nsCSSPseudoElements.h"
-#include "gfxFontFeatures.h"
+#include "mozilla/Attributes.h"
 
 class nsIURI;
 class nsCSSFontFaceRule;
 class nsCSSKeyframesRule;
-class nsCSSFontFeatureValuesRule;
 class nsCSSPageRule;
 class nsRuleWalker;
 struct ElementDependentRuleProcessorData;
 struct TreeMatchContext;
 
 class nsEmptyStyleRule MOZ_FINAL : public nsIStyleRule
 {
   NS_DECL_ISUPPORTS
@@ -133,17 +132,17 @@ class nsStyleSet
   ProbePseudoElementStyle(mozilla::dom::Element* aParentElement,
                           nsCSSPseudoElements::Type aType,
                           nsStyleContext* aParentContext);
   already_AddRefed<nsStyleContext>
   ProbePseudoElementStyle(mozilla::dom::Element* aParentElement,
                           nsCSSPseudoElements::Type aType,
                           nsStyleContext* aParentContext,
                           TreeMatchContext& aTreeMatchContext);
-
+  
   // Get a style context for an anonymous box.  aPseudoTag is the
   // pseudo-tag to use and must be non-null.
   already_AddRefed<nsStyleContext>
   ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, nsStyleContext* aParentContext);
 
 #ifdef MOZ_XUL
   // Get a style context for a XUL tree pseudo.  aPseudoTag is the
   // pseudo-tag to use and must be non-null.  aParentContent must be
@@ -160,24 +159,16 @@ class nsStyleSet
   bool AppendFontFaceRules(nsPresContext* aPresContext,
                              nsTArray<nsFontFaceRuleContainer>& aArray);
 
   // Append all the currently-active keyframes rules to aArray.  Return
   // true for success and false for failure.
   bool AppendKeyframesRules(nsPresContext* aPresContext,
                               nsTArray<nsCSSKeyframesRule*>& aArray);
 
-  // Fetch object for looking up font feature values
-  already_AddRefed<gfxFontFeatureValueSet> GetFontFeatureValuesLookup();
-
-  // Append all the currently-active font feature values rules to aArray.
-  // Return true for success and false for failure.
-  bool AppendFontFeatureValuesRules(nsPresContext* aPresContext,
-                              nsTArray<nsCSSFontFeatureValuesRule*>& aArray);
-
   // Append all the currently-active page rules to aArray.  Return
   // true for success and false for failure.
   bool AppendPageRules(nsPresContext* aPresContext,
                        nsTArray<nsCSSPageRule*>& aArray);
 
   // Begin ignoring style context destruction, to avoid lots of unnecessary
   // work on document teardown.
   void BeginShutdown(nsPresContext* aPresContext);
@@ -410,17 +401,16 @@ class nsStyleSet
                          // lexicographic tree of matched rules that style
                          // contexts use to look up properties.
 
   uint16_t mBatching;
 
   unsigned mInShutdown : 1;
   unsigned mAuthorStyleDisabled: 1;
   unsigned mInReconstruct : 1;
-  unsigned mInitFontFeatureValuesLookup : 1;
   unsigned mDirty : 9;  // one dirty bit is used per sheet type
 
   uint32_t mUnusedRuleNodeCount; // used to batch rule node GC
   nsTArray<nsStyleContext*> mRoots; // style contexts with no parent
 
   // Empty style rules to force things that restrict which properties
   // apply into different branches of the rule tree.
   nsRefPtr<nsEmptyStyleRule> mFirstLineRule, mFirstLetterRule, mPlaceholderRule;
@@ -428,19 +418,16 @@ class nsStyleSet
   // Style rule which sets all properties to their initial values for
   // determining when context-sensitive values are in use.
   nsRefPtr<nsInitialStyleRule> mInitialStyleRule;
 
   // Old rule trees, which should only be non-empty between
   // BeginReconstruct and EndReconstruct, but in case of bugs that cause
   // style contexts to exist too long, may last longer.
   nsTArray<nsRuleNode*> mOldRuleTrees;
-
-  // whether font feature values lookup object needs initialization
-  nsRefPtr<gfxFontFeatureValueSet> mFontFeatureValuesLookup;
 };
 
 #ifdef _IMPL_NS_LAYOUT
 inline
 void nsRuleNode::AddRef()
 {
   if (mRefCnt++ == 0 && !IsRoot()) {
     mPresContext->StyleSet()->RuleNodeInUse();
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -187,26 +187,16 @@ nsChangeHint nsStyleFont::CalcFontDiffer
 {
   if ((aFont1.size == aFont2.size) && 
       (aFont1.sizeAdjust == aFont2.sizeAdjust) && 
       (aFont1.style == aFont2.style) &&
       (aFont1.variant == aFont2.variant) &&
       (aFont1.weight == aFont2.weight) &&
       (aFont1.stretch == aFont2.stretch) &&
       (aFont1.name == aFont2.name) &&
-      (aFont1.kerning == aFont2.kerning) &&
-      (aFont1.synthesis == aFont2.synthesis) &&
-      (aFont1.variantAlternates == aFont2.variantAlternates) &&
-      (aFont1.alternateValues == aFont2.alternateValues) &&
-      (aFont1.featureValueLookup == aFont2.featureValueLookup) &&
-      (aFont1.variantCaps == aFont2.variantCaps) &&
-      (aFont1.variantEastAsian == aFont2.variantEastAsian) &&
-      (aFont1.variantLigatures == aFont2.variantLigatures) &&
-      (aFont1.variantNumeric == aFont2.variantNumeric) &&
-      (aFont1.variantPosition == aFont2.variantPosition) &&
       (aFont1.fontFeatureSettings == aFont2.fontFeatureSettings) &&
       (aFont1.languageOverride == aFont2.languageOverride)) {
     if ((aFont1.decorations == aFont2.decorations)) {
       return NS_STYLE_HINT_NONE;
     }
     return NS_STYLE_HINT_VISUAL;
   }
   return NS_STYLE_HINT_REFLOW;
--- a/layout/style/nsStyleUtil.cpp
+++ b/layout/style/nsStyleUtil.cpp
@@ -264,128 +264,16 @@ nsStyleUtil::AppendFontFeatureSettings(c
   NS_PRECONDITION(unit == eCSSUnit_PairList || unit == eCSSUnit_PairListDep,
                   "improper value unit for font-feature-settings:");
 
   nsTArray<gfxFontFeature> featureSettings;
   nsRuleNode::ComputeFontFeatures(aSrc.GetPairListValue(), featureSettings);
   AppendFontFeatureSettings(featureSettings, aResult);
 }
 
-/* static */ void
-nsStyleUtil::GetFunctionalAlternatesName(int32_t aFeature,
-                                         nsAString& aFeatureName)
-{
-  aFeatureName.Truncate();
-  nsCSSKeyword key =
-    nsCSSProps::ValueToKeywordEnum(aFeature,
-                           nsCSSProps::kFontVariantAlternatesFuncsKTable);
-
-  NS_ASSERTION(key != eCSSKeyword_UNKNOWN, "bad alternate feature type");
-  AppendUTF8toUTF16(nsCSSKeywords::GetStringValue(key), aFeatureName);
-}
-
-/* static */ void
-nsStyleUtil::SerializeFunctionalAlternates(
-    const nsTArray<gfxAlternateValue>& aAlternates,
-    nsAString& aResult)
-{
-  nsAutoString funcName, funcParams;
-  uint32_t numValues = aAlternates.Length();
-
-  uint32_t feature = 0;
-  for (uint32_t i = 0; i < numValues; i++) {
-    const gfxAlternateValue& v = aAlternates.ElementAt(i);
-    if (feature != v.alternate) {
-      feature = v.alternate;
-      if (!funcName.IsEmpty() && !funcParams.IsEmpty()) {
-        if (!aResult.IsEmpty()) {
-          aResult.Append(PRUnichar(' '));
-        }
-
-        // append the previous functional value
-        aResult.Append(funcName);
-        aResult.Append(PRUnichar('('));
-        aResult.Append(funcParams);
-        aResult.Append(PRUnichar(')'));
-      }
-
-      // function name
-      GetFunctionalAlternatesName(v.alternate, funcName);
-      NS_ASSERTION(!funcName.IsEmpty(), "unknown property value name");
-
-      // function params
-      AppendEscapedCSSIdent(v.value, funcParams);
-    } else {
-      if (!funcParams.IsEmpty()) {
-        funcParams.Append(NS_LITERAL_STRING(", "));
-      }
-      AppendEscapedCSSIdent(v.value, funcParams);
-    }
-  }
-
-    // append the previous functional value
-  if (!funcName.IsEmpty() && !funcParams.IsEmpty()) {
-    if (!aResult.IsEmpty()) {
-      aResult.Append(PRUnichar(' '));
-    }
-
-    aResult.Append(funcName);
-    aResult.Append(PRUnichar('('));
-    aResult.Append(funcParams);
-    aResult.Append(PRUnichar(')'));
-  }
-}
-
-/* static */ void
-nsStyleUtil::ComputeFunctionalAlternates(const nsCSSValueList* aList,
-                                  nsTArray<gfxAlternateValue>& aAlternateValues)
-{
-  gfxAlternateValue v;
-
-  aAlternateValues.Clear();
-  for (const nsCSSValueList* curr = aList; curr != nullptr; curr = curr->mNext) {
-    // list contains function units
-    if (curr->mValue.GetUnit() != eCSSUnit_Function) {
-      continue;
-    }
-
-    // element 0 is the propval in ident form
-    const nsCSSValue::Array *func = curr->mValue.GetArrayValue();
-
-    // lookup propval
-    nsAutoString keywordStr;
-    func->Item(0).GetStringValue(keywordStr);
-    nsCSSKeyword key = nsCSSKeywords::LookupKeyword(keywordStr);
-    NS_ASSERTION(key != eCSSKeyword_UNKNOWN, "unknown alternate property value");
-
-    int32_t alternate;
-    if (key == eCSSKeyword_UNKNOWN ||
-        !nsCSSProps::FindKeyword(key,
-                                 nsCSSProps::kFontVariantAlternatesFuncsKTable,
-                                 alternate)) {
-      NS_NOTREACHED("keyword not a font-variant-alternates value");
-    }
-    v.alternate = alternate;
-
-    // other elements are the idents associated with the propval
-    // append one alternate value for each one
-    uint32_t numElems = func->Count();
-    for (uint32_t i = 1; i < numElems; i++) {
-      const nsCSSValue& value = func->Item(i);
-      NS_ASSERTION(value.GetUnit() == eCSSUnit_Ident,
-                   "weird unit found in variant alternate");
-      if (value.GetUnit() != eCSSUnit_Ident) {
-        continue;
-      }
-      value.GetStringValue(v.value);
-      aAlternateValues.AppendElement(v);
-    }
-  }
-}
-
 /* static */ float
 nsStyleUtil::ColorComponentToFloat(uint8_t aAlpha)
 {
   // Alpha values are expressed as decimals, so we should convert
   // back, using as few decimal places as possible for
   // round-tripping.
   // First try two decimal places:
   float rounded = NS_roundf(float(aAlpha) * 100.0f / 255.0f) / 100.0f;
--- a/layout/style/nsStyleUtil.h
+++ b/layout/style/nsStyleUtil.h
@@ -2,23 +2,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef nsStyleUtil_h___
 #define nsStyleUtil_h___
 
 #include "nsCoord.h"
 #include "nsCSSProperty.h"
-#include "gfxFontFeatures.h"
 
 class nsCSSValue;
 class nsStringComparator;
 class nsIContent;
 struct gfxFontFeature;
-class nsCSSValueList;
 template <class E> class nsTArray;
 
 // Style utility functions
 class nsStyleUtil {
 public:
 
  static bool DashMatchCompare(const nsAString& aAttributeValue,
                                 const nsAString& aSelectorValue,
@@ -46,30 +44,16 @@ public:
   static void AppendPaintOrderValue(uint8_t aValue, nsAString& aResult);
 
   static void AppendFontFeatureSettings(const nsTArray<gfxFontFeature>& aFeatures,
                                         nsAString& aResult);
 
   static void AppendFontFeatureSettings(const nsCSSValue& src,
                                         nsAString& aResult);
 
-  // convert bitmask value to keyword name for a functional alternate
-  static void GetFunctionalAlternatesName(int32_t aFeature,
-                                          nsAString& aFeatureName);
-
-  // Append functional font-variant-alternates values to string
-  static void
-  SerializeFunctionalAlternates(const nsTArray<gfxAlternateValue>& aAlternates,
-                                nsAString& aResult);
-
-  // List of functional font-variant-alternates values to feature/value pairs
-  static void
-  ComputeFunctionalAlternates(const nsCSSValueList* aList,
-                              nsTArray<gfxAlternateValue>& aAlternateValues);
-
   /*
    * Convert an author-provided floating point number to an integer (0
    * ... 255) appropriate for use in the alpha component of a color.
    */
   static uint8_t FloatToColorComponent(float aAlpha)
   {
     NS_ASSERTION(0.0 <= aAlpha && aAlpha <= 1.0, "out of range");
     return NSToIntRound(aAlpha * 255);
--- a/layout/style/test/Makefile.in
+++ b/layout/style/test/Makefile.in
@@ -96,17 +96,16 @@ MOCHITEST_FILES =	test_acid3_test46.html
 		test_css_eof_handling.html \
 		test_css_supports.html \
 		test_default_bidi_css.html \
 		test_descriptor_storage.html \
 		test_descriptor_syntax_errors.html \
 		test_dont_use_document_colors.html \
 		test_font_face_parser.html \
 		test_font_family_parsing.html \
-		test_font_feature_values_parsing.html \
 		test_garbage_at_end_of_declarations.html \
 		test_group_insertRule.html \
 		test_html_attribute_computed_values.html \
 		test_ident_escaping.html \
 		test_inherit_computation.html \
 		test_inherit_storage.html \
 		test_initial_computation.html \
 		test_initial_storage.html \
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -2486,17 +2486,17 @@ var gCSSProperties = {
 		invalid_values: []
 	},
 	"font-variant": {
 		domProp: "fontVariant",
 		inherited: true,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "normal" ],
 		other_values: [ "small-caps" ],
-		invalid_values: [ "small-caps normal" ]
+		invalid_values: []
 	},
 	"font-weight": {
 		domProp: "fontWeight",
 		inherited: true,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "normal", "400" ],
 		other_values: [ "bold", "100", "200", "300", "500", "600", "700", "800", "900", "bolder", "lighter" ],
 		invalid_values: [ "0", "100.0", "107", "399", "401", "699", "710", "1000" ]
@@ -4252,139 +4252,16 @@ if (SpecialPowers.getBoolPref("layout.cs
 	};
 	for (var prop in flexProperties) {
 		gCSSProperties[prop] = flexProperties[prop];
 	}
 	gCSSProperties["display"].other_values.push("flex");
 	gCSSProperties["display"].other_values.push("inline-flex");
 }
 
-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: [ "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" ]
-		},
-		"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",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "luminance" ],
 		other_values: [ "alpha" ],
 		invalid_values: []
--- a/layout/style/test/test_bug377947.html
+++ b/layout/style/test/test_bug377947.html
@@ -56,31 +56,16 @@ var all_but_one = {
   "font-variant": "normal",
   "font-weight": "bold",
   "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
 };
-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], "");
 }
 is(s.getPropertyValue("font"), "",
    "font shorthand should be empty when some subproperties specified");
 s.setProperty("line-height", "1.5", "");
 isnot(s.getPropertyValue("font"), "",
       "font shorthand should produce value when all subproperties set");
deleted file mode 100644
--- a/layout/style/test/test_font_feature_values_parsing.html
+++ /dev/null
@@ -1,356 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset=utf-8>
-  <title>@font-feature-values rule parsing tests</title>
-  <link rel="author" title="John Daggett" href="mailto:jdaggett@mozilla.com">
-  <link rel="help" href="http://www.w3.org/TR/css3-fonts/#font-feature-values" />
-  <meta name="assert" content="tests that valid @font-feature-values rules parse and invalid ones don't" />
-  <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=549861 -->
-  <script type="text/javascript" src="/resources/testharness.js"></script>
-  <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-  <style type="text/css">
-  </style>
-</head>
-<body>
-<div id="log"></div>
-<pre id="display"></pre>
-<style type="text/css" id="testbox"></style>
-
-<script type="text/javascript">
-var gPrefix = "";
-var kFontFeatureValuesRuleType = 14;
-
-function ruleName() { return "@" + gPrefix + "font-feature-values"; }
-function makeRule(f, v) {
-  return ruleName() + " " + f + " { " + v + " }";
-}
-
-function _()
-{
-  var i, decl = [];
-  for (i = 0; i < arguments.length; i++) {
-    decl.push(arguments[i]);
-  }
-  return makeRule("bongo", decl.join(" "));
-}
-
-// note: because of bugs in the way family names are serialized,
-// 'serializationSame' only implies that the value definition block
-// is the same (i.e. not including the family name list)
-
-var testrules = [
-
-  /* basic syntax */
-  { rule: ruleName() + ";", invalid: true },
-  { rule: ruleName() + " bongo;", invalid: true },
-  { rule: ruleName().replace("values", "value") + " {;}", invalid: true },
-  { rule: ruleName().replace("feature", "features") + " {;}", invalid: true },
-  { rule: makeRule("bongo", ""), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", ";"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", ",;"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", ";,"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", ",;,"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset;"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset,;"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset abc;"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { ;;abc }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc;; }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc: }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc,: }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc:, }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc:,; }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { a,b }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { a;b }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { a:;b: }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { a:,;b: }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { a:1,;b: }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc 1 2 3 }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc:, 1 2 3 }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc:; 1 2 3 }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc:; 1 2 3 }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc: 1 2 3a }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@styleset { abc: 1 2 3, def: 1; }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@blah @styleset { abc: 1 2 3; }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@blah } @styleset { abc: 1 2 3; }"), serializationNoValueDefn: true },
-  { rule: makeRule("bongo", "@blah , @styleset { abc: 1 2 3; }"), serializationNoValueDefn: true },
-  { rule: ruleName() + " bongo { @styleset { abc: 1 2 3; }", serialization: _("@styleset { abc: 1 2 3; }") },
-  { rule: ruleName() + " bongo { @styleset { abc: 1 2 3 }", serialization: _("@styleset { abc: 1 2 3; }") },
-  { rule: ruleName() + " bongo { @styleset { abc: 1 2 3;", serialization: _("@styleset { abc: 1 2 3; }") },
-  { rule: ruleName() + " bongo { @styleset { abc: 1 2 3", serialization: _("@styleset { abc: 1 2 3; }") },
-  { rule: _("@styleset { ok-1: 1; }"), serializationSame: true },
-  { rule: _("@annotation { ok-1: 3; }"), serializationSame: true },
-  { rule: _("@stylistic { blah: 3; }"), serializationSame: true },
-  { rule: makeRule("bongo", "\n@styleset\n  { blah: 3; super-blah: 4 5;\n  more-blah: 5 6 7;\n }"), serializationSame: true },
-  { rule: makeRule("bongo", "\n@styleset\n  {\n blah:\n 3\n;\n super-blah:\n 4\n 5\n;\n  more-blah:\n 5 6\n 7;\n }"), serializationSame: true },
-
-  /* limits on number of values */
-  { rule: _("@stylistic { blah: 1; }"), serializationSame: true },
-  { rule: _("@styleset { blah: 1 2 3 4; }"), serializationSame: true },
-  { rule: _("@character-variant { blah: 1 2; }"), serializationSame: true },
-  { rule: _("@swash { blah: 1; }"), serializationSame: true },
-  { rule: _("@ornaments { blah: 1; }"), serializationSame: true },
-  { rule: _("@annotation { blah: 1; }"), serializationSame: true },
-
-  /* values ignored when used */
-  { rule: _("@styleset { blah: 0; }"), serializationSame: true },
-  { rule: _("@styleset { blah: 120 124; }"), serializationSame: true },
-  { rule: _("@character-variant { blah: 0; }"), serializationSame: true },
-  { rule: _("@character-variant { blah: 111; }"), serializationSame: true },
-  { rule: _("@character-variant { blah: 111 13; }"), serializationSame: true },
-
-  /* invalid value name */
-  { rulesrc: ["styleset { blah: 1 }"], serializationNoValueDefn: true },
-  { rulesrc: ["stylistic { blah: 1 }"], serializationNoValueDefn: true },
-  { rulesrc: ["character-variant { blah: 1 }"], serializationNoValueDefn: true },
-  { rulesrc: ["swash { blah: 1 }"], serializationNoValueDefn: true },
-  { rulesrc: ["ornaments { blah: 1 }"], serializationNoValueDefn: true },
-  { rulesrc: ["annotation { blah: 1 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@bongo { blah: 1 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@bongo { blah: 1 2 3 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@bongo { blah: 1 2 3; burp: 1;;; }"], serializationNoValueDefn: true },
-
-  /* values */
-  { rulesrc: ["@styleset { blah: -1 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah: 1 -1 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah: 1.5 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah: 15px }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah: red }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah: (1) }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah:(1) }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah:, 1 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah: <1> }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah: 1! }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah: 1,, }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah: 1 1 1 1; }"], serializationSame: true },
-
-  /* limits on number of values */
-  { rulesrc: ["@stylistic { blah: 1 2 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@character-variant { blah: 1 2 3 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@swash { blah: 1 2 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@ornaments { blah: 1 2 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@annotation { blah: 1 2 }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { blah: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19; }"], serializationSame: true },
-
-  /* family names */
-  { rule: makeRule("bongo", "@styleset { blah: 1; }"), serializationSame: true },
-  { rule: makeRule("\"bongo\"", "@styleset { blah: 1; }"), serializationSame: true },
-  { rule: makeRule("'bongo'", "@styleset { blah: 1; }"), serializationSame: true },
-  { rule: makeRule("\\62 ongo", "@styleset { blah: 1; }"), serializationSame: true },
-  { rule: makeRule("bongo, super bongo, bongo the supreme", "@styleset { blah: 1; }"), serializationSame: true },
-  { rule: makeRule("bongo,, super bongo", "@styleset { blah: 1; }"), invalid: true },
-  { rule: makeRule("bongo,*", "@styleset { blah: 1; }"), invalid: true },
-  { rule: makeRule("bongo, sans-serif", "@styleset { blah: 1; }"), invalid: true },
-  { rule: makeRule("serif, sans-serif", "@styleset { blah: 1; }"), invalid: true },
-  { rule: makeRule("'serif', 'sans-serif'", "@styleset { blah: 1; }"), serializationSame: true },
-  { rule: makeRule("bongo, \"super bongo\", 'bongo the supreme'", "@styleset { blah: 1; }"), serializationSame: true },
-  { rule: makeRule("毎日カレーを食べたい!", "@styleset { blah: 1; }"), serializationSame: true },
-  { rule: makeRule("毎日カレーを食べたい!, 納豆嫌い", "@styleset { blah: 1; }"), serializationSame: true },
-
-  { rule: makeRule("bongo, \"super\" bongo, bongo the supreme", "@styleset { blah: 1; }"), invalid: true },
-  { rule: makeRule("--bongo", "@styleset { blah: 1; }"), invalid: true },
-
-  /* ident tests */
-  { rule: _("@styleset { blah: 1; blah: 1; }"), serializationSame: true },
-  { rule: _("@styleset { blah: 1; de-blah: 1; blah: 2; }"), serializationSame: true },
-  { rule: _("@styleset { \\tra-la: 1; }"), serialization: _("@styleset { tra-la: 1; }") },
-  { rule: _("@styleset { b\\lah: 1; }"), serialization: _("@styleset { blah: 1; }") },
-  { rule: _("@styleset { \\62 lah: 1; }"), serialization: _("@styleset { blah: 1; }") },
-  { rule: _("@styleset { \\:blah: 1; }"), serialization: _("@styleset { \\:blah: 1; }") },
-  { rule: _("@styleset { \\;blah: 1; }"), serialization: _("@styleset { \\;blah: 1; }") },
-  { rule: _("@styleset { complex\\20 blah: 1; }"), serialization: _("@styleset { complex\\ blah: 1; }") },
-  { rule: _("@styleset { complex\\ blah: 1; }"), serializationSame: true },
-  { rule: _("@styleset { Håkon: 1; }"), serializationSame: true },
-  { rule: _("@styleset { Åквариум: 1; }"), serializationSame: true },
-  { rule: _("@styleset { \\1f449\\1f4a9\\1f448: 1; }"), serialization: _("@styleset { 👉💩👈: 1; }") },
-  { rule: _("@styleset { 魅力: 1; }"), serializationSame: true },
-  { rule: _("@styleset { 毎日カレーを食べたい!: 1; }"), serializationSame: true },
-  /* from http://en.wikipedia.org/wiki/Metal_umlaut */
-  { rule: _("@styleset { TECHNICIÄNS\\ ÖF\\ SPÅCE\\ SHIP\\ EÅRTH\\ THIS\\ IS\\ YÖÜR\\ CÄPTÅIN\\ SPEÄKING\\ YÖÜR\\ ØÅPTÅIN\\ IS\\ DEA̋D: 1; }"), serializationSame: true },
-
-  { rulesrc: ["@styleset { 123blah: 1; }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { :123blah 1; }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { :123blah: 1; }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { ?123blah: 1; }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { \"blah\": 1; }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { complex blah: 1; }"], serializationNoValueDefn: true },
-  { rulesrc: ["@styleset { complex\\  blah: 1; }"], serializationNoValueDefn: true }
-
-];
-
-// test that invalid value declarations don't affect the parsing of surrounding 
-// declarations.  So before + invalid + after should match the serialization 
-// given in s.
-
-var gSurroundingTests = [
-  // -- invalid, valid ==> valid
-  { before: "", after: "@ornaments { whatchamacallit-1: 23; thingy-dingy: 3; }", s: _("@ornaments { whatchamacallit-1: 23; thingy-dingy: 3; }") },
-
-  // -- valid, invalid ==> valid
-  { before: "@ornaments { whatchamacallit-1: 23; thingy-dingy: 7; }", after: "", s: _("@ornaments { whatchamacallit-1: 23; thingy-dingy: 7; }") },
-
-  // -- valid, invalid, valid ==> valid, valid
-  { before: "@ornaments { whatchamacallit-1: 23; thingy-dingy: 3; }", after: "@character-variant { whatchamacallit-2: 23 4; }", s: _("@ornaments { whatchamacallit-1: 23; thingy-dingy: 3; } @character-variant { whatchamacallit-2: 23 4; }") },
-
-  // -- invalid, valid, invalid ==> valid
-  { between: "@ornaments { whatchamacallit-1: 23; thingy-dingy: 4; }", s: _("@ornaments { whatchamacallit-1: 23; thingy-dingy: 4; }") }
-];
-
-/* strip out just values, along with empty value blocks (e.g. @swash { })*/
-function valuesText(ruletext)
-{
-  var t = ruletext.replace(/@[a-zA-Z0-9\-]+[ \n]*{[ \n]*}/g, "");
-  t = t.replace(/[ \n]+/g, " ");
-  t = t.replace(/^[^{]+{[ \n]*/, "");
-  t = t.replace(/[ \n]*}[^}]*$/, "");
-  t = t.replace(/[ \n]*;/g, ";");
-  return t;
-}
-
-function testParse(rulesrc)
-{
-  var sheet = document.styleSheets[1];
-  var rule = _.apply(this, rulesrc);
-
-  while(sheet.cssRules.length > 0)
-    sheet.deleteRule(0);
-  try {
-    sheet.insertRule(rule, 0);
-  } catch (e) {
-    return e.toString();
-  }
-
-  if (sheet.cssRules.length == 1 && sheet.cssRules[0].type == kFontFeatureValuesRuleType) {
-    return sheet.cssRules[0].cssText.replace(/[ \n]+/g, " ");
-  }
-
-  return "";
-}
-
-function testOneRule(testrule) {
-  var sheet = document.styleSheets[1];
-  var rule;
-
-  if ("rulesrc" in testrule) {
-    rule = _.apply(this, testrule.rulesrc);
-  } else {
-    rule = testrule.rule;
-  }
-
-  var parseErr = false;
-  var expectedErr = false;
-  var invalid = false;
-  if ("invalid" in testrule && testrule.invalid) invalid = true;
-
-  while(sheet.cssRules.length > 0)
-    sheet.deleteRule(0);
-  try {
-    sheet.insertRule(rule, 0);
-  } catch (e) {
-    expectedErr = (e.name == "SyntaxError"
-      && e instanceof DOMException
-      && e.code == DOMException.SYNTAX_ERR
-      && invalid);
-    parseErr = true;
-  }
-
-  test(function() { 
-    assert_true(!parseErr || expectedErr, "unexpected syntax error");
-    if (!parseErr) {
-      assert_equals(sheet.cssRules.length, 1, "bad rule count");
-      assert_equals(sheet.cssRules[0].type, kFontFeatureValuesRuleType, "bad rule type");
-    }
-  }, "basic parse tests - " + rule);
-
-  var sanitizedRule = rule.replace(/[ \n]+/g, " ");
-  if (parseErr) {
-    return;
-  }
-
-  // should result in one @font-feature-values rule constructed
-
-  // serialization matches expectation
-  // -- note: due to inconsistent font family serialization problems,
-  //    only the serialization of the values is tested currently
-
-  var ruleValues = valuesText(rule);
-  var serialized = sheet.cssRules[0].cssText;
-  var serializedValues = valuesText(serialized);
-  var haveSerialization = true;
-
-  if (testrule.serializationSame) {
-    test(function() {
-      assert_equals(serializedValues, ruleValues, "canonical cssText serialization doesn't match");
-    }, "serialization check - " + rule);
-  } else if ("serialization" in testrule) {
-    var s = valuesText(testrule.serialization);
-    test(function() {
-      assert_equals(serializedValues, s, "non-canonical cssText serialization doesn't match - ");
-    }, "serialization check - " + rule);
-  } else if (testrule.serializationNoValueDefn) {
-    test(function() {
-      assert_equals(serializedValues, "", "cssText serialization should have no value defintions - ");
-    }, "no value definitions in serialization - " + rule);
-
-    haveSerialization = false;
-
-    if ("rulesrc" in testrule) {
-      test(function() {
-        var j, rulesrc = testrule.rulesrc;
-    
-        // invalid value definitions shouldn't affect the parsing of valid
-        // definitions before or after an invalid one
-        for (var j = 0; j < gSurroundingTests.length; j++) {
-          var t = gSurroundingTests[j];
-          var srulesrc = [];
-    
-          if ("between" in t) {
-            srulesrc = srulesrc.concat(rulesrc);
-            srulesrc = srulesrc.concat(t.between);
-            srulesrc = srulesrc.concat(rulesrc);
-          } else {
-            if (t.before != "")
-              srulesrc = srulesrc.concat(t.before);
-            srulesrc = srulesrc.concat(rulesrc);
-            if (t.after != "")
-              srulesrc = srulesrc.concat(t.after);
-          }
-    
-          var result = testParse(srulesrc);
-          assert_equals(valuesText(result), valuesText(t.s), "invalid declarations should not affect valid ones - ");
-        }
-      }, "invalid declarations don't affect valid ones - " + rule);
-    }
-  }
-
-  // if serialization non-empty, serialization should round-trip to itself
-  if (haveSerialization) {
-    var roundTripText = testParse([serializedValues]);
-    test(function() {
-      assert_equals(valuesText(roundTripText), serializedValues,
-         "serialization should round-trip to itself - ");
-    }, "serialization round-trip - " + rule);
-  }
-}
-
-function testFontFeatureValuesRuleParsing() {
-  var i;
-  for (i = 0; i < testrules.length; i++) {
-    var testrule = testrules[i];
-    var rule;
-
-    if ("rulesrc" in testrule) {
-      rule = _.apply(this, testrule.rulesrc);
-    } else {
-      rule = testrule.rule;
-    }
-
-    testOneRule(testrule);
-    //test(function() { testOneRule(testrule); }, "parsing " + rule);
-  }
-}
-
-testFontFeatureValuesRuleParsing();
-</script>
-</body></html>
--- a/layout/style/test/test_system_font_serialization.html
+++ b/layout/style/test/test_system_font_serialization.html
@@ -42,21 +42,15 @@ e.setAttribute("style", "font: menu; fon
 is(e.style.cssText, "font: menu;", "serialize system font alone");
 is(e.style.font, "menu", "font getter returns value");
 
 e.setAttribute("style", "font: menu; font-weight: -moz-use-system-font ! important");
 is(e.style.cssText, "font: menu; font-weight: -moz-use-system-font ! important;", "serialize system font and subproperty that is important");
 is(e.style.font, "", "font getter returns nothing");
 
 e.setAttribute("style", "font: inherit; font-family: Helvetica;");
-
-var cssTextStr = "font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -moz-font-feature-settings: inherit; -moz-font-language-override: inherit;";
-if (SpecialPowers.getBoolPref("layout.css.font-features.enabled")) {
-  cssTextStr += " font-kerning: inherit; font-synthesis: inherit; font-variant-alternates: inherit; font-variant-caps: inherit; font-variant-east-asian: inherit; font-variant-ligatures: inherit; font-variant-numeric: inherit; font-variant-position: inherit;"
-}
-
-is(e.style.cssText, cssTextStr + " font-family: Helvetica;", "don't serialize system font for font:inherit");
+is(e.style.cssText, "font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -moz-font-feature-settings: inherit; -moz-font-language-override: inherit; font-family: Helvetica;", "don't serialize system font for font:inherit");
 is(e.style.font, "", "font getter returns nothing");
 
 </script>
 </pre>
 </body>
 </html>
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -1734,29 +1734,16 @@ pref("layout.css.masking.enabled", true)
 #endif
 
 // Is support for the the @supports rule enabled?
 pref("layout.css.supports-rule.enabled", true);
 
 // Is support for CSS Flexbox enabled?
 pref("layout.css.flexbox.enabled", true);
 
-// Is support for CSS3 Fonts features enabled?
-// (includes font-variant-*, font-kerning, font-synthesis
-// and the @font-feature-values rule)
-// Note: with this enabled, font-feature-settings is aliased
-// to -moz-font-feature-settings.  When unprefixing, this should
-// be reversed, -moz-font-feature-settings should alias to
-// font-feature-settings.
-#ifdef RELEASE_BUILD
-pref("layout.css.font-features.enabled", false);
-#else
-pref("layout.css.font-features.enabled", true);
-#endif
-
 // Are sets of prefixed properties supported?
 pref("layout.css.prefixes.border-image", true);
 pref("layout.css.prefixes.transforms", true);
 pref("layout.css.prefixes.transitions", true);
 pref("layout.css.prefixes.animations", true);
 
 // Is support for the :scope selector enabled?
 #ifdef RELEASE_BUILD