Bug 1335907 - Pref Reorg. WORK IN PROGRESS. r?jaws, r?mconley draft
authorZack Herrick <herrickz@msu.edu>
Sat, 11 Feb 2017 10:22:58 -0500
changeset 482214 bbf9afa19d742ea47c8edb4f52b881a6d1808002
parent 466852 12806329c2f56cd9ec23bb8c054c8244a319a790
child 482216 17534c1b6b8e999a5be785d8e5ba323365b87787
push id45030
push userbmo:herrickz@msu.edu
push dateSat, 11 Feb 2017 15:28:33 +0000
reviewersjaws, mconley
bugs1335907
milestone54.0a1
Bug 1335907 - Pref Reorg. WORK IN PROGRESS. r?jaws, r?mconley MozReview-Commit-ID: 1sx0Wj15yM7
browser/components/preferences/in-content/advanced.js
browser/components/preferences/in-content/advanced.xul
browser/components/preferences/in-content/applications.js
browser/components/preferences/in-content/applications.xul
browser/components/preferences/in-content/content.js
browser/components/preferences/in-content/content.xul
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/main.xul
browser/components/preferences/in-content/preferences.js
browser/components/preferences/in-content/preferences.xul
browser/components/preferences/in-content/search.js
browser/components/preferences/in-content/search.xul
old mode 100644
new mode 100755
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -60,19 +60,16 @@ var gAdvancedPane = {
         Services.obs.removeObserver(this, "sitedatamanager:sites-updated");
       };
       window.addEventListener("unload", unload);
       SiteDataManager.updateSites();
       setEventListener("clearSiteDataButton", "command",
                        gAdvancedPane.clearSiteData);
       setEventListener("siteDataSettings", "command",
                        gAdvancedPane.showSiteDataSettings);
-
-      let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "storage-permissions";
-      document.getElementById("siteDataLearnMoreLink").setAttribute("href", url);
     }
 
     setEventListener("layers.acceleration.disabled", "change",
                      gAdvancedPane.updateHardwareAcceleration);
     setEventListener("advancedPrefs", "select",
                      gAdvancedPane.tabSelectionChanged);
     if (AppConstants.MOZ_TELEMETRY_REPORTING) {
       setEventListener("submitHealthReportBox", "command",
old mode 100644
new mode 100755
--- a/browser/components/preferences/in-content/advanced.xul
+++ b/browser/components/preferences/in-content/advanced.xul
@@ -7,58 +7,16 @@
 <script type="application/javascript"
         src="chrome://browser/content/preferences/in-content/advanced.js"/>
 
 <preferences id="advancedPreferences" hidden="true" data-category="paneAdvanced">
   <preference id="browser.preferences.advanced.selectedTabIndex"
               name="browser.preferences.advanced.selectedTabIndex"
               type="int"/>
 
-  <!-- General tab -->
-  <preference id="accessibility.browsewithcaret"
-              name="accessibility.browsewithcaret"
-              type="bool"/>
-  <preference id="accessibility.typeaheadfind"
-              name="accessibility.typeaheadfind"
-              type="bool"/>
-  <preference id="accessibility.blockautorefresh"
-              name="accessibility.blockautorefresh"
-              type="bool"/>
-#ifdef XP_WIN
-  <preference id="ui.osk.enabled"
-              name="ui.osk.enabled"
-              type="bool"/>
-#endif
-
-  <preference id="general.autoScroll"
-              name="general.autoScroll"
-              type="bool"/>
-  <preference id="general.smoothScroll"
-              name="general.smoothScroll"
-              type="bool"/>
-  <preference id="layers.acceleration.disabled"
-              name="layers.acceleration.disabled"
-              type="bool"
-              inverted="true"/>
-#ifdef XP_WIN
-  <preference id="gfx.direct2d.disabled"
-              name="gfx.direct2d.disabled"
-              type="bool"
-              inverted="true"/>
-#endif
-  <preference id="layout.spellcheckDefault"
-              name="layout.spellcheckDefault"
-              type="int"/>
-
-#ifdef MOZ_TELEMETRY_REPORTING
-  <preference id="toolkit.telemetry.enabled"
-              name="toolkit.telemetry.enabled"
-              type="bool"/>
-#endif
-
   <!-- Data Choices tab -->
 #ifdef MOZ_CRASHREPORTER
   <preference id="browser.crashReports.unsubmittedCheck.autoSubmit"
               name="browser.crashReports.unsubmittedCheck.autoSubmit"
               type="bool"/>
 #endif
 
   <!-- Network tab -->
@@ -147,17 +105,17 @@
     <tab id="encryptionTab" label="&certificateTab.label;"/>
   </tabs>
 
   <tabpanels flex="1">
 
     <!-- General -->
     <tabpanel id="generalPanel" orient="vertical">
       <!-- Accessibility -->
-      <groupbox id="accessibilityGroup" align="start">
+      <!--<groupbox id="accessibilityGroup" align="start">
         <caption><label>&accessibility.label;</label></caption>
 
 #ifdef XP_WIN
         <checkbox id="useOnScreenKeyboard"
                   hidden="true"
                   label="&useOnScreenKeyboard.label;"
                   accesskey="&useOnScreenKeyboard.accesskey;"
                   preference="ui.osk.enabled"/>
@@ -169,19 +127,19 @@
         <checkbox id="searchStartTyping"
                   label="&searchOnStartTyping.label;"
                   accesskey="&searchOnStartTyping.accesskey;"
                   preference="accessibility.typeaheadfind"/>
         <checkbox id="blockAutoRefresh"
                   label="&blockAutoReload.label;"
                   accesskey="&blockAutoReload.accesskey;"
                   preference="accessibility.blockautorefresh"/>
-      </groupbox>
+      </groupbox>-->
       <!-- Browsing -->
-      <groupbox id="browsingGroup" align="start">
+      <!--<groupbox id="browsingGroup" align="start">
         <caption><label>&browsing.label;</label></caption>
 
         <checkbox id="useAutoScroll"
                   label="&useAutoScroll.label;"
                   accesskey="&useAutoScroll.accesskey;"
                   preference="general.autoScroll"/>
         <checkbox id="useSmoothScrolling"
                   label="&useSmoothScrolling.label;"
@@ -192,61 +150,61 @@
                   accesskey="&allowHWAccel.accesskey;"
                   preference="layers.acceleration.disabled"/>
         <checkbox id="checkSpelling"
                   label="&checkUserSpelling.label;"
                   accesskey="&checkUserSpelling.accesskey;"
                   onsyncfrompreference="return gAdvancedPane.readCheckSpelling();"
                   onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
                   preference="layout.spellcheckDefault"/>
-      </groupbox>
+      </groupbox>-->
     </tabpanel>
 #ifdef MOZ_DATA_REPORTING
     <!-- Data Choices -->
     <tabpanel id="dataChoicesPanel" orient="vertical">
 #ifdef MOZ_TELEMETRY_REPORTING
       <groupbox>
         <caption>
           <checkbox id="submitHealthReportBox" label="&enableHealthReport.label;"
                     accesskey="&enableHealthReport.accesskey;"/>
         </caption>
         <vbox>
-          <hbox class="indent" flex="1">
-            <label flex="1">&healthReportDesc.label;</label>
-            <label id="FHRLearnMore" flex="1"
+          <hbox class="indent">
+            <label>&healthReportDesc.label;</label>
+            <label id="FHRLearnMore"
                    class="learnMore text-link">&healthReportLearnMore.label;</label>
           </hbox>
           <hbox class="indent">
             <groupbox flex="1">
               <caption>
                 <checkbox id="submitTelemetryBox" preference="toolkit.telemetry.enabled"
                           label="&enableTelemetryData.label;"
                           accesskey="&enableTelemetryData.accesskey;"/>
               </caption>
-              <hbox class="indent" flex="1">
-                <label id="telemetryDataDesc" flex="1">&telemetryDesc.label;</label>
-                <label id="telemetryLearnMore" flex="1"
+              <hbox class="indent">
+                <label id="telemetryDataDesc">&telemetryDesc.label;</label>
+                <label id="telemetryLearnMore"
                        class="learnMore text-link">&telemetryLearnMore.label;</label>
               </hbox>
             </groupbox>
           </hbox>
         </vbox>
       </groupbox>
 #endif
 #ifdef MOZ_CRASHREPORTER
       <groupbox>
         <caption>
           <checkbox id="automaticallySubmitCrashesBox"
                     preference="browser.crashReports.unsubmittedCheck.autoSubmit"
                     label="&alwaysSubmitCrashReports.label;"
                     accesskey="&alwaysSubmitCrashReports.accesskey;"/>
         </caption>
-        <hbox class="indent" flex="1">
-          <label flex="1">&crashReporterDesc2.label;</label>
-          <label id="crashReporterLearnMore" flex="1"
+        <hbox class="indent">
+          <label>&crashReporterDesc2.label;</label>
+          <label id="crashReporterLearnMore"
                  class="learnMore text-link">&crashReporterLearnMore.label;</label>
         </hbox>
       </groupbox>
 #endif
     </tabpanel>
 #endif
 
     <!-- Network -->
@@ -326,19 +284,17 @@
         </hbox>
       </groupbox>
 
       <!-- Site Data -->
       <groupbox id="siteDataGroup" hidden="true">
         <caption><label>&siteData.label;</label></caption>
 
         <hbox align="center">
-          <label id="totalSiteDataSize"></label>
-          <label id="siteDataLearnMoreLink" class="learnMore text-link" value="&siteDataLearnMoreLink.label;"></label>
-          <spacer flex="1" />
+          <label id="totalSiteDataSize" flex="1"></label>
           <button id="clearSiteDataButton" icon="clear"
                   label="&clearSiteData.label;" accesskey="&clearSiteData.accesskey;"/>
         </hbox>
         <vbox align="end">
           <button id="siteDataSettings"
                   label="&siteDataSettings.label;"
                   accesskey="&siteDataSettings.accesskey;"/>
         </vbox>
old mode 100644
new mode 100755
--- a/browser/components/preferences/in-content/applications.js
+++ b/browser/components/preferences/in-content/applications.js
@@ -1,18 +1,18 @@
 /* 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/. */
 
 "use strict";
 
 // Constants & Enumeration Values
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
+Components.utils.import('resource://gre/modules/Services.jsm');
+Components.utils.import('resource://gre/modules/AppConstants.jsm');
 const TYPE_MAYBE_FEED = "application/vnd.mozilla.maybe.feed";
 const TYPE_MAYBE_VIDEO_FEED = "application/vnd.mozilla.maybe.video.feed";
 const TYPE_MAYBE_AUDIO_FEED = "application/vnd.mozilla.maybe.audio.feed";
 const TYPE_PDF = "application/pdf";
 
 const PREF_PDFJS_DISABLED = "pdfjs.disabled";
 const TOPIC_PDFJS_HANDLER_CHANGED = "pdfjs:handlerChanged";
 
@@ -904,16 +904,20 @@ var gApplicationsPane = {
     setEventListener("focusSearch1", "command", gApplicationsPane.focusFilterBox);
     setEventListener("focusSearch2", "command", gApplicationsPane.focusFilterBox);
     setEventListener("filter", "command", gApplicationsPane.filter);
     setEventListener("handlersView", "select",
       gApplicationsPane.onSelectionChanged);
     setEventListener("typeColumn", "click", gApplicationsPane.sort);
     setEventListener("actionColumn", "click", gApplicationsPane.sort);
 
+    // ZACK AND AVALON
+    setEventListener("chooseFolder", "command", gApplicationsPane.chooseFolder);
+    setEventListener("browser.download.dir", "change", gApplicationsPane.displayDownloadDirPref);
+
     // Listen for window unload so we can remove our preference observers.
     window.addEventListener("unload", this);
 
     // Figure out how we should be sorting the list.  We persist sort settings
     // across sessions, so we can't assume the default sort column/direction.
     // XXX should we be using the XUL sort service instead?
     if (document.getElementById("actionColumn").hasAttribute("sortDirection")) {
       this._sortColumn = document.getElementById("actionColumn");
@@ -1880,11 +1884,221 @@ var gApplicationsPane = {
         } catch (ex) {}
       }
     }
 
     // If this isn't a MIME type object on an OS that supports retrieving
     // the icon, or if we couldn't retrieve the icon for some other reason,
     // then use a generic icon.
     return ICON_URL_APP;
-  }
+  },
+
+  // DOWNLOADS
+
+  /*
+   * Preferences:
+   *
+   * browser.download.useDownloadDir - bool
+   *   True - Save files directly to the folder configured via the
+   *   browser.download.folderList preference.
+   *   False - Always ask the user where to save a file and default to
+   *   browser.download.lastDir when displaying a folder picker dialog.
+   * browser.download.dir - local file handle
+   *   A local folder the user may have selected for downloaded files to be
+   *   saved. Migration of other browser settings may also set this path.
+   *   This folder is enabled when folderList equals 2.
+   * browser.download.lastDir - local file handle
+   *   May contain the last folder path accessed when the user browsed
+   *   via the file save-as dialog. (see contentAreaUtils.js)
+   * browser.download.folderList - int
+   *   Indicates the location users wish to save downloaded files too.
+   *   It is also used to display special file labels when the default
+   *   download location is either the Desktop or the Downloads folder.
+   *   Values:
+   *     0 - The desktop is the default download location.
+   *     1 - The system's downloads folder is the default download location.
+   *     2 - The default download location is elsewhere as specified in
+   *         browser.download.dir.
+   * browser.download.downloadDir
+   *   deprecated.
+   * browser.download.defaultFolder
+   *   deprecated.
+   */
+
+  /**
+   * Enables/disables the folder field and Browse button based on whether a
+   * default download directory is being used.
+   */
+  readUseDownloadDir() {
+    var downloadFolder = document.getElementById("downloadFolder");
+    var chooseFolder = document.getElementById("chooseFolder");
+    var preference = document.getElementById("browser.download.useDownloadDir");
+    downloadFolder.disabled = !preference.value || preference.locked;
+    chooseFolder.disabled = !preference.value || preference.locked;
+
+    // don't override the preference's value in UI
+    return undefined;
+  },
+
+  /**
+   * Displays a file picker in which the user can choose the location where
+   * downloads are automatically saved, updating preferences and UI in
+   * response to the choice, if one is made.
+   */
+  chooseFolder() {
+    return this.chooseFolderTask().catch(Components.utils.reportError);
+  },
+  chooseFolderTask: Task.async(function* () {
+    let bundlePreferences = document.getElementById("bundlePreferences");
+    let title = bundlePreferences.getString("chooseDownloadFolderTitle");
+    let folderListPref = document.getElementById("browser.download.folderList");
+    let currentDirPref = yield this._indexToFolder(folderListPref.value);
+    let defDownloads = yield this._indexToFolder(1);
+    let fp = Components.classes["@mozilla.org/filepicker;1"].
+             createInstance(Components.interfaces.nsIFilePicker);
+
+    fp.init(window, title, Components.interfaces.nsIFilePicker.modeGetFolder);
+    fp.appendFilters(Components.interfaces.nsIFilePicker.filterAll);
+    // First try to open what's currently configured
+    if (currentDirPref && currentDirPref.exists()) {
+      fp.displayDirectory = currentDirPref;
+    } else if (defDownloads && defDownloads.exists()) {
+      // Try the system's download dir
+      fp.displayDirectory = defDownloads;
+    } else {
+      // Fall back to Desktop
+      fp.displayDirectory = yield this._indexToFolder(0);
+    }
+
+    let result = yield new Promise(resolve => fp.open(resolve));
+    if (result != Components.interfaces.nsIFilePicker.returnOK) {
+      return;
+    }
+
+    let downloadDirPref = document.getElementById("browser.download.dir");
+    downloadDirPref.value = fp.file;
+    folderListPref.value = yield this._folderToIndex(fp.file);
+    // Note, the real prefs will not be updated yet, so dnld manager's
+    // userDownloadsDirectory may not return the right folder after
+    // this code executes. displayDownloadDirPref will be called on
+    // the assignment above to update the UI.
+  }),
+
+  /**
+   * Initializes the download folder display settings based on the user's
+   * preferences.
+   */
+  displayDownloadDirPref() {
+    this.displayDownloadDirPrefTask().catch(Components.utils.reportError);
+
+    // don't override the preference's value in UI
+    return undefined;
+  },
+
+  displayDownloadDirPrefTask: Task.async(function* () {
+    var folderListPref = document.getElementById("browser.download.folderList");
+    var bundlePreferences = document.getElementById("bundlePreferences");
+    var downloadFolder = document.getElementById("downloadFolder");
+    var currentDirPref = document.getElementById("browser.download.dir");
+
+    // Used in defining the correct path to the folder icon.
+    var ios = Components.classes["@mozilla.org/network/io-service;1"]
+                        .getService(Components.interfaces.nsIIOService);
+    var fph = ios.getProtocolHandler("file")
+                 .QueryInterface(Components.interfaces.nsIFileProtocolHandler);
+    var iconUrlSpec;
+
+    // Display a 'pretty' label or the path in the UI.
+    if (folderListPref.value == 2) {
+      // Custom path selected and is configured
+      downloadFolder.label = this._getDisplayNameOfFile(currentDirPref.value);
+      iconUrlSpec = fph.getURLSpecFromFile(currentDirPref.value);
+    } else if (folderListPref.value == 1) {
+      // 'Downloads'
+      // In 1.5, this pointed to a folder we created called 'My Downloads'
+      // and was available as an option in the 1.5 drop down. On XP this
+      // was in My Documents, on OSX it was in User Docs. In 2.0, we did
+      // away with the drop down option, although the special label was
+      // still supported for the folder if it existed. Because it was
+      // not exposed it was rarely used.
+      // With 3.0, a new desktop folder - 'Downloads' was introduced for
+      // platforms and versions that don't support a default system downloads
+      // folder. See nsDownloadManager for details.
+      downloadFolder.label = bundlePreferences.getString("downloadsFolderName");
+      iconUrlSpec = fph.getURLSpecFromFile(yield this._indexToFolder(1));
+    } else {
+      // 'Desktop'
+      downloadFolder.label = bundlePreferences.getString("desktopFolderName");
+      iconUrlSpec = fph.getURLSpecFromFile(yield this._getDownloadsFolder("Desktop"));
+    }
+    downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16";
+  }),
+
+  /**
+   * Returns the textual path of a folder in readable form.
+   */
+  _getDisplayNameOfFile(aFolder) {
+    // TODO: would like to add support for 'Downloads on Macintosh HD'
+    //       for OS X users.
+    return aFolder ? aFolder.path : "";
+  },
+
+  /**
+   * Returns the Downloads folder.  If aFolder is "Desktop", then the Downloads
+   * folder returned is the desktop folder; otherwise, it is a folder whose name
+   * indicates that it is a download folder and whose path is as determined by
+   * the XPCOM directory service via the download manager's attribute
+   * defaultDownloadsDirectory.
+   *
+   * @throws if aFolder is not "Desktop" or "Downloads"
+   */
+  _getDownloadsFolder: Task.async(function* (aFolder) {
+    switch (aFolder) {
+      case "Desktop":
+        var fileLoc = Components.classes["@mozilla.org/file/directory_service;1"]
+                                    .getService(Components.interfaces.nsIProperties);
+        return fileLoc.get("Desk", Components.interfaces.nsILocalFile);
+      case "Downloads":
+        let downloadsDir = yield Downloads.getSystemDownloadsDirectory();
+        return new FileUtils.File(downloadsDir);
+    }
+    throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
+  }),
+
+  /**
+   * Determines the type of the given folder.
+   *
+   * @param   aFolder
+   *          the folder whose type is to be determined
+   * @returns integer
+   *          0 if aFolder is the Desktop or is unspecified,
+   *          1 if aFolder is the Downloads folder,
+   *          2 otherwise
+   */
+  _folderToIndex: Task.async(function* (aFolder) {
+    if (!aFolder || aFolder.equals(yield this._getDownloadsFolder("Desktop")))
+      return 0;
+    else if (aFolder.equals(yield this._getDownloadsFolder("Downloads")))
+      return 1;
+    return 2;
+  }),
+
+  /**
+   * Converts an integer into the corresponding folder.
+   *
+   * @param   aIndex
+   *          an integer
+   * @returns the Desktop folder if aIndex == 0,
+   *          the Downloads folder if aIndex == 1,
+   *          the folder stored in browser.download.dir
+   */
+  _indexToFolder: Task.async(function* (aIndex) {
+    switch (aIndex) {
+      case 0:
+        return yield this._getDownloadsFolder("Desktop");
+      case 1:
+        return yield this._getDownloadsFolder("Downloads");
+    }
+    var currentDirPref = document.getElementById("browser.download.dir");
+    return currentDirPref.value;
+  })
 
 };
old mode 100644
new mode 100755
--- a/browser/components/preferences/in-content/applications.xul
+++ b/browser/components/preferences/in-content/applications.xul
@@ -66,16 +66,57 @@
   <label class="header-name" flex="1">&paneApplications.title;</label>
   <html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a>
 </hbox>
 
 <vbox id="applicationsContent"
       data-category="paneApplications"
       hidden="true"
       flex="1">
+
+  <!--Downloads-->
+  <groupbox id="downloadsGroup"
+            data-category="paneApplications"
+            hidden="false">
+    <caption><label>&downloads.label;</label></caption>
+
+    <radiogroup id="saveWhere"
+                preference="browser.download.useDownloadDir"
+                onsyncfrompreference="return gApplicationsPane.readUseDownloadDir();">
+      <hbox id="saveToRow">
+        <radio id="saveTo"
+              value="true"
+              label="&saveTo.label;"
+              accesskey="&saveTo.accesskey;"
+              aria-labelledby="saveTo downloadFolder"/>
+        <filefield id="downloadFolder"
+                  flex="1"
+                  preference="browser.download.folderList"
+                  preference-editable="true"
+                  aria-labelledby="saveTo"
+                  onsyncfrompreference="return gApplicationsPane.displayDownloadDirPref();"/>
+        <button id="chooseFolder"
+#ifdef XP_MACOSX
+                accesskey="&chooseFolderMac.accesskey;"
+                label="&chooseFolderMac.label;"
+#else
+                accesskey="&chooseFolderWin.accesskey;"
+                label="&chooseFolderWin.label;"
+#endif
+        />
+        <!--<button id="chooseFolder"/>-->
+      </hbox>
+      <hbox>
+        <radio id="alwaysAsk"
+              value="false"
+              label="&alwaysAskWhere.label;"
+              accesskey="&alwaysAskWhere.accesskey;"/>
+      </hbox>
+    </radiogroup>
+  </groupbox> 
   <hbox>
     <textbox id="filter" flex="1"
              type="search"
              placeholder="&filter.emptytext;"
              aria-controls="handlersView"/>
   </hbox>
 
   <separator class="thin"/>
--- a/browser/components/preferences/in-content/content.js
+++ b/browser/components/preferences/in-content/content.js
@@ -18,21 +18,21 @@ XPCOMUtils.defineLazyGetter(this, "Alert
 var gContentPane = {
   init() {
     function setEventListener(aId, aEventType, aCallback) {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gContentPane));
     }
 
     // Initializes the fonts dropdowns displayed in this pane.
-    this._rebuildFonts();
-    var menulist = document.getElementById("defaultFont");
-    if (menulist.selectedIndex == -1) {
-      menulist.value = FontBuilder.readFontSelection(menulist);
-    }
+    // this._rebuildFonts();
+    // var menulist = document.getElementById("defaultFont");
+    // if (menulist.selectedIndex == -1) {
+    //   menulist.value = FontBuilder.readFontSelection(menulist);
+    // }
 
     // Show translation preferences if we may:
     const prefName = "browser.translation.ui.show";
     if (Services.prefs.getBoolPref(prefName)) {
       let row = document.getElementById("translationBox");
       row.removeAttribute("hidden");
       // Showing attribution only for Bing Translator.
       Components.utils.import("resource:///modules/translation/Translation.jsm");
@@ -53,26 +53,26 @@ var gContentPane = {
     }
 
     setEventListener("font.language.group", "change",
       gContentPane._rebuildFonts);
     setEventListener("notificationsPolicyButton", "command",
       gContentPane.showNotificationExceptions);
     setEventListener("popupPolicyButton", "command",
       gContentPane.showPopupExceptions);
-    setEventListener("advancedFonts", "command",
-      gContentPane.configureFonts);
-    setEventListener("colors", "command",
-      gContentPane.configureColors);
-    setEventListener("chooseLanguage", "command",
-      gContentPane.showLanguages);
-    setEventListener("translationAttributionImage", "click",
-      gContentPane.openTranslationProviderAttribution);
-    setEventListener("translateButton", "command",
-      gContentPane.showTranslationExceptions);
+    // setEventListener("advancedFonts", "command",
+    //   gContentPane.configureFonts);
+    // setEventListener("colors", "command",
+    //   gContentPane.configureColors);
+    // setEventListener("chooseLanguage", "command",
+    //   gContentPane.showLanguages);
+    // setEventListener("translationAttributionImage", "click",
+    //   gContentPane.openTranslationProviderAttribution);
+    // setEventListener("translateButton", "command",
+    //   gContentPane.showTranslationExceptions);
     setEventListener("notificationsDoNotDisturb", "command",
       gContentPane.toggleDoNotDisturbNotifications);
 
     let notificationInfoURL =
       Services.urlFormatter.formatURLPref("app.support.baseURL") + "push";
     document.getElementById("notificationsPolicyLearnMore").setAttribute("href",
                                                                          notificationInfoURL);
 
@@ -231,50 +231,50 @@ var gContentPane = {
       preference.setAttribute("name", defaultFontTypePref);
       preference.setAttribute("type", "string");
       preference.setAttribute("onchange", "gContentPane._rebuildFonts();");
       document.getElementById("contentPreferences").appendChild(preference);
     }
     return preference.value;
   },
 
-  /**
-   * Displays the fonts dialog, where web page font names and sizes can be
-   * configured.
-   */
-  configureFonts() {
-    gSubDialog.open("chrome://browser/content/preferences/fonts.xul", "resizable=no");
-  },
+  // /**
+  //  * Displays the fonts dialog, where web page font names and sizes can be
+  //  * configured.
+  //  */
+  // configureFonts() {
+  //   gSubDialog.open("chrome://browser/content/preferences/fonts.xul", "resizable=no");
+  // },
 
-  /**
-   * Displays the colors dialog, where default web page/link/etc. colors can be
-   * configured.
-   */
-  configureColors() {
-    gSubDialog.open("chrome://browser/content/preferences/colors.xul", "resizable=no");
-  },
+  // /**
+  //  * Displays the colors dialog, where default web page/link/etc. colors can be
+  //  * configured.
+  //  */
+  // configureColors() {
+  //   gSubDialog.open("chrome://browser/content/preferences/colors.xul", "resizable=no");
+  // },
 
   // LANGUAGES
 
-  /**
-   * Shows a dialog in which the preferred language for web content may be set.
-   */
-  showLanguages() {
-    gSubDialog.open("chrome://browser/content/preferences/languages.xul");
-  },
+  // /**
+  //  * Shows a dialog in which the preferred language for web content may be set.
+  //  */
+  // showLanguages() {
+  //   gSubDialog.open("chrome://browser/content/preferences/languages.xul");
+  // },
 
-  /**
-   * Displays the translation exceptions dialog where specific site and language
-   * translation preferences can be set.
-   */
-  showTranslationExceptions() {
-    gSubDialog.open("chrome://browser/content/preferences/translation.xul");
-  },
+  // /**
+  //  * Displays the translation exceptions dialog where specific site and language
+  //  * translation preferences can be set.
+  //  */
+  // showTranslationExceptions() {
+  //   gSubDialog.open("chrome://browser/content/preferences/translation.xul");
+  // },
 
-  openTranslationProviderAttribution() {
-    Components.utils.import("resource:///modules/translation/Translation.jsm");
-    Translation.openProviderAttribution();
-  },
+  // openTranslationProviderAttribution() {
+  //   Components.utils.import("resource:///modules/translation/Translation.jsm");
+  //   Translation.openProviderAttribution();
+  // },
 
   toggleDoNotDisturbNotifications(event) {
     AlertsServiceDND.manualDoNotDisturb = event.target.checked;
   },
 };
--- a/browser/components/preferences/in-content/content.xul
+++ b/browser/components/preferences/in-content/content.xul
@@ -11,25 +11,25 @@
               name="media.eme.enabled"
               type="bool"/>
 
   <!-- Popups -->
   <preference id="dom.disable_open_during_load"
               name="dom.disable_open_during_load"
               type="bool"/>
 
-  <!-- Fonts -->
-  <preference id="font.language.group"
+   <!--Fonts -->
+  <!--<preference id="font.language.group"
               name="font.language.group"
-              type="wstring"/>
+              type="wstring"/>-->
 
   <!-- Languages -->
-  <preference id="browser.translation.detectLanguage"
+  <!--<preference id="browser.translation.detectLanguage"
               name="browser.translation.detectLanguage"
-              type="bool"/>
+              type="bool"/>-->
 </preferences>
 
 <script type="application/javascript"
         src="chrome://mozapps/content/preferences/fontbuilder.js"/>
 <script type="application/javascript"
         src="chrome://browser/content/preferences/in-content/content.js"/>
 
 <hbox id="header-content"
@@ -112,17 +112,17 @@
                   accesskey="&popupExceptions.accesskey;"/>
         </hbox>
       </row>
     </rows>
   </grid>
 </groupbox>
 
 <!-- Fonts and Colors -->
-<groupbox id="fontsGroup" data-category="paneContent" hidden="true">
+<!--<groupbox id="fontsGroup" data-category="paneContent" hidden="true">
   <caption><label>&fontsAndColors.label;</label></caption>
 
   <grid id="fontsGrid">
     <columns>
       <column flex="1"/>
       <column/>
     </columns>
     <rows id="fontsRows">
@@ -168,20 +168,20 @@
       <row id="colorsRow">
         <hbox/>
         <button id="colors" icon="select-color"
                 label="&colors.label;"
                 accesskey="&colors.accesskey;"/>
       </row>
     </rows>
   </grid>
-</groupbox>
+</groupbox>-->
 
 <!-- Languages -->
-<groupbox id="languagesGroup" data-category="paneContent" hidden="true">
+<!--<groupbox id="languagesGroup" data-category="paneContent" hidden="true">
   <caption><label>&languages.label;</label></caption>
 
   <hbox id="languagesBox" align="center">
     <description flex="1" control="chooseLanguage">&chooseLanguage.label;</description>
     <button id="chooseLanguage"
             label="&chooseButton.label;"
             accesskey="&chooseButton.accesskey;"/>
   </hbox>
@@ -199,9 +199,9 @@
                src="chrome://browser/content/microsoft-translator-attribution.png"/>
         <separator orient="vertical" class="thin"/>
         <label>&translation.options.attribution.afterLogo;</label>
       </hbox>
     </hbox>
     <button id="translateButton" label="&translateExceptions.label;"
             accesskey="&translateExceptions.accesskey;"/>
   </hbox>
-</groupbox>
+</groupbox>-->
old mode 100644
new mode 100755
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -61,30 +61,52 @@ var gMainPane = {
     // re-enable the warnings.
     if (!TransientPrefs.prefShouldBeVisible("browser.tabs.warnOnClose"))
       document.getElementById("warnCloseMultiple").hidden = true;
     if (!TransientPrefs.prefShouldBeVisible("browser.tabs.warnOnOpen"))
       document.getElementById("warnOpenMany").hidden = true;
 
     setEventListener("browser.privatebrowsing.autostart", "change",
                      gMainPane.updateBrowserStartupLastSession);
-    setEventListener("browser.download.dir", "change",
-                     gMainPane.displayDownloadDirPref);
+    // setEventListener("browser.download.dir", "change",
+    //                  gMainPane.displayDownloadDirPref);
     if (AppConstants.HAVE_SHELL_SERVICE) {
       setEventListener("setDefaultButton", "command",
                        gMainPane.setDefaultBrowser);
     }
     setEventListener("useCurrent", "command",
                      gMainPane.setHomePageToCurrent);
     setEventListener("useBookmark", "command",
                      gMainPane.setHomePageToBookmark);
     setEventListener("restoreDefaultHomePage", "command",
                      gMainPane.restoreDefaultHomePage);
-    setEventListener("chooseFolder", "command",
-                     gMainPane.chooseFolder);
+    //setEventListener("chooseFolder", "command",
+    //                 gMainPane.chooseFolder);
+
+    // Content.js setEventListener language functions
+    setEventListener("chooseLanguage", "command",
+      gMainPane.showLanguages);
+    setEventListener("translationAttributionImage", "click",
+      gMainPane.openTranslationProviderAttribution);
+    setEventListener("translateButton", "command",
+      gMainPane.showTranslationExceptions);
+
+    // Content.js setEventListener font functions
+    setEventListener("advancedFonts", "command",
+      gMainPane.configureFonts);
+    setEventListener("colors", "command",
+      gMainPane.configureColors);
+
+    // Content.js init function
+    // Initializes the fonts dropdowns displayed in this pane.
+    this._rebuildFonts();
+    var menulist = document.getElementById("defaultFont");
+    if (menulist.selectedIndex == -1) {
+      menulist.value = FontBuilder.readFontSelection(menulist);
+    }
 
     if (AppConstants.E10S_TESTING_ONLY) {
       setEventListener("e10sAutoStart", "command",
                        gMainPane.enableE10SChange);
       let e10sCheckbox = document.getElementById("e10sAutoStart");
 
       let e10sPref = document.getElementById("browser.tabs.remote.autostart");
       let e10sTempPref = document.getElementById("e10sTempPref");
@@ -363,225 +385,225 @@ var gMainPane = {
   /**
    * Restores the default home page as the user's home page.
    */
   restoreDefaultHomePage() {
     var homePage = document.getElementById("browser.startup.homepage");
     homePage.value = homePage.defaultValue;
   },
 
-  // DOWNLOADS
+  // // DOWNLOADS
 
-  /*
-   * Preferences:
-   *
-   * browser.download.useDownloadDir - bool
-   *   True - Save files directly to the folder configured via the
-   *   browser.download.folderList preference.
-   *   False - Always ask the user where to save a file and default to
-   *   browser.download.lastDir when displaying a folder picker dialog.
-   * browser.download.dir - local file handle
-   *   A local folder the user may have selected for downloaded files to be
-   *   saved. Migration of other browser settings may also set this path.
-   *   This folder is enabled when folderList equals 2.
-   * browser.download.lastDir - local file handle
-   *   May contain the last folder path accessed when the user browsed
-   *   via the file save-as dialog. (see contentAreaUtils.js)
-   * browser.download.folderList - int
-   *   Indicates the location users wish to save downloaded files too.
-   *   It is also used to display special file labels when the default
-   *   download location is either the Desktop or the Downloads folder.
-   *   Values:
-   *     0 - The desktop is the default download location.
-   *     1 - The system's downloads folder is the default download location.
-   *     2 - The default download location is elsewhere as specified in
-   *         browser.download.dir.
-   * browser.download.downloadDir
-   *   deprecated.
-   * browser.download.defaultFolder
-   *   deprecated.
-   */
+  // /*
+  //  * Preferences:
+  //  *
+  //  * browser.download.useDownloadDir - bool
+  //  *   True - Save files directly to the folder configured via the
+  //  *   browser.download.folderList preference.
+  //  *   False - Always ask the user where to save a file and default to
+  //  *   browser.download.lastDir when displaying a folder picker dialog.
+  //  * browser.download.dir - local file handle
+  //  *   A local folder the user may have selected for downloaded files to be
+  //  *   saved. Migration of other browser settings may also set this path.
+  //  *   This folder is enabled when folderList equals 2.
+  //  * browser.download.lastDir - local file handle
+  //  *   May contain the last folder path accessed when the user browsed
+  //  *   via the file save-as dialog. (see contentAreaUtils.js)
+  //  * browser.download.folderList - int
+  //  *   Indicates the location users wish to save downloaded files too.
+  //  *   It is also used to display special file labels when the default
+  //  *   download location is either the Desktop or the Downloads folder.
+  //  *   Values:
+  //  *     0 - The desktop is the default download location.
+  //  *     1 - The system's downloads folder is the default download location.
+  //  *     2 - The default download location is elsewhere as specified in
+  //  *         browser.download.dir.
+  //  * browser.download.downloadDir
+  //  *   deprecated.
+  //  * browser.download.defaultFolder
+  //  *   deprecated.
+  //  */
 
-  /**
-   * Enables/disables the folder field and Browse button based on whether a
-   * default download directory is being used.
-   */
-  readUseDownloadDir() {
-    var downloadFolder = document.getElementById("downloadFolder");
-    var chooseFolder = document.getElementById("chooseFolder");
-    var preference = document.getElementById("browser.download.useDownloadDir");
-    downloadFolder.disabled = !preference.value || preference.locked;
-    chooseFolder.disabled = !preference.value || preference.locked;
+  // /**
+  //  * Enables/disables the folder field and Browse button based on whether a
+  //  * default download directory is being used.
+  //  */
+  // readUseDownloadDir() {
+  //   var downloadFolder = document.getElementById("downloadFolder");
+  //   var chooseFolder = document.getElementById("chooseFolder");
+  //   var preference = document.getElementById("browser.download.useDownloadDir");
+  //   downloadFolder.disabled = !preference.value || preference.locked;
+  //   chooseFolder.disabled = !preference.value || preference.locked;
 
-    // don't override the preference's value in UI
-    return undefined;
-  },
+  //   // don't override the preference's value in UI
+  //   return undefined;
+  // },
 
-  /**
-   * Displays a file picker in which the user can choose the location where
-   * downloads are automatically saved, updating preferences and UI in
-   * response to the choice, if one is made.
-   */
-  chooseFolder() {
-    return this.chooseFolderTask().catch(Components.utils.reportError);
-  },
-  chooseFolderTask: Task.async(function* () {
-    let bundlePreferences = document.getElementById("bundlePreferences");
-    let title = bundlePreferences.getString("chooseDownloadFolderTitle");
-    let folderListPref = document.getElementById("browser.download.folderList");
-    let currentDirPref = yield this._indexToFolder(folderListPref.value);
-    let defDownloads = yield this._indexToFolder(1);
-    let fp = Components.classes["@mozilla.org/filepicker;1"].
-             createInstance(Components.interfaces.nsIFilePicker);
+  // /**
+  //  * Displays a file picker in which the user can choose the location where
+  //  * downloads are automatically saved, updating preferences and UI in
+  //  * response to the choice, if one is made.
+  //  */
+  // chooseFolder() {
+  //   return this.chooseFolderTask().catch(Components.utils.reportError);
+  // },
+  // chooseFolderTask: Task.async(function* () {
+  //   let bundlePreferences = document.getElementById("bundlePreferences");
+  //   let title = bundlePreferences.getString("chooseDownloadFolderTitle");
+  //   let folderListPref = document.getElementById("browser.download.folderList");
+  //   let currentDirPref = yield this._indexToFolder(folderListPref.value);
+  //   let defDownloads = yield this._indexToFolder(1);
+  //   let fp = Components.classes["@mozilla.org/filepicker;1"].
+  //            createInstance(Components.interfaces.nsIFilePicker);
 
-    fp.init(window, title, Components.interfaces.nsIFilePicker.modeGetFolder);
-    fp.appendFilters(Components.interfaces.nsIFilePicker.filterAll);
-    // First try to open what's currently configured
-    if (currentDirPref && currentDirPref.exists()) {
-      fp.displayDirectory = currentDirPref;
-    } else if (defDownloads && defDownloads.exists()) {
-      // Try the system's download dir
-      fp.displayDirectory = defDownloads;
-    } else {
-      // Fall back to Desktop
-      fp.displayDirectory = yield this._indexToFolder(0);
-    }
+  //   fp.init(window, title, Components.interfaces.nsIFilePicker.modeGetFolder);
+  //   fp.appendFilters(Components.interfaces.nsIFilePicker.filterAll);
+  //   // First try to open what's currently configured
+  //   if (currentDirPref && currentDirPref.exists()) {
+  //     fp.displayDirectory = currentDirPref;
+  //   } else if (defDownloads && defDownloads.exists()) {
+  //     // Try the system's download dir
+  //     fp.displayDirectory = defDownloads;
+  //   } else {
+  //     // Fall back to Desktop
+  //     fp.displayDirectory = yield this._indexToFolder(0);
+  //   }
 
-    let result = yield new Promise(resolve => fp.open(resolve));
-    if (result != Components.interfaces.nsIFilePicker.returnOK) {
-      return;
-    }
+  //   let result = yield new Promise(resolve => fp.open(resolve));
+  //   if (result != Components.interfaces.nsIFilePicker.returnOK) {
+  //     return;
+  //   }
 
-    let downloadDirPref = document.getElementById("browser.download.dir");
-    downloadDirPref.value = fp.file;
-    folderListPref.value = yield this._folderToIndex(fp.file);
-    // Note, the real prefs will not be updated yet, so dnld manager's
-    // userDownloadsDirectory may not return the right folder after
-    // this code executes. displayDownloadDirPref will be called on
-    // the assignment above to update the UI.
-  }),
+  //   let downloadDirPref = document.getElementById("browser.download.dir");
+  //   downloadDirPref.value = fp.file;
+  //   folderListPref.value = yield this._folderToIndex(fp.file);
+  //   // Note, the real prefs will not be updated yet, so dnld manager's
+  //   // userDownloadsDirectory may not return the right folder after
+  //   // this code executes. displayDownloadDirPref will be called on
+  //   // the assignment above to update the UI.
+  // }),
 
-  /**
-   * Initializes the download folder display settings based on the user's
-   * preferences.
-   */
-  displayDownloadDirPref() {
-    this.displayDownloadDirPrefTask().catch(Components.utils.reportError);
+  // /**
+  //  * Initializes the download folder display settings based on the user's
+  //  * preferences.
+  //  */
+  // displayDownloadDirPref() {
+  //   this.displayDownloadDirPrefTask().catch(Components.utils.reportError);
 
-    // don't override the preference's value in UI
-    return undefined;
-  },
+  //   // don't override the preference's value in UI
+  //   return undefined;
+  // },
 
-  displayDownloadDirPrefTask: Task.async(function* () {
-    var folderListPref = document.getElementById("browser.download.folderList");
-    var bundlePreferences = document.getElementById("bundlePreferences");
-    var downloadFolder = document.getElementById("downloadFolder");
-    var currentDirPref = document.getElementById("browser.download.dir");
+  // displayDownloadDirPrefTask: Task.async(function* () {
+  //   var folderListPref = document.getElementById("browser.download.folderList");
+  //   var bundlePreferences = document.getElementById("bundlePreferences");
+  //   var downloadFolder = document.getElementById("downloadFolder");
+  //   var currentDirPref = document.getElementById("browser.download.dir");
 
-    // Used in defining the correct path to the folder icon.
-    var ios = Components.classes["@mozilla.org/network/io-service;1"]
-                        .getService(Components.interfaces.nsIIOService);
-    var fph = ios.getProtocolHandler("file")
-                 .QueryInterface(Components.interfaces.nsIFileProtocolHandler);
-    var iconUrlSpec;
+  //   // Used in defining the correct path to the folder icon.
+  //   var ios = Components.classes["@mozilla.org/network/io-service;1"]
+  //                       .getService(Components.interfaces.nsIIOService);
+  //   var fph = ios.getProtocolHandler("file")
+  //                .QueryInterface(Components.interfaces.nsIFileProtocolHandler);
+  //   var iconUrlSpec;
 
-    // Display a 'pretty' label or the path in the UI.
-    if (folderListPref.value == 2) {
-      // Custom path selected and is configured
-      downloadFolder.label = this._getDisplayNameOfFile(currentDirPref.value);
-      iconUrlSpec = fph.getURLSpecFromFile(currentDirPref.value);
-    } else if (folderListPref.value == 1) {
-      // 'Downloads'
-      // In 1.5, this pointed to a folder we created called 'My Downloads'
-      // and was available as an option in the 1.5 drop down. On XP this
-      // was in My Documents, on OSX it was in User Docs. In 2.0, we did
-      // away with the drop down option, although the special label was
-      // still supported for the folder if it existed. Because it was
-      // not exposed it was rarely used.
-      // With 3.0, a new desktop folder - 'Downloads' was introduced for
-      // platforms and versions that don't support a default system downloads
-      // folder. See nsDownloadManager for details.
-      downloadFolder.label = bundlePreferences.getString("downloadsFolderName");
-      iconUrlSpec = fph.getURLSpecFromFile(yield this._indexToFolder(1));
-    } else {
-      // 'Desktop'
-      downloadFolder.label = bundlePreferences.getString("desktopFolderName");
-      iconUrlSpec = fph.getURLSpecFromFile(yield this._getDownloadsFolder("Desktop"));
-    }
-    downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16";
-  }),
+  //   // Display a 'pretty' label or the path in the UI.
+  //   if (folderListPref.value == 2) {
+  //     // Custom path selected and is configured
+  //     downloadFolder.label = this._getDisplayNameOfFile(currentDirPref.value);
+  //     iconUrlSpec = fph.getURLSpecFromFile(currentDirPref.value);
+  //   } else if (folderListPref.value == 1) {
+  //     // 'Downloads'
+  //     // In 1.5, this pointed to a folder we created called 'My Downloads'
+  //     // and was available as an option in the 1.5 drop down. On XP this
+  //     // was in My Documents, on OSX it was in User Docs. In 2.0, we did
+  //     // away with the drop down option, although the special label was
+  //     // still supported for the folder if it existed. Because it was
+  //     // not exposed it was rarely used.
+  //     // With 3.0, a new desktop folder - 'Downloads' was introduced for
+  //     // platforms and versions that don't support a default system downloads
+  //     // folder. See nsDownloadManager for details.
+  //     downloadFolder.label = bundlePreferences.getString("downloadsFolderName");
+  //     iconUrlSpec = fph.getURLSpecFromFile(yield this._indexToFolder(1));
+  //   } else {
+  //     // 'Desktop'
+  //     downloadFolder.label = bundlePreferences.getString("desktopFolderName");
+  //     iconUrlSpec = fph.getURLSpecFromFile(yield this._getDownloadsFolder("Desktop"));
+  //   }
+  //   downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16";
+  // }),
 
-  /**
-   * Returns the textual path of a folder in readable form.
-   */
-  _getDisplayNameOfFile(aFolder) {
-    // TODO: would like to add support for 'Downloads on Macintosh HD'
-    //       for OS X users.
-    return aFolder ? aFolder.path : "";
-  },
+  // /**
+  //  * Returns the textual path of a folder in readable form.
+  //  */
+  // _getDisplayNameOfFile(aFolder) {
+  //   // TODO: would like to add support for 'Downloads on Macintosh HD'
+  //   //       for OS X users.
+  //   return aFolder ? aFolder.path : "";
+  // },
 
-  /**
-   * Returns the Downloads folder.  If aFolder is "Desktop", then the Downloads
-   * folder returned is the desktop folder; otherwise, it is a folder whose name
-   * indicates that it is a download folder and whose path is as determined by
-   * the XPCOM directory service via the download manager's attribute
-   * defaultDownloadsDirectory.
-   *
-   * @throws if aFolder is not "Desktop" or "Downloads"
-   */
-  _getDownloadsFolder: Task.async(function* (aFolder) {
-    switch (aFolder) {
-      case "Desktop":
-        var fileLoc = Components.classes["@mozilla.org/file/directory_service;1"]
-                                    .getService(Components.interfaces.nsIProperties);
-        return fileLoc.get("Desk", Components.interfaces.nsILocalFile);
-      case "Downloads":
-        let downloadsDir = yield Downloads.getSystemDownloadsDirectory();
-        return new FileUtils.File(downloadsDir);
-    }
-    throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
-  }),
+  // /**
+  //  * Returns the Downloads folder.  If aFolder is "Desktop", then the Downloads
+  //  * folder returned is the desktop folder; otherwise, it is a folder whose name
+  //  * indicates that it is a download folder and whose path is as determined by
+  //  * the XPCOM directory service via the download manager's attribute
+  //  * defaultDownloadsDirectory.
+  //  *
+  //  * @throws if aFolder is not "Desktop" or "Downloads"
+  //  */
+  // _getDownloadsFolder: Task.async(function* (aFolder) {
+  //   switch (aFolder) {
+  //     case "Desktop":
+  //       var fileLoc = Components.classes["@mozilla.org/file/directory_service;1"]
+  //                                   .getService(Components.interfaces.nsIProperties);
+  //       return fileLoc.get("Desk", Components.interfaces.nsILocalFile);
+  //     case "Downloads":
+  //       let downloadsDir = yield Downloads.getSystemDownloadsDirectory();
+  //       return new FileUtils.File(downloadsDir);
+  //   }
+  //   throw "ASSERTION FAILED: folder type should be 'Desktop' or 'Downloads'";
+  // }),
 
-  /**
-   * Determines the type of the given folder.
-   *
-   * @param   aFolder
-   *          the folder whose type is to be determined
-   * @returns integer
-   *          0 if aFolder is the Desktop or is unspecified,
-   *          1 if aFolder is the Downloads folder,
-   *          2 otherwise
-   */
-  _folderToIndex: Task.async(function* (aFolder) {
-    if (!aFolder || aFolder.equals(yield this._getDownloadsFolder("Desktop")))
-      return 0;
-    else if (aFolder.equals(yield this._getDownloadsFolder("Downloads")))
-      return 1;
-    return 2;
-  }),
+  // /**
+  //  * Determines the type of the given folder.
+  //  *
+  //  * @param   aFolder
+  //  *          the folder whose type is to be determined
+  //  * @returns integer
+  //  *          0 if aFolder is the Desktop or is unspecified,
+  //  *          1 if aFolder is the Downloads folder,
+  //  *          2 otherwise
+  //  */
+  // _folderToIndex: Task.async(function* (aFolder) {
+  //   if (!aFolder || aFolder.equals(yield this._getDownloadsFolder("Desktop")))
+  //     return 0;
+  //   else if (aFolder.equals(yield this._getDownloadsFolder("Downloads")))
+  //     return 1;
+  //   return 2;
+  // }),
 
-  /**
-   * Converts an integer into the corresponding folder.
-   *
-   * @param   aIndex
-   *          an integer
-   * @returns the Desktop folder if aIndex == 0,
-   *          the Downloads folder if aIndex == 1,
-   *          the folder stored in browser.download.dir
-   */
-  _indexToFolder: Task.async(function* (aIndex) {
-    switch (aIndex) {
-      case 0:
-        return yield this._getDownloadsFolder("Desktop");
-      case 1:
-        return yield this._getDownloadsFolder("Downloads");
-    }
-    var currentDirPref = document.getElementById("browser.download.dir");
-    return currentDirPref.value;
-  }),
+  // /**
+  //  * Converts an integer into the corresponding folder.
+  //  *
+  //  * @param   aIndex
+  //  *          an integer
+  //  * @returns the Desktop folder if aIndex == 0,
+  //  *          the Downloads folder if aIndex == 1,
+  //  *          the folder stored in browser.download.dir
+  //  */
+  // _indexToFolder: Task.async(function* (aIndex) {
+  //   switch (aIndex) {
+  //     case 0:
+  //       return yield this._getDownloadsFolder("Desktop");
+  //     case 1:
+  //       return yield this._getDownloadsFolder("Downloads");
+  //   }
+  //   var currentDirPref = document.getElementById("browser.download.dir");
+  //   return currentDirPref.value;
+  // }),
 
   /**
    * Hide/show the "Show my windows and tabs from last time" option based
    * on the value of the browser.privatebrowsing.autostart pref.
    */
   updateBrowserStartupLastSession() {
     let pbAutoStartPref = document.getElementById("browser.privatebrowsing.autostart");
     let startupPref = document.getElementById("browser.startup.page");
@@ -689,9 +711,128 @@ var gMainPane = {
         Cu.reportError(ex);
         return;
       }
 
       let selectedIndex = shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
       document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
     }
   },
+
+  // CONTENT JS FUNCTIONS
+
+  /**
+   * Shows a dialog in which the preferred language for web content may be set.
+   */
+  showLanguages() {
+    gSubDialog.open("chrome://browser/content/preferences/languages.xul");
+  },
+
+  /**
+   * Displays the translation exceptions dialog where specific site and language
+   * translation preferences can be set.
+   */
+  showTranslationExceptions() {
+    gSubDialog.open("chrome://browser/content/preferences/translation.xul");
+  },
+
+  openTranslationProviderAttribution() {
+    Components.utils.import("resource:///modules/translation/Translation.jsm");
+    Translation.openProviderAttribution();
+  },
+
+  /**
+   * Displays the fonts dialog, where web page font names and sizes can be
+   * configured.
+   */
+  configureFonts() {
+    gSubDialog.open("chrome://browser/content/preferences/fonts.xul", "resizable=no");
+  },
+
+  /**
+   * Displays the colors dialog, where default web page/link/etc. colors can be
+   * configured.
+   */
+  configureColors() {
+    gSubDialog.open("chrome://browser/content/preferences/colors.xul", "resizable=no");
+  },
+
+  // FONTS
+
+  /**
+   * Populates the default font list in UI.
+   */
+  _rebuildFonts() {
+    var preferences = document.getElementById("contentPreferences");
+    // Ensure preferences are "visible" to ensure bindings work.
+    preferences.hidden = false;
+    // Force flush:
+    preferences.clientHeight;
+    var langGroupPref = document.getElementById("font.language.group");
+    this._selectDefaultLanguageGroup(langGroupPref.value,
+                                     this._readDefaultFontTypeForLanguage(langGroupPref.value) == "serif");
+  },
+
+  /**
+   * Returns the type of the current default font for the language denoted by
+   * aLanguageGroup.
+   */
+  _readDefaultFontTypeForLanguage(aLanguageGroup) {
+    const kDefaultFontType = "font.default.%LANG%";
+    var defaultFontTypePref = kDefaultFontType.replace(/%LANG%/, aLanguageGroup);
+    var preference = document.getElementById(defaultFontTypePref);
+    if (!preference) {
+      preference = document.createElement("preference");
+      preference.id = defaultFontTypePref;
+      preference.setAttribute("name", defaultFontTypePref);
+      preference.setAttribute("type", "string");
+      preference.setAttribute("onchange", "gContentPane._rebuildFonts();");
+      document.getElementById("contentPreferences").appendChild(preference);
+    }
+    return preference.value;
+  },
+
+  _selectDefaultLanguageGroup(aLanguageGroup, aIsSerif) {
+    const kFontNameFmtSerif         = "font.name.serif.%LANG%";
+    const kFontNameFmtSansSerif     = "font.name.sans-serif.%LANG%";
+    const kFontNameListFmtSerif     = "font.name-list.serif.%LANG%";
+    const kFontNameListFmtSansSerif = "font.name-list.sans-serif.%LANG%";
+    const kFontSizeFmtVariable      = "font.size.variable.%LANG%";
+
+    var preferences = document.getElementById("contentPreferences");
+    var prefs = [{ format   : aIsSerif ? kFontNameFmtSerif : kFontNameFmtSansSerif,
+                   type     : "fontname",
+                   element  : "defaultFont",
+                   fonttype : aIsSerif ? "serif" : "sans-serif" },
+                 { format   : aIsSerif ? kFontNameListFmtSerif : kFontNameListFmtSansSerif,
+                   type     : "unichar",
+                   element  : null,
+                   fonttype : aIsSerif ? "serif" : "sans-serif" },
+                 { format   : kFontSizeFmtVariable,
+                   type     : "int",
+                   element  : "defaultFontSize",
+                   fonttype : null }];
+    for (var i = 0; i < prefs.length; ++i) {
+      var preference = document.getElementById(prefs[i].format.replace(/%LANG%/, aLanguageGroup));
+      if (!preference) {
+        preference = document.createElement("preference");
+        var name = prefs[i].format.replace(/%LANG%/, aLanguageGroup);
+        preference.id = name;
+        preference.setAttribute("name", name);
+        preference.setAttribute("type", prefs[i].type);
+        preferences.appendChild(preference);
+      }
+
+      if (!prefs[i].element)
+        continue;
+
+      var element = document.getElementById(prefs[i].element);
+      if (element) {
+        element.setAttribute("preference", preference.id);
+
+        if (prefs[i].fonttype)
+          FontBuilder.buildFontList(aLanguageGroup, prefs[i].fonttype, element);
+
+        preference.setElementValue(element);
+      }
+    }
+  },
 };
old mode 100644
new mode 100755
--- a/browser/components/preferences/in-content/main.xul
+++ b/browser/components/preferences/in-content/main.xul
@@ -2,16 +2,37 @@
 # 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/.
 
 <!-- General panel -->
 
 <script type="application/javascript"
         src="chrome://browser/content/preferences/in-content/main.js"/>
 
+<script type="application/javascript"
+            src="chrome://browser/content/preferences/in-content/search.js"/>
+
+<!--<preferences id="searchPreferences" hidden="true" data-category="paneSearch">
+
+      <preference id="browser.search.suggest.enabled"
+                  name="browser.search.suggest.enabled"
+                  type="bool"/>
+
+      <preference id="browser.urlbar.suggest.searches"
+                  name="browser.urlbar.suggest.searches"
+                  type="bool"/>
+
+      <preference id="browser.search.hiddenOneOffs"
+                  name="browser.search.hiddenOneOffs"
+                  type="unichar"/>
+
+</preferences>-->
+
+    <stringbundle id="engineManagerBundle" src="chrome://browser/locale/engineManager.properties"/>
+
 <preferences id="mainPreferences" hidden="true" data-category="paneGeneral">
 
 #ifdef E10S_TESTING_ONLY
     <preference id="browser.tabs.remote.autostart"
                 name="browser.tabs.remote.autostart"
                 type="bool"/>
     <preference id="e10sTempPref"
                 name="browser.tabs.remote.autostart.2"
@@ -48,16 +69,29 @@
     <preference id="pref.browser.homepage.disable_button.restore_default"
                 name="pref.browser.homepage.disable_button.restore_default"
                 type="bool"/>
 
     <preference id="browser.privatebrowsing.autostart"
                 name="browser.privatebrowsing.autostart"
                 type="bool"/>
 
+      <!-- Search Engine -->
+    <preference id="browser.search.suggest.enabled"
+                  name="browser.search.suggest.enabled"
+                  type="bool"/>
+
+    <preference id="browser.urlbar.suggest.searches"
+                name="browser.urlbar.suggest.searches"
+                type="bool"/>
+
+    <preference id="browser.search.hiddenOneOffs"
+                name="browser.search.hiddenOneOffs"
+                type="unichar"/>
+
     <!-- Downloads -->
     <preference id="browser.download.useDownloadDir"
                 name="browser.download.useDownloadDir"
                 type="bool"/>
 
     <preference id="browser.download.folderList"
                 name="browser.download.folderList"
                 type="int"/>
@@ -103,16 +137,70 @@
 #ifdef XP_WIN
     <preference id="browser.taskbar.previews.enable"
                 name="browser.taskbar.previews.enable"
                 type="bool"/>
 #endif
     <preference id="browser.ctrlTab.previews"
                 name="browser.ctrlTab.previews"
                 type="bool"/>
+
+    <!-- Fonts -->
+  <preference id="font.language.group"
+              name="font.language.group"
+              type="wstring"/>
+
+    <!-- Languages -->
+  <preference id="browser.translation.detectLanguage"
+              name="browser.translation.detectLanguage"
+              type="bool"/>
+
+    <!-- General tab -->
+
+    <!-- Accessibility -->
+  <preference id="accessibility.browsewithcaret"
+              name="accessibility.browsewithcaret"
+              type="bool"/>
+  <preference id="accessibility.typeaheadfind"
+              name="accessibility.typeaheadfind"
+              type="bool"/>
+  <preference id="accessibility.blockautorefresh"
+              name="accessibility.blockautorefresh"
+              type="bool"/>
+#ifdef XP_WIN
+  <preference id="ui.osk.enabled"
+              name="ui.osk.enabled"
+              type="bool"/>
+#endif
+    <!-- Browsing -->
+  <preference id="general.autoScroll"
+              name="general.autoScroll"
+              type="bool"/>
+  <preference id="general.smoothScroll"
+              name="general.smoothScroll"
+              type="bool"/>
+  <preference id="layers.acceleration.disabled"
+              name="layers.acceleration.disabled"
+              type="bool"
+              inverted="true"/>
+#ifdef XP_WIN
+  <preference id="gfx.direct2d.disabled"
+              name="gfx.direct2d.disabled"
+              type="bool"
+              inverted="true"/>
+#endif
+  <preference id="layout.spellcheckDefault"
+              name="layout.spellcheckDefault"
+              type="int"/>
+
+#ifdef MOZ_TELEMETRY_REPORTING
+  <preference id="toolkit.telemetry.enabled"
+              name="toolkit.telemetry.enabled"
+              type="bool"/>
+#endif
 </preferences>
 
 <hbox id="header-general"
       class="header"
       hidden="true"
       data-category="paneGeneral">
   <label class="header-name" flex="1">&paneGeneral.title;</label>
   <html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a>
@@ -221,17 +309,77 @@
                 label="&restoreDefault.label;"
                 accesskey="&restoreDefault.accesskey;"
                 preference="pref.browser.homepage.disable_button.restore_default"/>
       </html:td>
     </html:tr>
   </html:table>
 </groupbox>
 
-<!-- Downloads -->
+<!-- Default Search Engine -->
+<groupbox id="defaultEngineGroup" align="start" data-category="paneGeneral">
+  <caption label="&defaultSearchEngine.label;"/>
+  <label>&chooseYourDefaultSearchEngine.label;</label>
+  <menulist id="defaultEngine">
+    <menupopup/>
+  </menulist>
+  <checkbox id="suggestionsInSearchFieldsCheckbox"
+            label="&provideSearchSuggestions.label;"
+            accesskey="&provideSearchSuggestions.accesskey;"
+            preference="browser.search.suggest.enabled"/>
+  <vbox class="indent">
+    <checkbox id="urlBarSuggestion" label="&showURLBarSuggestions.label;"
+              accesskey="&showURLBarSuggestions.accesskey;"
+              preference="browser.urlbar.suggest.searches"/>
+    <hbox id="urlBarSuggestionPermanentPBLabel"
+          align="center" class="indent">
+      <label flex="1">&urlBarSuggestionsPermanentPB.label;</label>
+    </hbox>
+  </vbox>
+</groupbox>
+
+<groupbox id="oneClickSearchProvidersGroup" data-category="paneGeneral">
+  <caption label="&oneClickSearchEngines.label;"/>
+  <label>&chooseWhichOneToDisplay.label;</label>
+
+  <tree id="engineList" flex="1" rows="8" hidecolumnpicker="true" editable="true"
+        seltype="single">
+    <treechildren id="engineChildren" flex="1"/>
+    <treecols>
+      <treecol id="engineShown" type="checkbox" editable="true" sortable="false"/>
+      <treecol id="engineName" flex="4" label="&engineNameColumn.label;" sortable="false"/>
+      <treecol id="engineKeyword" flex="1" label="&engineKeywordColumn.label;" editable="true"
+                sortable="false"/>
+    </treecols>
+  </tree>
+
+  <hbox>
+    <button id="restoreDefaultSearchEngines"
+            label="&restoreDefaultSearchEngines.label;"
+            accesskey="&restoreDefaultSearchEngines.accesskey;"
+            />
+    <spacer flex="1"/>
+    <button id="removeEngineButton"
+            class="searchEngineAction"
+            label="&removeEngine.label;"
+            accesskey="&removeEngine.accesskey;"
+            disabled="true"
+            />
+  </hbox>
+
+  <separator class="thin"/>
+
+  <hbox id="addEnginesBox" pack="start">
+    <label id="addEngines" class="text-link" value="&addMoreSearchEngines.label;"/>
+  </hbox>
+</groupbox>
+
+
+
+<!-- Downloads
 <groupbox id="downloadsGroup"
           data-category="paneGeneral"
           hidden="true">
   <caption><label>&downloads.label;</label></caption>
 
   <radiogroup id="saveWhere"
               preference="browser.download.useDownloadDir"
               onsyncfrompreference="return gMainPane.readUseDownloadDir();">
@@ -259,17 +407,17 @@
     </hbox>
     <hbox>
       <radio id="alwaysAsk"
              value="false"
              label="&alwaysAskWhere.label;"
              accesskey="&alwaysAskWhere.accesskey;"/>
     </hbox>
   </radiogroup>
-</groupbox>
+</groupbox> -->
 
 <!-- Tab preferences -->
 <groupbox data-category="paneGeneral"
           hidden="true" align="start">
     <caption><label>&tabsGroup.label;</label></caption>
 
     <checkbox id="ctrlTabRecentlyUsedOrder" label="&ctrlTabRecentlyUsedOrder.label;"
               accesskey="&ctrlTabRecentlyUsedOrder.accesskey;"
@@ -294,8 +442,156 @@
               preference="browser.tabs.loadInBackground"/>
 
 #ifdef XP_WIN
     <checkbox id="showTabsInTaskbar" label="&showTabsInTaskbar.label;"
               accesskey="&showTabsInTaskbar.accesskey;"
               preference="browser.taskbar.previews.enable"/>
 #endif
 </groupbox>
+
+<!-- Accessibility -->
+<groupbox data-category="paneGeneral" id="accessibilityGroup" align="start">
+  <caption><label>&accessibility.label;</label></caption>
+
+#ifdef XP_WIN
+  <checkbox id="useOnScreenKeyboard"
+            hidden="true"
+            label="&useOnScreenKeyboard.label;"
+            accesskey="&useOnScreenKeyboard.accesskey;"
+            preference="ui.osk.enabled"/>
+#endif
+  <checkbox id="useCursorNavigation"
+            label="&useCursorNavigation.label;"
+            accesskey="&useCursorNavigation.accesskey;"
+            preference="accessibility.browsewithcaret"/>
+  <checkbox id="searchStartTyping"
+            label="&searchOnStartTyping.label;"
+            accesskey="&searchOnStartTyping.accesskey;"
+            preference="accessibility.typeaheadfind"/>
+  <checkbox id="blockAutoRefresh"
+            label="&blockAutoReload.label;"
+            accesskey="&blockAutoReload.accesskey;"
+            preference="accessibility.blockautorefresh"/>
+</groupbox>
+
+<!-- Languages -->
+<groupbox id="languagesGroup" data-category="paneGeneral" hidden="true">
+  <caption><label>&languages.label;</label></caption>
+
+  <hbox id="languagesBox" align="center">
+    <description flex="1" control="chooseLanguage">&chooseLanguage.label;</description>
+    <button id="chooseLanguage"
+            label="&chooseButton.label;"
+            accesskey="&chooseButton.accesskey;"/>
+  </hbox>
+
+  <hbox id="translationBox" hidden="true">
+    <hbox align="center" flex="1">
+      <checkbox id="translate" preference="browser.translation.detectLanguage"
+                label="&translateWebPages.label;." accesskey="&translateWebPages.accesskey;"
+                onsyncfrompreference="return gContentPane.updateButtons('translateButton',
+                                              'browser.translation.detectLanguage');"/>
+      <hbox id="bingAttribution" hidden="true">
+        <label>&translation.options.attribution.beforeLogo;</label>
+        <separator orient="vertical" class="thin"/>
+        <image id="translationAttributionImage" aria-label="Microsoft Translator"
+               src="chrome://browser/content/microsoft-translator-attribution.png"/>
+        <separator orient="vertical" class="thin"/>
+        <label>&translation.options.attribution.afterLogo;</label>
+      </hbox>
+    </hbox>
+    <button id="translateButton" label="&translateExceptions.label;"
+            accesskey="&translateExceptions.accesskey;"/>
+  </hbox>
+  <hbox>
+    <checkbox id="checkSpelling"
+            label="&checkUserSpelling.label;"
+            accesskey="&checkUserSpelling.accesskey;"
+            onsyncfrompreference="return gAdvancedPane.readCheckSpelling();"
+            onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
+            preference="layout.spellcheckDefault"/>
+  </hbox>
+</groupbox>
+
+
+<!-- Fonts and Colors -->
+<groupbox id="fontsGroup" data-category="paneGeneral" hidden="true">
+  <caption><label>&fontsAndColors.label;</label></caption>
+
+  <grid id="fontsGrid">
+    <columns>
+      <column flex="1"/>
+      <column/>
+    </columns>
+    <rows id="fontsRows">
+      <row id="fontRow">
+        <hbox align="center">
+          <label control="defaultFont" accesskey="&defaultFont.accesskey;">&defaultFont.label;</label>
+          <menulist id="defaultFont" delayprefsave="true"/>
+          <label id="defaultFontSizeLabel" control="defaultFontSize" accesskey="&defaultSize.accesskey;">&defaultSize.label;</label>
+          <menulist id="defaultFontSize" delayprefsave="true">
+            <menupopup>
+              <menuitem value="9" label="9"/>
+              <menuitem value="10" label="10"/>
+              <menuitem value="11" label="11"/>
+              <menuitem value="12" label="12"/>
+              <menuitem value="13" label="13"/>
+              <menuitem value="14" label="14"/>
+              <menuitem value="15" label="15"/>
+              <menuitem value="16" label="16"/>
+              <menuitem value="17" label="17"/>
+              <menuitem value="18" label="18"/>
+              <menuitem value="20" label="20"/>
+              <menuitem value="22" label="22"/>
+              <menuitem value="24" label="24"/>
+              <menuitem value="26" label="26"/>
+              <menuitem value="28" label="28"/>
+              <menuitem value="30" label="30"/>
+              <menuitem value="32" label="32"/>
+              <menuitem value="34" label="34"/>
+              <menuitem value="36" label="36"/>
+              <menuitem value="40" label="40"/>
+              <menuitem value="44" label="44"/>
+              <menuitem value="48" label="48"/>
+              <menuitem value="56" label="56"/>
+              <menuitem value="64" label="64"/>
+              <menuitem value="72" label="72"/>
+            </menupopup>
+          </menulist>
+        </hbox>
+        <button id="advancedFonts" icon="select-font"
+                label="&advancedFonts.label;"
+                accesskey="&advancedFonts.accesskey;"/>
+      </row>
+      <row id="colorsRow">
+        <hbox/>
+        <button id="colors" icon="select-color"
+                label="&colors.label;"
+                accesskey="&colors.accesskey;"/>
+      </row>
+    </rows>
+  </grid>
+</groupbox>
+
+<!-- Browsing -->
+<groupbox id="browsingGroup" align="start" data-category="paneGeneral">
+  <caption><label>&browsing.label;</label></caption>
+
+  <checkbox id="useAutoScroll"
+            label="&useAutoScroll.label;"
+            accesskey="&useAutoScroll.accesskey;"
+            preference="general.autoScroll"/>
+  <checkbox id="useSmoothScrolling"
+            label="&useSmoothScrolling.label;"
+            accesskey="&useSmoothScrolling.accesskey;"
+            preference="general.smoothScroll"/>
+  <checkbox id="allowHWAccel"
+            label="&allowHWAccel.label;"
+            accesskey="&allowHWAccel.accesskey;"
+            preference="layers.acceleration.disabled"/>
+  <!--<checkbox id="checkSpelling"
+            label="&checkUserSpelling.label;"
+            accesskey="&checkUserSpelling.accesskey;"
+            onsyncfrompreference="return gAdvancedPane.readCheckSpelling();"
+            onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
+            preference="layout.spellcheckDefault"/>-->
+</groupbox>
old mode 100644
new mode 100755
--- a/browser/components/preferences/in-content/preferences.js
+++ b/browser/components/preferences/in-content/preferences.js
@@ -25,23 +25,30 @@ Cu.import("resource://gre/modules/XPCOMU
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/AppConstants.jsm");
 
 var gLastHash = "";
 
 var gCategoryInits = new Map();
 function init_category_if_required(category) {
   let categoryInfo = gCategoryInits.get(category);
+
+  console.log("Category: " + category);
+
   if (!categoryInfo) {
     throw "Unknown in-content prefs category! Can't init " + category;
   }
   if (categoryInfo.inited) {
     return;
   }
   categoryInfo.init();
+
+  if (category == "paneGeneral"){
+    gCategoryInits.get("paneSearch").init();
+  }
 }
 
 function register_module(categoryName, categoryObject) {
   gCategoryInits.set(categoryName, {
     inited: false,
     init() {
       categoryObject.init();
       this.inited = true;
@@ -81,18 +88,18 @@ function init_all() {
   });
 
   window.addEventListener("hashchange", onHashChange);
   gotoPref();
 
   init_dynamic_padding();
 
   var initFinished = new CustomEvent("Initialized", {
-    "bubbles": true,
-    "cancelable": true
+    'bubbles': true,
+    'cancelable': true
   });
   document.dispatchEvent(initFinished);
 
   categories = categories.querySelectorAll("richlistitem.category");
   for (let category of categories) {
     let name = internalPrefCategoryNameToFriendlyName(category.value);
     let helpSelector = `#header-${name} > .help-button`;
     let helpButton = document.querySelector(helpSelector);
@@ -103,27 +110,27 @@ function init_all() {
   // notifying observers that the UI is now ready.
   Services.obs.notifyObservers(window, "advanced-pane-loaded", null);
 }
 
 // Make the space above the categories list shrink on low window heights
 function init_dynamic_padding() {
   let categories = document.getElementById("categories");
   let catPadding = Number.parseInt(getComputedStyle(categories)
-                                     .getPropertyValue("padding-top"));
+                                     .getPropertyValue('padding-top'));
   let fullHeight = categories.lastElementChild.getBoundingClientRect().bottom;
   let mediaRule = `
   @media (max-height: ${fullHeight}px) {
     #categories {
       padding-top: calc(100vh - ${fullHeight - catPadding}px);
     }
   }
   `;
-  let mediaStyle = document.createElementNS("http://www.w3.org/1999/xhtml", "html:style");
-  mediaStyle.setAttribute("type", "text/css");
+  let mediaStyle = document.createElementNS('http://www.w3.org/1999/xhtml', 'html:style');
+  mediaStyle.setAttribute('type', 'text/css');
   mediaStyle.appendChild(document.createCDATASection(mediaRule));
   document.documentElement.appendChild(mediaStyle);
 }
 
 function telemetryBucketForCategory(category) {
   switch (category) {
     case "general":
     case "search":
old mode 100644
new mode 100755
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -97,25 +97,25 @@
                     value="paneGeneral"
                     helpTopic="prefs-main"
                     tooltiptext="&paneGeneral.title;"
                     align="center">
         <image class="category-icon"/>
         <label class="category-name" flex="1">&paneGeneral.title;</label>
       </richlistitem>
 
-      <richlistitem id="category-search"
+      <!--<richlistitem id="category-search"
                     class="category"
                     value="paneSearch"
                     helpTopic="prefs-search"
                     tooltiptext="&paneSearch.title;"
                     align="center">
         <image class="category-icon"/>
         <label class="category-name" flex="1">&paneSearch.title;</label>
-      </richlistitem>
+      </richlistitem>-->
 
       <richlistitem id="category-content"
                     class="category"
                     value="paneContent"
                     helpTopic="prefs-content"
                     tooltiptext="&paneContent.title;"
                     align="center">
         <image class="category-icon"/>
@@ -184,17 +184,17 @@
            Remove this keyset once bug 1094240 ("disablefastfind" attribute
            broken in e10s mode) is fixed. -->
       <key key="&focusSearch1.key;" modifiers="accel" id="focusSearch1" oncommand=";"/>
     </keyset>
 
     <vbox class="main-content" flex="1">
       <prefpane id="mainPrefPane">
 #include main.xul
-#include search.xul
+<!--#include search.xul-->
 #include privacy.xul
 #include containers.xul
 #include advanced.xul
 #include applications.xul
 #include content.xul
 #include security.xul
 #include sync.xul
       </prefpane>
--- a/browser/components/preferences/in-content/search.js
+++ b/browser/components/preferences/in-content/search.js
@@ -18,16 +18,17 @@ var gSearchPane = {
    * Initialize autocomplete to ensure prefs are in sync.
    */
   _initAutocomplete() {
     Components.classes["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"]
               .getService(Components.interfaces.mozIPlacesAutoComplete);
   },
 
   init() {
+    console.log("init gSearchPane");
     gEngineView = new EngineView(new EngineStore());
     document.getElementById("engineList").view = gEngineView;
     this.buildDefaultEngineDropDown();
 
     let addEnginesLink = document.getElementById("addEngines");
     let searchEnginesURL = Services.wm.getMostRecentWindow("navigator:browser")
                                       .BrowserSearch.searchEnginesURL;
     addEnginesLink.setAttribute("href", searchEnginesURL);
old mode 100644
new mode 100755
--- a/browser/components/preferences/in-content/search.xul
+++ b/browser/components/preferences/in-content/search.xul
@@ -1,9 +1,9 @@
-    <preferences id="searchPreferences" hidden="true" data-category="paneSearch">
+    <!--<preferences id="searchPreferences" hidden="true" data-category="paneSearch">
 
       <preference id="browser.search.suggest.enabled"
                   name="browser.search.suggest.enabled"
                   type="bool"/>
 
       <preference id="browser.urlbar.suggest.searches"
                   name="browser.urlbar.suggest.searches"
                   type="bool"/>
@@ -12,28 +12,28 @@
                   name="browser.search.hiddenOneOffs"
                   type="unichar"/>
 
     </preferences>
 
     <script type="application/javascript"
             src="chrome://browser/content/preferences/in-content/search.js"/>
 
-    <stringbundle id="engineManagerBundle" src="chrome://browser/locale/engineManager.properties"/>
+    <stringbundle id="engineManagerBundle" src="chrome://browser/locale/engineManager.properties"/>-->
 
-    <hbox id="header-search"
+    <!--<hbox id="header-search"
           class="header"
           hidden="true"
           data-category="paneSearch">
       <label class="header-name" flex="1">&paneSearch.title;</label>
       <html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a>
-    </hbox>
+    </hbox>-->
 
     <!-- Default Search Engine -->
-    <groupbox id="defaultEngineGroup" align="start" data-category="paneSearch">
+    <!--<groupbox id="defaultEngineGroup" align="start" data-category="paneSearch">
       <caption label="&defaultSearchEngine.label;"/>
       <label>&chooseYourDefaultSearchEngine.label;</label>
       <menulist id="defaultEngine">
         <menupopup/>
       </menulist>
       <checkbox id="suggestionsInSearchFieldsCheckbox"
                 label="&provideSearchSuggestions.label;"
                 accesskey="&provideSearchSuggestions.accesskey;"
@@ -78,9 +78,9 @@
                 />
       </hbox>
 
       <separator class="thin"/>
 
       <hbox id="addEnginesBox" pack="start">
         <label id="addEngines" class="text-link" value="&addMoreSearchEngines.label;"/>
       </hbox>
-    </groupbox>
+    </groupbox>-->