Web Inspector: fix category -> type refactoring implications.
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 08:38:33 +0000 (08:38 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 08:38:33 +0000 (08:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=83680

Reviewed by Yury Semikhatsky.

We are now using type identifiers (singulars) as opposed to category identifier (plurals) in the style.

* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._createFilterStatusBarItems.createFilterElement):
(WebInspector.NetworkLogView.prototype._createFilterStatusBarItems):
(WebInspector.NetworkLogView.prototype._showCategory):
(WebInspector.NetworkLogView.prototype._hideCategory):
(WebInspector.NetworkLogView.prototype._filter):
(WebInspector.NetworkDataGridNode.prototype.refreshResource):
(WebInspector.NetworkDataGridNode.prototype.refreshGraph):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FrameResourceTreeElement):
(WebInspector.ResourceRevisionTreeElement):
* inspector/front-end/networkLogView.css:
(.network-log-grid.data-grid .network-type-script .icon):
(.network-log-grid.data-grid.small .network-type-script .icon):
(.network-log-grid.data-grid .network-type-document .icon):
(.network-log-grid.data-grid.small .network-type-document .icon):
(.network-log-grid.data-grid .network-type-stylesheet .icon):
(.network-log-grid.data-grid.small .network-type-stylesheet .icon):
(.network-log-grid.data-grid .network-type-image .icon):
(.network-log-grid.data-grid.small .network-type-image .icon):
(.network-type-document .network-graph-bar):
(.network-type-document.resource-cached .network-graph-bar):
(.network-type-stylesheet .network-graph-bar):
(.network-type-stylesheet.resource-cached .network-graph-bar):
(.network-type-image .network-graph-bar):
(.network-type-image.resource-cached .network-graph-bar):
(.network-type-font .network-graph-bar):
(.network-type-font.resource-cached .network-graph-bar):
(.network-type-script .network-graph-bar):
(.network-type-script.resource-cached .network-graph-bar):
(.network-type-xhr .network-graph-bar):
(.network-type-xhr.resource-cached .network-graph-bar):
(.network-type-websocket .network-graph-bar):
(.network-type-websocket.resource-cached .network-graph-bar):
(.network-log-grid.data-grid.filter-other table.data tr.revealed.network-type-other):
* inspector/front-end/resourcesPanel.css:
(.resource-sidebar-tree-item.resources-type-image .icon):
(.resources-type-image .image-resource-icon-preview):
(.children.small .resource-sidebar-tree-item.resources-type-image .icon):
(.children.small .resources-type-image .image-resource-icon-preview):
(.resource-sidebar-tree-item.resources-type-document .icon):
(.children.small .resource-sidebar-tree-item.resources-type-document .icon):
(.resource-sidebar-tree-item.resources-type-stylesheet .icon):
(.children.small .resource-sidebar-tree-item.resources-type-stylesheet .icon):
(.resource-sidebar-tree-item.resources-type-font .icon):
(.children.small .resource-sidebar-tree-item.resources-type-font .icon):
(.resource-sidebar-tree-item.resources-type-script .icon):
(.children.small .resource-sidebar-tree-item.resources-type-script .icon):
(.resource-sidebar-tree-item.resources-type-xhr .icon):
(.children.small .resource-sidebar-tree-item.resources-type-xhr .icon):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113835 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/NetworkPanel.js
Source/WebCore/inspector/front-end/ResourcesPanel.js
Source/WebCore/inspector/front-end/networkLogView.css
Source/WebCore/inspector/front-end/resourcesPanel.css

index 5e69688..e094011 100644 (file)
@@ -1,3 +1,63 @@
+2012-04-11  Pavel Feldman  <pfeldman@chromium.org>
+
+        Web Inspector: fix category -> type refactoring implications.
+        https://bugs.webkit.org/show_bug.cgi?id=83680
+
+        Reviewed by Yury Semikhatsky.
+
+        We are now using type identifiers (singulars) as opposed to category identifier (plurals) in the style.
+
+        * inspector/front-end/NetworkPanel.js:
+        (WebInspector.NetworkLogView.prototype._createFilterStatusBarItems.createFilterElement):
+        (WebInspector.NetworkLogView.prototype._createFilterStatusBarItems):
+        (WebInspector.NetworkLogView.prototype._showCategory):
+        (WebInspector.NetworkLogView.prototype._hideCategory):
+        (WebInspector.NetworkLogView.prototype._filter):
+        (WebInspector.NetworkDataGridNode.prototype.refreshResource):
+        (WebInspector.NetworkDataGridNode.prototype.refreshGraph):
+        * inspector/front-end/ResourcesPanel.js:
+        (WebInspector.FrameResourceTreeElement):
+        (WebInspector.ResourceRevisionTreeElement):
+        * inspector/front-end/networkLogView.css:
+        (.network-log-grid.data-grid .network-type-script .icon):
+        (.network-log-grid.data-grid.small .network-type-script .icon):
+        (.network-log-grid.data-grid .network-type-document .icon):
+        (.network-log-grid.data-grid.small .network-type-document .icon):
+        (.network-log-grid.data-grid .network-type-stylesheet .icon):
+        (.network-log-grid.data-grid.small .network-type-stylesheet .icon):
+        (.network-log-grid.data-grid .network-type-image .icon):
+        (.network-log-grid.data-grid.small .network-type-image .icon):
+        (.network-type-document .network-graph-bar):
+        (.network-type-document.resource-cached .network-graph-bar):
+        (.network-type-stylesheet .network-graph-bar):
+        (.network-type-stylesheet.resource-cached .network-graph-bar):
+        (.network-type-image .network-graph-bar):
+        (.network-type-image.resource-cached .network-graph-bar):
+        (.network-type-font .network-graph-bar):
+        (.network-type-font.resource-cached .network-graph-bar):
+        (.network-type-script .network-graph-bar):
+        (.network-type-script.resource-cached .network-graph-bar):
+        (.network-type-xhr .network-graph-bar):
+        (.network-type-xhr.resource-cached .network-graph-bar):
+        (.network-type-websocket .network-graph-bar):
+        (.network-type-websocket.resource-cached .network-graph-bar):
+        (.network-log-grid.data-grid.filter-other table.data tr.revealed.network-type-other):
+        * inspector/front-end/resourcesPanel.css:
+        (.resource-sidebar-tree-item.resources-type-image .icon):
+        (.resources-type-image .image-resource-icon-preview):
+        (.children.small .resource-sidebar-tree-item.resources-type-image .icon):
+        (.children.small .resources-type-image .image-resource-icon-preview):
+        (.resource-sidebar-tree-item.resources-type-document .icon):
+        (.children.small .resource-sidebar-tree-item.resources-type-document .icon):
+        (.resource-sidebar-tree-item.resources-type-stylesheet .icon):
+        (.children.small .resource-sidebar-tree-item.resources-type-stylesheet .icon):
+        (.resource-sidebar-tree-item.resources-type-font .icon):
+        (.children.small .resource-sidebar-tree-item.resources-type-font .icon):
+        (.resource-sidebar-tree-item.resources-type-script .icon):
+        (.children.small .resource-sidebar-tree-item.resources-type-script .icon):
+        (.resource-sidebar-tree-item.resources-type-xhr .icon):
+        (.children.small .resource-sidebar-tree-item.resources-type-xhr .icon):
+
 2012-04-11  Noel Gordon  <noel.gordon@gmail.com>
 
         [GTK] ImageBuffer: Canonical mimeType for encoding implies startsWith('image/')
index c8d8e93..5cd4576 100644 (file)
@@ -51,8 +51,6 @@ WebInspector.NetworkLogView = function()
     this._matchedResourcesMap = {};
     this._currentMatchedResourceIndex = -1;
 
-    this._categories = WebInspector.resourceTypes;
-
     this._createStatusbarButtons();
     this._createFilterStatusBarItems();
     this._linkifier = WebInspector.debuggerPresentationModel.createLinkifier();
@@ -336,11 +334,15 @@ WebInspector.NetworkLogView.prototype = {
         filterBarElement.className = "scope-bar status-bar-item";
         filterBarElement.id = "network-filter";
 
-        function createFilterElement(category, label)
+        /**
+         * @param {string} typeName
+         * @param {string} label
+         */
+        function createFilterElement(typeName, label)
         {
             var categoryElement = document.createElement("li");
-            categoryElement.category = category;
-            categoryElement.className = category;
+            categoryElement.typeName = typeName;
+            categoryElement.className = typeName;
             categoryElement.appendChild(document.createTextNode(label));
             categoryElement.addEventListener("click", this._updateFilter.bind(this), false);
             filterBarElement.appendChild(categoryElement);
@@ -355,8 +357,10 @@ WebInspector.NetworkLogView.prototype = {
         dividerElement.addStyleClass("scope-bar-divider");
         filterBarElement.appendChild(dividerElement);
 
-        for (var category in this._categories)
-            createFilterElement.call(this, category, this._categories[category].categoryTitle);
+        for (var typeId in WebInspector.resourceTypes) {
+            var type = WebInspector.resourceTypes[typeId];
+            createFilterElement.call(this, type.name(), type.categoryTitle());
+        }
         this._filterBarElement = filterBarElement;
     },
 
@@ -425,16 +429,16 @@ WebInspector.NetworkLogView.prototype = {
         this._summaryBarElement.textContent = text;
     },
 
-    _showCategory: function(category)
+    _showCategory: function(typeName)
     {
-        this._dataGrid.element.addStyleClass("filter-" + category);
-        delete this._hiddenCategories[category];
+        this._dataGrid.element.addStyleClass("filter-" + typeName);
+        delete this._hiddenCategories[typeName];
     },
 
-    _hideCategory: function(category)
+    _hideCategory: function(typeName)
     {
-        this._dataGrid.element.removeStyleClass("filter-" + category);
-        this._hiddenCategories[category] = true;
+        this._dataGrid.element.removeStyleClass("filter-" + typeName);
+        this._hiddenCategories[typeName] = true;
     },
 
     _updateFilter: function(e)
@@ -458,15 +462,15 @@ WebInspector.NetworkLogView.prototype = {
         {
             for (var i = 0; i < this._filterBarElement.childNodes.length; ++i) {
                 var child = this._filterBarElement.childNodes[i];
-                if (!child.category)
+                if (!child.typeName)
                     continue;
 
                 child.removeStyleClass("selected");
-                this._hideCategory(child.category);
+                this._hideCategory(child.typeName);
             }
         }
 
-        if (target.category === this._filterAllElement) {
+        if (target === this._filterAllElement) {
             if (target.hasStyleClass("selected")) {
                 // We can't unselect All, so we break early here
                 return;
@@ -488,7 +492,7 @@ WebInspector.NetworkLogView.prototype = {
             unselectAll.call(this);
 
             target.addStyleClass("selected");
-            this._showCategory(target.category);
+            this._showCategory(target.typeName);
             this._updateOffscreenRows();
             return;
         }
@@ -497,12 +501,12 @@ WebInspector.NetworkLogView.prototype = {
             // If selectMultiple is turned on, and we were selected, we just
             // want to unselect ourselves.
             target.removeStyleClass("selected");
-            this._hideCategory(target.category);
+            this._hideCategory(target.typeName);
         } else {
             // If selectMultiple is turned on, and we weren't selected, we just
             // want to select ourselves.
             target.addStyleClass("selected");
-            this._showCategory(target.category);
+            this._showCategory(target.typeName);
         }
         this._updateOffscreenRows();
     },
@@ -1809,9 +1813,9 @@ WebInspector.NetworkDataGridNode.prototype = {
             this._graphElement.addStyleClass("resource-cached");
 
         this._element.addStyleClass("network-item");
-        if (!this._element.hasStyleClass("network-category-" + this._resource.type.name())) {
-            this._element.removeMatchingStyleClasses("network-category-\\w+");
-            this._element.addStyleClass("network-category-" + this._resource.type.name());
+        if (!this._element.hasStyleClass("network-type-" + this._resource.type.name())) {
+            this._element.removeMatchingStyleClasses("network-type-\\w+");
+            this._element.addStyleClass("network-type-" + this._resource.type.name());
         }
     },
 
@@ -1977,9 +1981,9 @@ WebInspector.NetworkDataGridNode.prototype = {
 
         this._barAreaElement.removeStyleClass("hidden");
 
-        if (!this._graphElement.hasStyleClass("network-category-" + this._resource.type.name())) {
-            this._graphElement.removeMatchingStyleClasses("network-category-\\w+");
-            this._graphElement.addStyleClass("network-category-" + this._resource.type.name());
+        if (!this._graphElement.hasStyleClass("network-type-" + this._resource.type.name())) {
+            this._graphElement.removeMatchingStyleClasses("network-type-\\w+");
+            this._graphElement.addStyleClass("network-type-" + this._resource.type.name());
         }
 
         this._barLeftElement.style.setProperty("left", percentages.start + "%");
index c237582..fff7785 100644 (file)
@@ -1189,7 +1189,7 @@ WebInspector.FrameTreeElement.prototype.__proto__ = WebInspector.BaseStorageTree
  */
 WebInspector.FrameResourceTreeElement = function(storagePanel, resource)
 {
-    WebInspector.BaseStorageTreeElement.call(this, storagePanel, resource, resource.displayName, ["resource-sidebar-tree-item", "resources-category-" + resource.type.name()]);
+    WebInspector.BaseStorageTreeElement.call(this, storagePanel, resource, resource.displayName, ["resource-sidebar-tree-item", "resources-type-" + resource.type.name()]);
     this._resource = resource;
     this._resource.addEventListener(WebInspector.Resource.Events.MessageAdded, this._consoleMessageAdded, this);
     this._resource.addEventListener(WebInspector.Resource.Events.MessagesCleared, this._consoleMessagesCleared, this);
@@ -2006,7 +2006,7 @@ WebInspector.ApplicationCacheFrameTreeElement.prototype.__proto__ = WebInspector
 WebInspector.ResourceRevisionTreeElement = function(storagePanel, revision)
 {
     var title = revision.timestamp ? revision.timestamp.toLocaleTimeString() : WebInspector.UIString("(original)");
-    WebInspector.BaseStorageTreeElement.call(this, storagePanel, revision, title, ["resource-sidebar-tree-item", "resources-category-" + revision.resource.type.name()]);
+    WebInspector.BaseStorageTreeElement.call(this, storagePanel, revision, title, ["resource-sidebar-tree-item", "resources-type-" + revision.resource.type.name()]);
     if (revision.timestamp)
         this.tooltip = revision.timestamp.toLocaleString();
     this._revision = revision;
index 202e8b4..822ec26 100644 (file)
     content: url(Images/resourcePlainIconSmall.png);
 }
 
-.network-log-grid.data-grid .network-category-scripts .icon {
+.network-log-grid.data-grid .network-type-script .icon {
     content: url(Images/resourceJSIcon.png);
 }
 
-.network-log-grid.data-grid.small .network-category-scripts .icon {
+.network-log-grid.data-grid.small .network-type-script .icon {
     content: url(Images/resourceDocumentIconSmall.png);
 }
 
-.network-log-grid.data-grid .network-category-documents .icon {
+.network-log-grid.data-grid .network-type-document .icon {
     content: url(Images/resourceDocumentIcon.png);
 }
 
-.network-log-grid.data-grid.small .network-category-documents .icon {
+.network-log-grid.data-grid.small .network-type-document .icon {
     content: url(Images/resourceDocumentIconSmall.png);
 }
 
-.network-log-grid.data-grid .network-category-stylesheets .icon {
+.network-log-grid.data-grid .network-type-stylesheet .icon {
     content: url(Images/resourceCSSIcon.png);
 }
 
-.network-log-grid.data-grid.small .network-category-stylesheets .icon {
+.network-log-grid.data-grid.small .network-type-stylesheet .icon {
     content: url(Images/resourceDocumentIconSmall.png);
 }
 
-.network-log-grid.data-grid .network-category-images .icon {
+.network-log-grid.data-grid .network-type-image .icon {
     position: relative;
     background-image: url(Images/resourcePlainIcon.png);
     background-repeat: no-repeat;
     content: "";
 }
 
-.network-log-grid.data-grid.small .network-category-images .icon {
+.network-log-grid.data-grid.small .network-type-image .icon {
     background-image: url(Images/resourcePlainIconSmall.png);
     content: "";
 }
     -webkit-border-image: url(Images/timelineHollowPillGray.png) 7 7 7 7;
 }
 
-.network-category-documents .network-graph-bar {
+.network-type-document .network-graph-bar {
     -webkit-border-image: url(Images/timelinePillBlue.png) 7 7 7 7;
 }
 
-.network-category-documents.resource-cached .network-graph-bar {
+.network-type-document.resource-cached .network-graph-bar {
     -webkit-border-image: url(Images/timelineHollowPillBlue.png) 7 7 7 7;
 }
 
-.network-category-stylesheets .network-graph-bar {
+.network-type-stylesheet .network-graph-bar {
     -webkit-border-image: url(Images/timelinePillGreen.png) 7 7 7 7;
 }
 
-.network-category-stylesheets.resource-cached .network-graph-bar {
+.network-type-stylesheet.resource-cached .network-graph-bar {
     -webkit-border-image: url(Images/timelineHollowPillGreen.png) 7 7 7 7;
 }
 
-.network-category-images .network-graph-bar {
+.network-type-image .network-graph-bar {
     -webkit-border-image: url(Images/timelinePillPurple.png) 6 7 6 7;
 }
 
-.network-category-images.resource-cached .network-graph-bar {
+.network-type-image.resource-cached .network-graph-bar {
     border-image: url(Images/timelineHollowPillPurple.png) 7 7 7 7;
 }
 
-.network-category-fonts .network-graph-bar {
+.network-type-font .network-graph-bar {
     -webkit-border-image: url(Images/timelinePillRed.png) 7 7 7 7;
 }
 
-.network-category-fonts.resource-cached .network-graph-bar {
+.network-type-font.resource-cached .network-graph-bar {
     -webkit-border-image: url(Images/timelineHollowPillRed.png) 7 7 7 7;
 }
 
-.network-category-scripts .network-graph-bar {
+.network-type-script .network-graph-bar {
     -webkit-border-image: url(Images/timelinePillOrange.png) 7 7 7 7;
 }
 
-.network-category-scripts.resource-cached .network-graph-bar {
+.network-type-script.resource-cached .network-graph-bar {
     -webkit-border-image: url(Images/timelineHollowPillOrange.png) 7 7 7 7;
 }
 
-.network-category-xhr .network-graph-bar {
+.network-type-xhr .network-graph-bar {
     -webkit-border-image: url(Images/timelinePillYellow.png) 7 7 7 7;
 }
 
-.network-category-xhr.resource-cached .network-graph-bar {
+.network-type-xhr.resource-cached .network-graph-bar {
     -webkit-border-image: url(Images/timelineHollowPillYellow.png) 7 7 7 7;
 }
 
-.network-category-websockets .network-graph-bar {
+.network-type-websocket .network-graph-bar {
     -webkit-border-image: url(Images/timelinePillGray.png) 7 7 7 7;
 }
 
-.network-category-websockets.resource-cached .network-graph-bar {
+.network-type-websocket.resource-cached .network-graph-bar {
    -webkit-border-image: url(Images/timelineHollowPillGray.png) 7 7 7 7;
 }
 
 }
 
 .network-log-grid.data-grid.filter-all table.data tr.revealed.network-item,
-.network-log-grid.data-grid.filter-documents table.data tr.revealed.network-category-documents,
-.network-log-grid.data-grid.filter-stylesheets table.data tr.revealed.network-category-stylesheets,
-.network-log-grid.data-grid.filter-images table.data tr.revealed.network-category-images,
-.network-log-grid.data-grid.filter-scripts table.data tr.revealed.network-category-scripts,
-.network-log-grid.data-grid.filter-xhr table.data tr.revealed.network-category-xhr,
-.network-log-grid.data-grid.filter-fonts table.data tr.revealed.network-category-fonts,
-.network-log-grid.data-grid.filter-websockets table.data tr.revealed.network-category-websockets,
-.network-log-grid.data-grid.filter-other table.data tr.revealed.network-category-other {
+.network-log-grid.data-grid.filter-document table.data tr.revealed.network-type-document,
+.network-log-grid.data-grid.filter-stylesheet table.data tr.revealed.network-type-stylesheet,
+.network-log-grid.data-grid.filter-image table.data tr.revealed.network-type-image,
+.network-log-grid.data-grid.filter-script table.data tr.revealed.network-type-script,
+.network-log-grid.data-grid.filter-xhr table.data tr.revealed.network-type-xhr,
+.network-log-grid.data-grid.filter-font table.data tr.revealed.network-type-font,
+.network-log-grid.data-grid.filter-websocket table.data tr.revealed.network-type-websocket,
+.network-log-grid.data-grid.filter-other table.data tr.revealed.network-type-other {
     display: table-row;
 }
 
index a2b3ad3..4d6ca2b 100644 (file)
@@ -200,14 +200,14 @@ li.selected .base-storage-tree-element-subtitle {
     content: url(Images/resourcePlainIconSmall.png);
 }
 
-.resource-sidebar-tree-item.resources-category-images .icon {
+.resource-sidebar-tree-item.resources-type-image .icon {
     position: relative;
     background-image: url(Images/resourcePlainIcon.png);
     background-repeat: no-repeat;
     content: "";
 }
 
-.resources-category-images .image-resource-icon-preview {
+.resources-type-image .image-resource-icon-preview {
     position: absolute;
     margin: auto;
     top: 3px;
@@ -220,12 +220,12 @@ li.selected .base-storage-tree-element-subtitle {
     min-height: 1px;
 }
 
-.children.small .resource-sidebar-tree-item.resources-category-images .icon {
+.children.small .resource-sidebar-tree-item.resources-type-image .icon {
     background-image: url(Images/resourcePlainIconSmall.png);
     content: "";
 }
 
-.children.small .resources-category-images .image-resource-icon-preview {
+.children.small .resources-type-image .image-resource-icon-preview {
     top: 2px;
     bottom: 1px;
     left: 3px;
@@ -234,55 +234,55 @@ li.selected .base-storage-tree-element-subtitle {
     max-height: 11px;
 }
 
-.resource-sidebar-tree-item.resources-category-documents .icon {
+.resource-sidebar-tree-item.resources-type-document .icon {
     content: url(Images/resourceDocumentIcon.png);
 }
 
-.children.small .resource-sidebar-tree-item.resources-category-documents .icon {
+.children.small .resource-sidebar-tree-item.resources-type-document .icon {
     content: url(Images/resourceDocumentIconSmall.png);
 }
 
-.resource-sidebar-tree-item.resources-category-stylesheets .icon {
+.resource-sidebar-tree-item.resources-type-stylesheet .icon {
     content: url(Images/resourceCSSIcon.png);
 }
 
-.children.small .resource-sidebar-tree-item.resources-category-stylesheets .icon {
+.children.small .resource-sidebar-tree-item.resources-type-stylesheet .icon {
     content: url(Images/resourceDocumentIconSmall.png);
 }
 
-.resource-sidebar-tree-item.resources-category-images .icon {
+.resource-sidebar-tree-item.resources-type-image .icon {
     position: relative;
     background-image: url(Images/resourcePlainIcon.png);
     background-repeat: no-repeat;
     content: "";
 }
 
-.children.small .resource-sidebar-tree-item.resources-category-images .icon {
+.children.small .resource-sidebar-tree-item.resources-type-image .icon {
     background-image: url(Images/resourcePlainIconSmall.png);
     content: "";
 }
 
-.resource-sidebar-tree-item.resources-category-fonts .icon {
+.resource-sidebar-tree-item.resources-type-font .icon {
     content: url(Images/resourcePlainIcon.png);
 }
 
-.children.small .resource-sidebar-tree-item.resources-category-fonts .icon {
+.children.small .resource-sidebar-tree-item.resources-type-font .icon {
     content: url(Images/resourcePlainIconSmall.png);
 }
 
-.resource-sidebar-tree-item.resources-category-scripts .icon {
+.resource-sidebar-tree-item.resources-type-script .icon {
     content: url(Images/resourceJSIcon.png);
 }
 
-.children.small .resource-sidebar-tree-item.resources-category-scripts .icon {
+.children.small .resource-sidebar-tree-item.resources-type-script .icon {
     content: url(Images/resourceDocumentIconSmall.png);
 }
 
-.resource-sidebar-tree-item.resources-category-xhr .icon {
+.resource-sidebar-tree-item.resources-type-xhr .icon {
     content: url(Images/resourcePlainIcon.png);
 }
 
-.children.small .resource-sidebar-tree-item.resources-category-xhr .icon {
+.children.small .resource-sidebar-tree-item.resources-type-xhr .icon {
     content: url(Images/resourceDocumentIconSmall.png);
 }