Bug 1354117 - remove pref from firefox.js, r?jaws draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 02 Aug 2017 11:32:09 +0100
changeset 621142 54294c74e0c6f87762c7717c971ffe736f31afc8
parent 621141 de622b6e2e53b0242f8bd2e3ca32600523f77b40
child 640916 f1932e995c025a7a6944536c60a6830387de4545
push id72277
push usergijskruitbosch@gmail.com
push dateFri, 04 Aug 2017 12:03:53 +0000
reviewersjaws
bugs1354117
milestone57.0a1
Bug 1354117 - remove pref from firefox.js, r?jaws MozReview-Commit-ID: 3mrQ0vVD1zV
browser/app/profile/firefox.js
browser/base/content/browser.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -445,22 +445,16 @@ pref("browser.link.open_newwindow.restri
 // We set this differently on Mac because the fullscreen implementation there is
 // different.
 #ifdef XP_MACOSX
 pref("browser.link.open_newwindow.disabled_in_fullscreen", true);
 #else
 pref("browser.link.open_newwindow.disabled_in_fullscreen", false);
 #endif
 
-#ifdef NIGHTLY_BUILD
-pref("browser.photon.structure.enabled", true);
-#else
-pref("browser.photon.structure.enabled", false);
-#endif
-
 // Tabbed browser
 pref("browser.tabs.closeWindowWithLastTab", true);
 pref("browser.tabs.insertRelatedAfterCurrent", true);
 pref("browser.tabs.warnOnClose", true);
 pref("browser.tabs.warnOnCloseOtherTabs", true);
 pref("browser.tabs.warnOnOpen", true);
 pref("browser.tabs.maxOpenBeforeWarn", 15);
 pref("browser.tabs.loadInBackground", true);
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -14,19 +14,16 @@ Cu.import("resource://gre/modules/XPCOMU
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/AppConstants.jsm");
 Cu.import("resource://gre/modules/NotificationDB.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "extensionNameFromURI", () => {
   return Cu.import("resource://gre/modules/ExtensionParent.jsm", {}).extensionNameFromURI;
 });
 
-XPCOMUtils.defineLazyPreferenceGetter(this, "gPhotonStructure",
-  "browser.photon.structure.enabled", false);
-
 // lazy module getters
 
 /* global AboutHome:false,
           BrowserUITelemetry:false, BrowserUsageTelemetry:false, BrowserUtils:false,
           CastingApps:false, CharsetMenu:false, Color:false, ContentSearch:false,
           CustomizableUI: false, DownloadsCommon: false,
           Deprecated:false, E10SUtils:false, ExtensionsUI: false, FormValidationHandler:false,
           GMPInstallManager:false, LightweightThemeManager:false, Log:false,
@@ -4285,33 +4282,33 @@ function updateEditUIVisibility() {
                    placesContextMenuPopupState == "showing" ||
                    placesContextMenuPopupState == "open";
   const kOpenPopupStates = ["showing", "open"];
   if (!gEditUIVisible) {
     // Now check the edit-controls toolbar buttons.
     let placement = CustomizableUI.getPlacementOfWidget("edit-controls");
     let areaType = placement ? CustomizableUI.getAreaType(placement.area) : "";
     if (areaType == CustomizableUI.TYPE_MENU_PANEL) {
-      let customizablePanel = gPhotonStructure ? PanelUI.overflowPanel : PanelUI.panel;
+      let customizablePanel = PanelUI.overflowPanel;
       gEditUIVisible = kOpenPopupStates.includes(customizablePanel.state);
     } else if (areaType == CustomizableUI.TYPE_TOOLBAR && window.toolbar.visible) {
       // The edit controls are on a toolbar, so they are visible,
       // unless they're in a panel that isn't visible...
       if (placement.area == "nav-bar") {
         let editControls = document.getElementById("edit-controls");
         gEditUIVisible = !editControls.hasAttribute("overflowedItem") ||
                           kOpenPopupStates.includes(document.getElementById("widget-overflow").state);
       } else {
         gEditUIVisible = true;
       }
     }
   }
 
-  // Now check the main menu panel if we're using photon
-  if (!gEditUIVisible && gPhotonStructure) {
+  // Now check the main menu panel
+  if (!gEditUIVisible) {
     gEditUIVisible = kOpenPopupStates.includes(PanelUI.panel.state);
   }
 
   // No need to update commands if the edit UI visibility has not changed.
   if (gEditUIVisible == oldVisible) {
     return;
   }
 
@@ -8295,21 +8292,16 @@ function restoreLastSession() {
  * usability when opened via a touch screen. */
 var MenuTouchModeObserver = {
   init() {
     window.addEventListener("popupshowing", this, true);
   },
 
   handleEvent(event) {
     let target = event.originalTarget;
-    // Only resize non-context menus in Photon.
-    if (target.localName != "menupopup" && !gPhotonStructure) {
-      return;
-    }
-
     if (event.mozInputSource == MouseEvent.MOZ_SOURCE_TOUCH) {
       target.setAttribute("touchmode", "true");
     } else {
       target.removeAttribute("touchmode");
     }
   },
 
   uninit() {