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

Side by Side Diff: chrome/content/ui/filters-filterview.js

Issue 6519778499887104: Issue 2010 - Remove some uses of "for each" with "for of" (Closed)
Patch Set: Created Feb. 26, 2015, 11:50 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/content/ui/filters.js ('k') | chrome/content/ui/filters-subscriptionview.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 { 640 {
641 this.noGroupDummy = {index: 0, filter: {text: this.boxObject.treeBody.getA ttribute("noGroupText"), dummy: true}}; 641 this.noGroupDummy = {index: 0, filter: {text: this.boxObject.treeBody.getA ttribute("noGroupText"), dummy: true}};
642 this.noFiltersDummy = {index: 0, filter: {text: this.boxObject.treeBody.ge tAttribute("noFiltersText"), dummy: true}}; 642 this.noFiltersDummy = {index: 0, filter: {text: this.boxObject.treeBody.ge tAttribute("noFiltersText"), dummy: true}};
643 this.editDummy = {filter: {text: ""}}; 643 this.editDummy = {filter: {text: ""}};
644 644
645 let atomService = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomS ervice); 645 let atomService = Cc["@mozilla.org/atom-service;1"].getService(Ci.nsIAtomS ervice);
646 let stringAtoms = ["col-filter", "col-enabled", "col-hitcount", "col-lasth it", "type-comment", "type-filterlist", "type-whitelist", "type-elemhide", "type -elemhideexception", "type-invalid"]; 646 let stringAtoms = ["col-filter", "col-enabled", "col-hitcount", "col-lasth it", "type-comment", "type-filterlist", "type-whitelist", "type-elemhide", "type -elemhideexception", "type-invalid"];
647 let boolAtoms = ["selected", "dummy", "slow", "disabled"]; 647 let boolAtoms = ["selected", "dummy", "slow", "disabled"];
648 648
649 this.atoms = {}; 649 this.atoms = {};
650 for each (let atom in stringAtoms) 650 for (let atom of stringAtoms)
651 this.atoms[atom] = atomService.getAtom(atom); 651 this.atoms[atom] = atomService.getAtom(atom);
652 for each (let atom in boolAtoms) 652 for (let atom of boolAtoms)
653 { 653 {
654 this.atoms[atom + "-true"] = atomService.getAtom(atom + "-true"); 654 this.atoms[atom + "-true"] = atomService.getAtom(atom + "-true");
655 this.atoms[atom + "-false"] = atomService.getAtom(atom + "-false"); 655 this.atoms[atom + "-false"] = atomService.getAtom(atom + "-false");
656 } 656 }
657 657
658 let columns = this.boxObject.columns; 658 let columns = this.boxObject.columns;
659 for (let i = 0; i < columns.length; i++) 659 for (let i = 0; i < columns.length; i++)
660 if (columns[i].element.hasAttribute("sortDirection")) 660 if (columns[i].element.hasAttribute("sortDirection"))
661 this.sortBy(columns[i].id, columns[i].element.getAttribute("sortDirect ion")); 661 this.sortBy(columns[i].id, columns[i].element.getAttribute("sortDirect ion"));
662 662
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 getProgressMode: function() null, 840 getProgressMode: function() null,
841 getImageSrc: function() null, 841 getImageSrc: function() null,
842 isSeparator: function() false, 842 isSeparator: function() false,
843 performAction: function() {}, 843 performAction: function() {},
844 performActionOnRow: function() {}, 844 performActionOnRow: function() {},
845 performActionOnCell: function() {}, 845 performActionOnCell: function() {},
846 getCellValue: function() null, 846 getCellValue: function() null,
847 setCellValue: function() {}, 847 setCellValue: function() {},
848 selectionChanged: function() {}, 848 selectionChanged: function() {},
849 }; 849 };
OLDNEW
« no previous file with comments | « chrome/content/ui/filters.js ('k') | chrome/content/ui/filters-subscriptionview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld