1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-19 21:07:57 +01:00

Remove 'for each' usage in shared globals.

This commit is contained in:
Kris Maglione
2011-10-25 21:22:31 -04:00
parent 19d74ecfff
commit efb39f26a8
2 changed files with 5 additions and 5 deletions

View File

@@ -2012,7 +2012,7 @@ var ItemList = Class("ItemList", {
updateOffsets: function updateOffsets() {
let total = this.itemCount;
let count = 0;
for each (let group in this.activeGroups) {
for (let group in values(this.activeGroups)) {
group.offsets = { start: count, end: total - count - group.itemCount };
count += group.itemCount;
}
@@ -2027,7 +2027,7 @@ var ItemList = Class("ItemList", {
let container = DOM(this.nodes.completions);
let groups = this.activeGroups;
for each (let group in groups) {
for (let group in values(groups)) {
group.reset();
container.append(group.nodes.root);
}
@@ -2070,7 +2070,7 @@ var ItemList = Class("ItemList", {
* @private
*/
draw: function draw() {
for each (let group in this.activeGroups)
for (let group in values(this.activeGroups))
group.draw();
// We need to collect all of the rescrolling functions in
@@ -2178,7 +2178,7 @@ var ItemList = Class("ItemList", {
}
let count = this.maxItems;
for each (let group in groups) {
for (let group in values(groups)) {
let off = Math.max(0, start - group.offsets.start);
group.count = Math.constrain(group.itemCount - off, 0, count);

View File

@@ -1234,7 +1234,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
info.* = info.*.(function::attribute("lang").length() == 0 || @lang == lang);
for each (let elem in info.NS::info)
for each (let attr in ["@name", "@summary", "@href"])
for (let attr in values(["@name", "@summary", "@href"]))
if (elem[attr].length())
info[attr] = elem[attr];
}