Bug 1074880 - Remove file icons on tree view. r=jryans
authorJennifer Fong <jen@ednapiranha.com>
Mon, 06 Oct 2014 12:58:00 +0200
changeset 232544 3efeefd11c1afbf0583ead0ead807930a7b7c065
parent 232543 4ab57c3f1745cfaf7668665cc46d54e83a8536a4
child 232545 9637293b166a5eb2dbb08a78442f8052dfeb22e6
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1074880
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1074880 - Remove file icons on tree view. r=jryans
browser/devtools/projecteditor/lib/tree.js
browser/themes/linux/jar.mn
browser/themes/osx/jar.mn
browser/themes/shared/devtools/projecteditor/file-icons-sheet@2x.png
browser/themes/shared/devtools/projecteditor/projecteditor.css
browser/themes/windows/jar.mn
--- a/browser/devtools/projecteditor/lib/tree.js
+++ b/browser/devtools/projecteditor/lib/tree.js
@@ -49,19 +49,16 @@ var ResourceContainer = Class({
     this.highlighter.classList.add("highlighter");
     this.line.appendChild(this.highlighter);
 
     this.expander = doc.createElementNS(HTML_NS, "span");
     this.expander.className = "arrow expander";
     this.expander.setAttribute("open", "");
     this.line.appendChild(this.expander);
 
-    this.icon = doc.createElementNS(HTML_NS, "span");
-    this.line.appendChild(this.icon);
-
     this.label = doc.createElementNS(HTML_NS, "span");
     this.label.className = "file-label";
     this.line.appendChild(this.label);
 
     this.line.addEventListener("contextmenu", (ev) => {
       this.select();
       this.openContextMenu(ev);
     }, false);
@@ -88,21 +85,20 @@ var ResourceContainer = Class({
       this.expanded = false;
     }
     this.update();
   },
 
   destroy: function() {
     this.elt.remove();
     this.expander.remove();
-    this.icon.remove();
     this.highlighter.remove();
     this.children.remove();
     this.label.remove();
-    this.elt = this.expander = this.icon = this.highlighter = this.children = this.label = null;
+    this.elt = this.expander = this.highlighter = this.children = this.label = null;
   },
 
   /**
    * Open the context menu when right clicking on the view.
    * XXX: We could pass this to plugins to allow themselves
    * to be register/remove items from the context menu if needed.
    *
    * @param Event e
@@ -120,39 +116,16 @@ var ResourceContainer = Class({
     let visible = this.tree.options.resourceVisible ?
       this.tree.options.resourceVisible(this.resource) :
       true;
 
     this.elt.hidden = !visible;
 
     this.tree.options.resourceFormatter(this.resource, this.label);
 
-    this.icon.className = "file-icon";
-
-    let contentCategory = this.resource.contentCategory;
-    let baseName = this.resource.basename || "";
-
-    if (!this.resource.parent) {
-      this.icon.classList.add("icon-none");
-    } else if (this.resource.isDir) {
-      this.icon.classList.add("icon-folder");
-    } else if (baseName.endsWith(".manifest") || baseName.endsWith(".webapp")) {
-      this.icon.classList.add("icon-manifest");
-    } else if (contentCategory === "js") {
-      this.icon.classList.add("icon-js");
-    } else if (contentCategory === "css") {
-      this.icon.classList.add("icon-css");
-    } else if (contentCategory === "html") {
-      this.icon.classList.add("icon-html");
-    } else if (contentCategory === "image") {
-      this.icon.classList.add("icon-img");
-    } else {
-      this.icon.classList.add("icon-file");
-    }
-
     this.expander.style.visibility = this.resource.hasChildren ? "visible" : "hidden";
 
   },
 
   /**
    * Select this view in the ProjectTreeView.
    */
   select: function() {
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -337,17 +337,16 @@ browser.jar:
   skin/classic/browser/devtools/cubic-bezier-swatch@2x.png  (../shared/devtools/images/cubic-bezier-swatch@2x.png)
   skin/classic/browser/devtools/undock@2x.png               (../shared/devtools/images/undock@2x.png)
   skin/classic/browser/devtools/font-inspector.css          (../shared/devtools/font-inspector.css)
   skin/classic/browser/devtools/computedview.css            (../shared/devtools/computedview.css)
   skin/classic/browser/devtools/arrow-e.png                 (../shared/devtools/images/arrow-e.png)
   skin/classic/browser/devtools/arrow-e@2x.png              (../shared/devtools/images/arrow-e@2x.png)
   skin/classic/browser/devtools/responsiveui-home.png       (../shared/devtools/responsiveui-home.png)
   skin/classic/browser/devtools/projecteditor/projecteditor.css         (../shared/devtools/projecteditor/projecteditor.css)
-  skin/classic/browser/devtools/projecteditor/file-icons-sheet@2x.png       (../shared/devtools/projecteditor/file-icons-sheet@2x.png)
   skin/classic/browser/devtools/app-manager/connection-footer.css     (../shared/devtools/app-manager/connection-footer.css)
   skin/classic/browser/devtools/app-manager/index.css                 (../shared/devtools/app-manager/index.css)
   skin/classic/browser/devtools/app-manager/device.css                (../shared/devtools/app-manager/device.css)
   skin/classic/browser/devtools/app-manager/projects.css              (../shared/devtools/app-manager/projects.css)
   skin/classic/browser/devtools/app-manager/help.css                  (../shared/devtools/app-manager/help.css)
   skin/classic/browser/devtools/app-manager/warning.svg               (../shared/devtools/app-manager/images/warning.svg)
   skin/classic/browser/devtools/app-manager/error.svg                 (../shared/devtools/app-manager/images/error.svg)
   skin/classic/browser/devtools/app-manager/plus.svg                  (../shared/devtools/app-manager/images/plus.svg)
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -467,17 +467,16 @@ browser.jar:
   skin/classic/browser/devtools/cubic-bezier-swatch@2x.png  (../shared/devtools/images/cubic-bezier-swatch@2x.png)
   skin/classic/browser/devtools/undock@2x.png               (../shared/devtools/images/undock@2x.png)
   skin/classic/browser/devtools/font-inspector.css          (../shared/devtools/font-inspector.css)
   skin/classic/browser/devtools/computedview.css            (../shared/devtools/computedview.css)
   skin/classic/browser/devtools/arrow-e.png                 (../shared/devtools/images/arrow-e.png)
   skin/classic/browser/devtools/arrow-e@2x.png              (../shared/devtools/images/arrow-e@2x.png)
   skin/classic/browser/devtools/responsiveui-home.png       (../shared/devtools/responsiveui-home.png)
   skin/classic/browser/devtools/projecteditor/projecteditor.css         (../shared/devtools/projecteditor/projecteditor.css)
-  skin/classic/browser/devtools/projecteditor/file-icons-sheet@2x.png       (../shared/devtools/projecteditor/file-icons-sheet@2x.png)
   skin/classic/browser/devtools/app-manager/connection-footer.css     (../shared/devtools/app-manager/connection-footer.css)
   skin/classic/browser/devtools/app-manager/index.css                 (../shared/devtools/app-manager/index.css)
   skin/classic/browser/devtools/app-manager/device.css                (../shared/devtools/app-manager/device.css)
   skin/classic/browser/devtools/app-manager/projects.css              (../shared/devtools/app-manager/projects.css)
   skin/classic/browser/devtools/app-manager/help.css                  (../shared/devtools/app-manager/help.css)
   skin/classic/browser/devtools/app-manager/warning.svg               (../shared/devtools/app-manager/images/warning.svg)
   skin/classic/browser/devtools/app-manager/error.svg                 (../shared/devtools/app-manager/images/error.svg)
   skin/classic/browser/devtools/app-manager/plus.svg                  (../shared/devtools/app-manager/images/plus.svg)
deleted file mode 100644
index 39672e1fbefd907a0b3cf46be241487a3f1ce95d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/browser/themes/shared/devtools/projecteditor/projecteditor.css
+++ b/browser/themes/shared/devtools/projecteditor/projecteditor.css
@@ -73,59 +73,16 @@
 }
 
 .entry .file-label {
   display: flex;
   flex: 1;
   align-items: center;
 }
 
-.entry .file-icon {
-  display: inline-block;
-  background: url(file-icons-sheet@2x.png);
-  background-size: 140px 15px;
-  background-repeat: no-repeat;
-  width: 20px;
-  height: 15px;
-  background-position: -40px 0;
-  flex-shrink: 0;
-}
-
-.entry .file-icon.icon-none {
-  display: none;
-}
-
-.entry .icon-css {
-  background-position: 0 0;
-}
-
-.entry .icon-js {
-  background-position: -20px 0;
-}
-
-.entry .icon-html {
-  background-position: -40px 0;
-}
-
-.entry .icon-file {
-  background-position: -60px 0;
-}
-
-.entry .icon-folder {
-  background-position: -80px 0;
-}
-
-.entry .icon-img {
-  background-position: -100px 0;
-}
-
-.entry .icon-manifest {
-  background-position: -120px 0;
-}
-
 .entry {
   border: none;
   box-shadow: none;
   white-space: nowrap;
   cursor: pointer;
 }
 
 .entry:hover:not(.entry-group-title):not(.selected) {
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -373,17 +373,16 @@ browser.jar:
         skin/classic/browser/devtools/cubic-bezier-swatch@2x.png    (../shared/devtools/images/cubic-bezier-swatch@2x.png)
         skin/classic/browser/devtools/undock@2x.png                 (../shared/devtools/images/undock@2x.png)
         skin/classic/browser/devtools/font-inspector.css            (../shared/devtools/font-inspector.css)
         skin/classic/browser/devtools/computedview.css              (../shared/devtools/computedview.css)
         skin/classic/browser/devtools/arrow-e.png                   (../shared/devtools/images/arrow-e.png)
         skin/classic/browser/devtools/arrow-e@2x.png                (../shared/devtools/images/arrow-e@2x.png)
         skin/classic/browser/devtools/responsiveui-home.png         (../shared/devtools/responsiveui-home.png)
         skin/classic/browser/devtools/projecteditor/projecteditor.css           (../shared/devtools/projecteditor/projecteditor.css)
-        skin/classic/browser/devtools/projecteditor/file-icons-sheet@2x.png       (../shared/devtools/projecteditor/file-icons-sheet@2x.png)
         skin/classic/browser/devtools/app-manager/connection-footer.css     (../shared/devtools/app-manager/connection-footer.css)
         skin/classic/browser/devtools/app-manager/index.css                 (../shared/devtools/app-manager/index.css)
         skin/classic/browser/devtools/app-manager/device.css                (../shared/devtools/app-manager/device.css)
         skin/classic/browser/devtools/app-manager/projects.css              (../shared/devtools/app-manager/projects.css)
         skin/classic/browser/devtools/app-manager/help.css                  (../shared/devtools/app-manager/help.css)
         skin/classic/browser/devtools/app-manager/warning.svg               (../shared/devtools/app-manager/images/warning.svg)
         skin/classic/browser/devtools/app-manager/error.svg                 (../shared/devtools/app-manager/images/error.svg)
         skin/classic/browser/devtools/app-manager/plus.svg                  (../shared/devtools/app-manager/images/plus.svg)
@@ -801,17 +800,16 @@ browser.jar:
         skin/classic/aero/browser/devtools/cubic-bezier-swatch@2x.png  (../shared/devtools/images/cubic-bezier-swatch@2x.png)
         skin/classic/aero/browser/devtools/undock@2x.png             (../shared/devtools/images/undock@2x.png)
         skin/classic/aero/browser/devtools/font-inspector.css        (../shared/devtools/font-inspector.css)
         skin/classic/aero/browser/devtools/computedview.css          (../shared/devtools/computedview.css)
         skin/classic/aero/browser/devtools/arrow-e.png               (../shared/devtools/images/arrow-e.png)
         skin/classic/aero/browser/devtools/arrow-e@2x.png               (../shared/devtools/images/arrow-e@2x.png)
         skin/classic/browser/devtools/responsiveui-home.png          (../shared/devtools/responsiveui-home.png)
         skin/classic/aero/browser/devtools/projecteditor/projecteditor.css       (../shared/devtools/projecteditor/projecteditor.css)
-        skin/classic/aero/browser/devtools/projecteditor/file-icons-sheet@2x.png       (../shared/devtools/projecteditor/file-icons-sheet@2x.png)
         skin/classic/aero/browser/devtools/app-manager/connection-footer.css     (../shared/devtools/app-manager/connection-footer.css)
         skin/classic/aero/browser/devtools/app-manager/index.css                 (../shared/devtools/app-manager/index.css)
         skin/classic/aero/browser/devtools/app-manager/device.css                (../shared/devtools/app-manager/device.css)
         skin/classic/aero/browser/devtools/app-manager/projects.css              (../shared/devtools/app-manager/projects.css)
         skin/classic/aero/browser/devtools/app-manager/help.css                  (../shared/devtools/app-manager/help.css)
         skin/classic/aero/browser/devtools/app-manager/warning.svg               (../shared/devtools/app-manager/images/warning.svg)
         skin/classic/aero/browser/devtools/app-manager/error.svg                 (../shared/devtools/app-manager/images/error.svg)
         skin/classic/aero/browser/devtools/app-manager/plus.svg                  (../shared/devtools/app-manager/images/plus.svg)