зеркало из https://github.com/mozilla/gecko-dev.git
Bug 622238 - In tests: JavaScript Warning: "assignment to undeclared variable item" {file: "chrome://browser/content/tabview.js" line: 7374} [r=dao, a=beltzner]
This commit is contained in:
Родитель
416d1a7997
Коммит
2af515c763
|
@ -858,16 +858,15 @@ let UI = {
|
|||
getClosestTab: function UI_getClosestTab(tabCenter) {
|
||||
let cl = null;
|
||||
let clDist;
|
||||
for each(item in TabItems.getItems()) {
|
||||
if (item.parent && item.parent.hidden) {
|
||||
continue;
|
||||
}
|
||||
TabItems.getItems().forEach(function (item) {
|
||||
if (item.parent && item.parent.hidden)
|
||||
return;
|
||||
let testDist = tabCenter.distance(item.bounds.center());
|
||||
if (cl==null || testDist < clDist) {
|
||||
cl = item;
|
||||
clDist = testDist;
|
||||
}
|
||||
}
|
||||
});
|
||||
return cl;
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче