Backed out changeset 1dca0c6a9ad2 (bug 1577372) for eslint failure at pageInfo.js on a CLOSED TREE.
authorGurzau Raul <rgurzau@mozilla.com>
Fri, 30 Aug 2019 22:47:45 +0300
changeset 554692 aa070cf72750b2bda6fac3591f100d98c75a5f22
parent 554691 5e06c1d419b73bb5533b52b8126a55a25580afca
child 554693 a54701dbcc65c71a9d8e55cc7cac09442aaeff8f
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1577372
milestone70.0a1
backs out1dca0c6a9ad2cc92ccaf713983e975b28dec7eee
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 changeset 1dca0c6a9ad2 (bug 1577372) for eslint failure at pageInfo.js on a CLOSED TREE.
browser/base/content/pageinfo/pageInfo.js
browser/base/content/pageinfo/pageInfo.xul
browser/locales/en-US/browser/pageInfo.ftl
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -144,20 +144,17 @@ pageInfoTreeView.prototype = {
   },
   hasNextSibling(index, after) {
     return false;
   },
   getLevel(index) {
     return 0;
   },
   getImageSrc(row, column) {},
-  getCellValue(row, column) {
-    let col = (column != null) ? column : this.copycol;
-    return (row < 0 || col < 0) ? "" : (this.data[row][col] || "");
-  },
+  getCellValue(row, column) {},
   toggleOpenState(index) {},
   cycleHeader(col) {},
   selectionChanged() {},
   cycleCell(row, column) {},
   isEditable(row, column) {
     return false;
   },
 };
@@ -267,29 +264,16 @@ var loadContextInfo = Services.loadConte
 var diskStorage = cacheService.diskCacheStorage(loadContextInfo, false);
 
 const nsICookiePermission = Ci.nsICookiePermission;
 const nsIPermissionManager = Ci.nsIPermissionManager;
 
 const nsICertificateDialogs = Ci.nsICertificateDialogs;
 const CERTIFICATEDIALOGS_CONTRACTID = "@mozilla.org/nsCertificateDialogs;1";
 
-// clipboard helper
-function getClipboardHelper() {
-  try {
-    return Cc["@mozilla.org/widget/clipboardhelper;1"].getService(
-      Ci.nsIClipboardHelper
-    );
-  } catch (e) {
-    // do nothing, later code will handle the error
-    return null;
-  }
-}
-const gClipboardHelper = getClipboardHelper();
-
 // namespaces, don't need all of these yet...
 const XLinkNS = "http://www.w3.org/1999/xlink";
 const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 const XMLNS = "http://www.w3.org/XML/1998/namespace";
 const XHTMLNS = "http://www.w3.org/1999/xhtml";
 const XHTML2NS = "http://www.w3.org/2002/06/xhtml2";
 
 const XHTMLNSre = "^http://www.w3.org/1999/xhtml$";
@@ -1186,46 +1170,16 @@ function formatDate(datestr, unknown) {
 
   const dateTimeFormatter = new Services.intl.DateTimeFormat(undefined, {
     dateStyle: "long",
     timeStyle: "long",
   });
   return dateTimeFormatter.format(date);
 }
 
-function doCopy() {
-  if (!gClipboardHelper) {
-    return;
-  }
-
-  var elem = document.commandDispatcher.focusedElement;
-
-  if (elem && elem.localName == "tree") {
-    var view = elem.view;
-    var selection = view.selection;
-    var text = [],
-      tmp = "";
-    var min = {},
-      max = {};
-
-    var count = selection.getRangeCount();
-
-    for (var i = 0; i < count; i++) {
-      selection.getRangeAt(i, min, max);
-
-      for (var row = min.value; row <= max.value; row++) {
-        tmp = view.getCellValue(row, null);
-        if (tmp)
-          text.push(tmp);
-      }
-    }
-    gClipboardHelper.copyString(text.join("\n"));
-  }
-}
-
 function doSelectAllMedia() {
   var tree = document.getElementById("imagetree");
 
   if (tree) {
     tree.view.selection.selectAll();
   }
 }
 
--- a/browser/base/content/pageinfo/pageInfo.xul
+++ b/browser/base/content/pageinfo/pageInfo.xul
@@ -42,36 +42,33 @@
   <stringbundleset id="pageinfobundleset">
     <stringbundle id="pkiBundle" src="chrome://pippki/locale/pippki.properties"/>
     <stringbundle id="browserBundle" src="chrome://browser/locale/browser.properties"/>
   </stringbundleset>
 
   <commandset id="pageInfoCommandSet">
     <command id="cmd_close"     oncommand="window.close();"/>
     <command id="cmd_help"      oncommand="doHelpButton();"/>
-    <command id="cmd_copy"      oncommand="doCopy();"/>
     <command id="cmd_selectall" oncommand="doSelectAll();"/>
   </commandset>
 
   <keyset id="pageInfoKeySet">
     <key data-l10n-id="close-dialog" data-l10n-attrs="key" modifiers="accel" command="cmd_close"/>
     <key keycode="VK_ESCAPE" command="cmd_close"/>
 #ifdef XP_MACOSX
     <key key="." modifiers="meta"  command="cmd_close"/>
 #else
     <key keycode="VK_F1" command="cmd_help"/>
 #endif
-    <key data-l10n-id="copy"       data-l10n-attrs="key" modifiers="accel" command="cmd_copy"/>
     <key data-l10n-id="select-all" data-l10n-attrs="key" modifiers="accel" command="cmd_selectall"/>
     <key data-l10n-id="select-all" data-l10n-attrs="key" modifiers="alt"   command="cmd_selectall"/>
   </keyset>
 
   <menupopup id="picontext">
     <menuitem id="menu_selectall" data-l10n-id="menu-select-all" command="cmd_selectall"/>
-    <menuitem id="menu_copy"      data-l10n-id="menu-copy"       command="cmd_copy"/>
   </menupopup>
 
   <vbox id="topBar">
     <radiogroup id="viewGroup" class="chromeclass-toolbar" orient="horizontal">
       <radio id="generalTab"  data-l10n-id="general-tab"
            oncommand="showTab('general');"/>
       <radio id="mediaTab"    data-l10n-id="media-tab"
            oncommand="showTab('media');" hidden="true"/>
--- a/browser/locales/en-US/browser/pageInfo.ftl
+++ b/browser/locales/en-US/browser/pageInfo.ftl
@@ -1,21 +1,15 @@
 # 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/. --
 
 page-info-window =
     .style = width: 600px; min-height: 550px;
 
-copy =
-    .key = C
-menu-copy =
-    .label = Copy
-    .accesskey = C
-
 select-all =
     .key = A
 menu-select-all =
     .label = Select All
     .accesskey = A
 
 close-dialog =
     .key = w