Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/ui/filters-filterview.js

Issue 29329521: Issue 3222 - Expose filter type as a string property (Closed)
Patch Set: Created Oct. 29, 2015, 7:41 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/skin/filters.css » ('j') | lib/requestNotifier.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/ui/filters-filterview.js
===================================================================
--- a/chrome/content/ui/filters-filterview.js
+++ b/chrome/content/ui/filters-filterview.js
@@ -638,17 +638,17 @@ var FilterView =
if (this.boxObject)
{
this.noGroupDummy = {index: 0, filter: {text: this.boxObject.treeBody.getAttribute("noGroupText"), dummy: true}};
this.noFiltersDummy = {index: 0, filter: {text: this.boxObject.treeBody.getAttribute("noFiltersText"), dummy: true}};
this.editDummy = {filter: {text: ""}};
let atomService = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomService);
- let stringAtoms = ["col-filter", "col-enabled", "col-hitcount", "col-lasthit", "type-comment", "type-filterlist", "type-whitelist", "type-elemhide", "type-elemhideexception", "type-invalid"];
+ let stringAtoms = ["col-filter", "col-enabled", "col-hitcount", "col-lasthit", "type-invalid", "type-comment", "type-blocking", "type-whitelist", "type-elemhide", "type-elemhideexception", "type-cssproperty"];
let boolAtoms = ["selected", "dummy", "slow", "disabled"];
this.atoms = {};
for (let atom of stringAtoms)
this.atoms[atom] = atomService.getAtom(atom);
for (let atom of boolAtoms)
{
this.atoms[atom + "-true"] = atomService.getAtom(atom + "-true");
@@ -723,29 +723,17 @@ var FilterView =
let list = [];
let filter = this.data[row].filter;
list.push("selected-" + this.selection.isSelected(row));
list.push("slow-" + (filter instanceof RegExpFilter && defaultMatcher.isSlowFilter(filter)));
if (filter instanceof ActiveFilter)
list.push("disabled-" + filter.disabled);
list.push("dummy-" + ("dummy" in filter));
-
- if (filter instanceof CommentFilter)
- list.push("type-comment");
- else if (filter instanceof BlockingFilter)
- list.push("type-filterlist");
- else if (filter instanceof WhitelistFilter)
- list.push("type-whitelist");
- else if (filter instanceof ElemHideFilter)
- list.push("type-elemhide");
- else if (filter instanceof ElemHideException)
- list.push("type-elemhideexception");
- else if (filter instanceof InvalidFilter)
- list.push("type-invalid");
+ list.push("type-" + filter.type);
return this.generateProperties(list, properties);
},
getCellProperties: function(row, col, properties)
{
return this.getRowProperties(row, properties) + " " + this.getColumnProperties(col, properties);
},
« no previous file with comments | « no previous file | chrome/skin/filters.css » ('j') | lib/requestNotifier.js » ('J')

Powered by Google App Engine
This is Rietveld