[Pkg-mozext-commits] [firebug] 13/35: Issue 7396 (XHR requests don't apply to other filters) http://code.google.com/p/fbug/issues/detail?id=7396

David Prévot taffit at moszumanska.debian.org
Sat May 24 14:54:27 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firebug.

commit 013f243acb87a5b23cc49821eec888886b1948a6
Author: Sebastian Zartner <sebastianzartner at gmail.com>
Date:   Mon Apr 28 15:05:23 2014 +0200

    Issue 7396 (XHR requests don't apply to other filters)
    http://code.google.com/p/fbug/issues/detail?id=7396
    
    Part 1: Use white-listing for filters
---
 extension/content/firebug/net/netPanel.js | 14 ++++++++++----
 extension/skin/classic/net.css            | 29 +++++++++++++++++------------
 2 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/extension/content/firebug/net/netPanel.js b/extension/content/firebug/net/netPanel.js
index 25888c5..fcebfe1 100644
--- a/extension/content/firebug/net/netPanel.js
+++ b/extension/content/firebug/net/netPanel.js
@@ -1254,7 +1254,7 @@ NetPanel.prototype = Obj.extend(ActivablePanel,
         var fileCount = 0;
         var minTime = 0, maxTime = 0;
 
-        for (var i=0; i<phase.files.length; i++)
+        for (var i = 0; i < phase.files.length; i++)
         {
             var file = phase.files[i];
 
@@ -1444,12 +1444,18 @@ NetPanel.prototype = Obj.extend(ActivablePanel,
         this.filterCategories = filterCategories;
 
         var panelNode = this.panelNode;
+
+        if (filterCategories.join(" ") !== "all")
+            panelNode.classList.add("filtering");
+        else
+            panelNode.classList.remove("filtering");
+
         for (var category in NetUtils.fileCategories)
         {
-            if (filterCategories.join(" ") != "all" && filterCategories.indexOf(category) == -1)
-                Css.setClass(panelNode, "hideCategory-" + category);
+            if (filterCategories.join(" ") !== "all" && filterCategories.indexOf(category) !== -1)
+                panelNode.classList.add("showCategory-" + category);
             else
-                Css.removeClass(panelNode, "hideCategory-" + category);
+                panelNode.classList.remove("showCategory-" + category);
         }
     },
 
diff --git a/extension/skin/classic/net.css b/extension/skin/classic/net.css
index 3c78ee7..2b90f85 100644
--- a/extension/skin/classic/net.css
+++ b/extension/skin/classic/net.css
@@ -5,19 +5,24 @@
 }
 
 /*************************************************************************************************/
+/* Filtering */
 
-.hideCategory-undefined .category-undefined,
-.hideCategory-html .category-html,
-.hideCategory-css .category-css,
-.hideCategory-js .category-js,
-.hideCategory-image .category-image,
-.hideCategory-xhr .category-xhr,
-.hideCategory-plugin .category-plugin,
-.hideCategory-media .category-media,
-.hideCategory-font .category-font,
-.hideCategory-txt .category-txt,
-.hideCategory-bin .category-bin {
-    display: none !important;
+.filtering .netRow:not(.netHeaderRow):not(.netSummaryRow) {
+    display: none;
+}
+
+.showCategory-undefined .category-undefined,
+.showCategory-html .category-html,
+.showCategory-css .category-css,
+.showCategory-js .category-js,
+.showCategory-image .category-image,
+.showCategory-xhr .category-xhr,
+.showCategory-plugin .category-plugin,
+.showCategory-media .category-media,
+.showCategory-font .category-font,
+.showCategory-txt .category-txt,
+.showCategory-bin .category-bin {
+    display: table-row !important;
 }
 
 /*************************************************************************************************/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list