Backed out 3 changesets (bug 1435142) for failing in browser/base/content/test/tabs/browser_close_tab_by_dblclick.js on a CLOSED TREE
authorNoemi Erli <nerli@mozilla.com>
Tue, 20 Mar 2018 15:38:04 +0200
changeset 408999 c7d3eda7dedcfd0d3ec6840d55d403eabec89633
parent 408998 28088e11bfc458d12e809b79628d4c2dd942bd83
child 409000 4ac3210cae5118c326f95566e68a2e470d749fcf
push id33671
push usercsabou@mozilla.com
push dateTue, 20 Mar 2018 22:23:32 +0000
treeherdermozilla-central@e2e874ceae78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1435142
milestone61.0a1
backs out9193e64cfe29d8df8e30d957b4f58785389d9ed5
ff4b0af1e773b93201023c51b27ccac110c08b2b
79b72c904600680e1393117ddca6b99d1f1da6a7
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
Backed out 3 changesets (bug 1435142) for failing in browser/base/content/test/tabs/browser_close_tab_by_dblclick.js on a CLOSED TREE Backed out changeset 9193e64cfe29 (bug 1435142) Backed out changeset ff4b0af1e773 (bug 1435142) Backed out changeset 79b72c904600 (bug 1435142)
browser/app/profile/firefox.js
browser/base/content/tabbrowser.xml
browser/base/content/test/tabs/browser.ini
browser/base/content/test/tabs/browser_close_tab_by_dblclick.js
toolkit/components/extensions/ext-browserSettings.js
toolkit/components/extensions/schemas/browser_settings.json
toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -453,17 +453,16 @@ pref("browser.link.open_newwindow.restri
 // different.
 #ifdef XP_MACOSX
 pref("browser.link.open_newwindow.disabled_in_fullscreen", true);
 #else
 pref("browser.link.open_newwindow.disabled_in_fullscreen", false);
 #endif
 
 // Tabbed browser
-pref("browser.tabs.closeTabByDblclick", false);
 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);
 pref("browser.tabs.opentabfor.middleclick", true);
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -138,19 +138,16 @@
           );
 
           this._tabMinWidth = this._tabMinWidthPref;
 
           this._setPositionalAttributes();
 
           CustomizableUI.addListener(this);
           this._updateNewTabVisibility();
-
-          XPCOMUtils.defineLazyPreferenceGetter(this, "_closeTabByDblclick",
-            "browser.tabs.closeTabByDblclick", false);
         ]]>
       </constructor>
 
       <destructor>
         <![CDATA[
           Services.prefs.removeObserver("privacy.userContext", this);
 
           CustomizableUI.removeListener(this);
@@ -1687,17 +1684,16 @@
           if (!gMultiProcessBrowser || (val && this.hasAttribute("visuallyselected"))) {
             this._visuallySelected = val;
           }
 
           return val;
         ]]>
         </setter>
       </property>
-      <field name="_selectedOnFirstMouseDown">false</field>
 
       <property name="pinned" readonly="true">
         <getter>
           return this.getAttribute("pinned") == "true";
         </getter>
       </property>
       <property name="hidden" readonly="true">
         <getter>
@@ -1991,23 +1987,16 @@
       <handler event="dragstart"><![CDATA[
         if (this.mOverCloseButton) {
           event.stopPropagation();
         }
       ]]></handler>
 
       <handler event="mousedown" phase="capturing">
       <![CDATA[
-        let tabContainer = this.parentNode;
-        if (tabContainer._closeTabByDblclick &&
-            event.button == 0 &&
-            event.detail == 1) {
-          this._selectedOnFirstMouseDown = this.selected;
-        }
-
         if (this.selected) {
           this.style.MozUserFocus = "ignore";
         } else if (this.mOverCloseButton ||
                    this._overPlayingIcon) {
           // Prevent tabbox.xml from selecting the tab.
           event.stopPropagation();
         }
       ]]>
@@ -2033,27 +2022,16 @@
         }
       ]]></handler>
 
       <handler event="dblclick" button="0" phase="capturing"><![CDATA[
         // for the one-close-button case
         if (event.originalTarget.getAttribute("anonid") == "close-button") {
           event.stopPropagation();
         }
-
-        let tabContainer = this.parentNode;
-        if (tabContainer._closeTabByDblclick &&
-            this._selectedOnFirstMouseDown &&
-            this.selected &&
-            !this._overPlayingIcon) {
-          gBrowser.removeTab(this, {
-            animate: true,
-            byMouse: event.mozInputSource == MouseEvent.MOZ_SOURCE_MOUSE,
-          });
-        }
       ]]></handler>
 
       <handler event="animationend">
       <![CDATA[
         if (event.originalTarget.getAttribute("anonid") == "tab-loading-burst") {
           this.removeAttribute("bursting");
         }
       ]]>
--- a/browser/base/content/test/tabs/browser.ini
+++ b/browser/base/content/test/tabs/browser.ini
@@ -2,17 +2,16 @@
 support-files =
   head.js
   dummy_page.html
 
 [browser_abandonment_telemetry.js]
 [browser_accessibility_indicator.js]
 [browser_allow_process_switches_despite_related_browser.js]
 [browser_bug580956.js]
-[browser_close_tab_by_dblclick.js]
 [browser_contextmenu_openlink_after_tabnavigated.js]
 support-files =
   test_bug1358314.html
 [browser_isLocalAboutURI.js]
 [browser_tabCloseProbes.js]
 [browser_tabSpinnerProbe.js]
 skip-if = !e10s # Tab spinner is e10s only.
 [browser_tabSwitchPrintPreview.js]
deleted file mode 100644
--- a/browser/base/content/test/tabs/browser_close_tab_by_dblclick.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* 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/. */
-
-
-const PREF_CLOSE_TAB_BY_DBLCLICK = "browser.tabs.closeTabByDblclick";
-
-function triggerDblclickOn(target) {
-  EventUtils.synthesizeMouseAtCenter(target, { clickCount: 1 });
-  EventUtils.synthesizeMouseAtCenter(target, { clickCount: 2 });
-}
-
-add_task(async function dblclick() {
-  let tab = gBrowser.selectedTab;
-
-  let promise = BrowserTestUtils.waitForEvent(tab, "dblclick");
-  triggerDblclickOn(tab);
-  await promise;
-  ok(!tab.closing, "Double click the selected tab won't close it");
-});
-
-add_task(async function dblclickWithPrefSet() {
-  await SpecialPowers.pushPrefEnv({set: [
-    [PREF_CLOSE_TAB_BY_DBLCLICK, true]
-  ]});
-
-  let promise = BrowserTestUtils.waitForNewTab(gBrowser, "about:mozilla");
-  BrowserTestUtils.addTab(gBrowser, "about:mozilla");
-  let tab = await promise;
-  isnot(tab, gBrowser.selectedTab, "The new tab is in the background");
-
-  promise = BrowserTestUtils.waitForEvent(tab, "dblclick");
-  triggerDblclickOn(tab);
-  await promise;
-  is(tab, gBrowser.selectedTab, "Double click a background tab will select it");
-
-  promise = BrowserTestUtils.waitForEvent(tab, "dblclick");
-  triggerDblclickOn(tab);
-  await promise;
-  ok(tab.closing, "Double click the selected tab will close it");
-});
--- a/toolkit/components/extensions/ext-browserSettings.js
+++ b/toolkit/components/extensions/ext-browserSettings.js
@@ -100,26 +100,16 @@ ExtensionPreferencesManager.addSetting("
     let returnObj = {};
     for (let pref of this.prefNames) {
       returnObj[pref] = value;
     }
     return returnObj;
   },
 });
 
-ExtensionPreferencesManager.addSetting("closeTabsByDoubleClick", {
-  prefNames: [
-    "browser.tabs.closeTabByDblclick",
-  ],
-
-  setCallback(value) {
-    return {[this.prefNames[0]]: value};
-  },
-});
-
 ExtensionPreferencesManager.addSetting("contextMenuShowEvent", {
   prefNames: [
     "ui.context_menus.after_mouseup",
   ],
 
   setCallback(value) {
     return {[this.prefNames[0]]: value === "mouseup"};
   },
@@ -226,21 +216,16 @@ this.browserSettings = class extends Ext
             return Services.prefs.getCharPref("dom.popup_allowed_events") != "";
           }),
         cacheEnabled: getSettingsAPI(
           extension, "cacheEnabled",
           () => {
             return Services.prefs.getBoolPref("browser.cache.disk.enable") &&
               Services.prefs.getBoolPref("browser.cache.memory.enable");
           }),
-        closeTabsByDoubleClick: getSettingsAPI(
-          extension, "closeTabsByDoubleClick",
-          () => {
-            return Services.prefs.getBoolPref("browser.tabs.closeTabByDblclick");
-          }, undefined, false, ["android"]),
         contextMenuShowEvent: Object.assign(
           getSettingsAPI(
             extension, "contextMenuShowEvent",
             () => {
               if (AppConstants.platform === "win") {
                 return "mouseup";
               }
               let prefValue = Services.prefs.getBoolPref(
--- a/toolkit/components/extensions/schemas/browser_settings.json
+++ b/toolkit/components/extensions/schemas/browser_settings.json
@@ -112,20 +112,16 @@
       "allowPopupsForUserEvents": {
         "$ref": "types.Setting",
         "description": "Allows or disallows pop-up windows from opening in response to user events."
       },
       "cacheEnabled": {
         "$ref": "types.Setting",
         "description": "Enables or disables the browser cache."
       },
-      "closeTabsByDoubleClick": {
-        "$ref": "types.Setting",
-        "description": "This boolean setting controls whether the selected tab can be closed with a double click."
-      },
       "contextMenuShowEvent": {
         "$ref": "types.Setting",
         "description": "Controls after which mouse event context menus popup. This setting's value is of type ContextMenuMouseEvent, which has possible values of <code>mouseup</code> and <code>mousedown</code>."
       },
       "homepageOverride": {
         "$ref": "types.Setting",
         "description": "Returns the value of the overridden home page. Read-only."
       },
--- a/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js
@@ -25,17 +25,16 @@ add_task(async function test_browser_set
   // Create an object to hold the values to which we will initialize the prefs.
   const PREFS = {
     "browser.cache.disk.enable": true,
     "browser.cache.memory.enable": true,
     "dom.popup_allowed_events": Preferences.get("dom.popup_allowed_events"),
     "image.animation_mode": "none",
     "permissions.default.desktop-notification": PERM_UNKNOWN_ACTION,
     "ui.context_menus.after_mouseup": false,
-    "browser.tabs.closeTabByDblclick": false,
     "browser.tabs.loadBookmarksInTabs": false,
     "browser.search.openintab": false,
     "network.proxy.type": proxySvc.PROXYCONFIG_SYSTEM,
     "network.proxy.http": "",
     "network.proxy.http_port": 0,
     "network.proxy.share_proxy_settings": false,
     "network.proxy.ftp": "",
     "network.proxy.ftp_port": 0,
@@ -160,25 +159,16 @@ add_task(async function test_browser_set
       "contextMenuShowEvent", "mousedown",
       {"ui.context_menus.after_mouseup": AppConstants.platform === "win"});
   } else {
     await testSetting(
       "contextMenuShowEvent", "mousedown",
       {"ui.context_menus.after_mouseup": false});
   }
 
-  if (AppConstants.platform !== "android") {
-    await testSetting(
-      "closeTabsByDoubleClick", true,
-      {"browser.tabs.closeTabByDblclick": true});
-    await testSetting(
-      "closeTabsByDoubleClick", false,
-      {"browser.tabs.closeTabByDblclick": false});
-  }
-
   await testSetting(
     "openBookmarksInNewTabs", true,
     {"browser.tabs.loadBookmarksInTabs": true});
   await testSetting(
     "openBookmarksInNewTabs", false,
     {"browser.tabs.loadBookmarksInTabs": false});
 
   await testSetting(
@@ -356,52 +346,16 @@ add_task(async function test_bad_value()
     },
   });
 
   await extension.startup();
   await extension.awaitMessage("done");
   await extension.unload();
 });
 
-add_task(async function test_bad_value_android() {
-  if (AppConstants.platform !== "android") {
-    return;
-  }
-
-  async function background() {
-    await browser.test.assertRejects(
-      browser.browserSettings.closeTabsByDoubleClick.set({value: true}),
-      /android is not a supported platform for the closeTabsByDoubleClick setting/,
-      "closeTabsByDoubleClick.set rejects on Android.");
-
-    await browser.test.assertRejects(
-      browser.browserSettings.closeTabsByDoubleClick.get({}),
-      /android is not a supported platform for the closeTabsByDoubleClick setting/,
-      "closeTabsByDoubleClick.get rejects on Android.");
-
-    await browser.test.assertRejects(
-      browser.browserSettings.closeTabsByDoubleClick.clear({}),
-      /android is not a supported platform for the closeTabsByDoubleClick setting/,
-      "closeTabsByDoubleClick.clear rejects on Android.");
-
-    browser.test.sendMessage("done");
-  }
-
-  let extension = ExtensionTestUtils.loadExtension({
-    background,
-    manifest: {
-      permissions: ["browserSettings"],
-    },
-  });
-
-  await extension.startup();
-  await extension.awaitMessage("done");
-  await extension.unload();
-});
-
 add_task(async function test_bad_value_proxy_config() {
   let background = AppConstants.platform === "android" ?
     async () => {
       await browser.test.assertRejects(
         browser.browserSettings.proxyConfig.set({value: {
           proxyType: "none",
         }}),
         /proxyConfig is not supported on android/,