Bug 892929 - hide window.CSSFontFeatureValueRule when font features disabled. r=smaug
authorBoris Zbarsky
Wed, 31 Jul 2013 14:17:48 +0900
changeset 152983 60dcd30de3fbf12c4791e856f89941cf4cb226d0
parent 152982 dcc53238cca54a9fc33841f40fb69ec7681c9588
child 152984 9b235393dd594f838398a850ffa07c5204681018
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs892929
milestone25.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
Bug 892929 - hide window.CSSFontFeatureValueRule when font features disabled. r=smaug
dom/base/nsDOMClassInfo.cpp
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -3690,16 +3690,21 @@ OldBindingConstructorEnabled(const nsGlo
 
   // Don't expose CSSSupportsRule unless @supports processing is enabled.
   if (aStruct->mDOMClassInfoID == eDOMClassInfo_CSSSupportsRule_id) {
     if (!CSSSupportsRule::PrefEnabled()) {
       return false;
     }
   }
 
+  // Don't expose CSSFontFeatureValuesRule unless the pref is enabled
+  if (aStruct->mDOMClassInfoID == eDOMClassInfo_CSSFontFeatureValuesRule_id) {
+    return nsCSSFontFeatureValuesRule::PrefEnabled();
+  }
+
   return true;
 }
 
 // static
 nsresult
 nsWindowSH::GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
                           JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
                           bool *did_resolve)