mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Fixes for Dolske's strict JS warnings
This commit is contained in:
parent
6610075e44
commit
8a35f21530
@ -112,7 +112,8 @@ Drag.prototype = {
|
||||
// proportionally or not
|
||||
// checkItemStatus - (boolean) make sure this is a valid item which should be snapped
|
||||
snapBounds: function Drag_snapBounds(bounds, stationaryCorner, assumeConstantSize, keepProportional, checkItemStatus) {
|
||||
var stationaryCorner = stationaryCorner || 'topleft';
|
||||
if (!stationaryCorner)
|
||||
stationaryCorner || 'topleft';
|
||||
var update = false; // need to update
|
||||
var updateX = false;
|
||||
var updateY = false;
|
||||
|
@ -1293,6 +1293,7 @@ window.GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
},
|
||||
@ -1468,10 +1469,8 @@ window.GroupItems = {
|
||||
getGroupItemWithTitle: function(title) {
|
||||
var result = null;
|
||||
this.groupItems.forEach(function(groupItem) {
|
||||
if (groupItem.getTitle() == title) {
|
||||
if (groupItem.getTitle() == title)
|
||||
result = groupItem;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
@ -1506,10 +1505,8 @@ window.GroupItems = {
|
||||
groupItem: function(a) {
|
||||
var result = null;
|
||||
this.groupItems.forEach(function(candidate) {
|
||||
if (candidate.id == a) {
|
||||
if (candidate.id == a)
|
||||
result = candidate;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
@ -1700,6 +1697,7 @@ window.GroupItems = {
|
||||
tabItem = child;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
@ -1712,6 +1710,7 @@ window.GroupItems = {
|
||||
currentIndex = index;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
var firstGroupItems = groupItems.slice(currentIndex + 1);
|
||||
firstGroupItems.some(function(groupItem) {
|
||||
@ -1720,6 +1719,7 @@ window.GroupItems = {
|
||||
tabItem = child;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (!tabItem) {
|
||||
var orphanedTabs = GroupItems.getOrphanedTabs();
|
||||
@ -1734,6 +1734,7 @@ window.GroupItems = {
|
||||
tabItem = child;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -681,10 +681,8 @@ window.Item.prototype = {
|
||||
var cancel = false;
|
||||
var $target = iQ(e.target);
|
||||
cancelClasses.forEach(function(className) {
|
||||
if ($target.hasClass(className)) {
|
||||
if ($target.hasClass(className))
|
||||
cancel = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (cancel) {
|
||||
@ -1058,16 +1056,16 @@ window.Items = {
|
||||
return;
|
||||
|
||||
var bounds2 = pair2.bounds;
|
||||
if (bounds2.intersects(newBounds)) {
|
||||
if (bounds2.intersects(newBounds))
|
||||
blocked = true;
|
||||
return false;
|
||||
}
|
||||
return;
|
||||
});
|
||||
|
||||
if (!blocked) {
|
||||
pair.bounds.copy(newBounds);
|
||||
}
|
||||
}
|
||||
return;
|
||||
});
|
||||
|
||||
if (!pairsProvided) {
|
||||
|
@ -42,7 +42,7 @@
|
||||
// ##########
|
||||
// Class: Storage
|
||||
// Singleton for permanent storage of TabView data.
|
||||
Storage = {
|
||||
let Storage = {
|
||||
GROUP_DATA_IDENTIFIER: "tabview-group",
|
||||
GROUPS_DATA_IDENTIFIER: "tabview-groups",
|
||||
TAB_DATA_IDENTIFIER: "tabview-tab",
|
||||
|
@ -174,6 +174,7 @@ Trench.prototype = {
|
||||
this.activeRect = new Rect(this.activeRange.min, this.position - this.radius, this.activeRange.extent, 2 * this.radius);
|
||||
this.guideRect = new Rect(this.activeRange.min, this.position, this.activeRange.extent, 0);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
//----------
|
||||
|
@ -420,7 +420,6 @@ var UIManager = {
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
AllTabs.register("move", function(tab) {
|
||||
|
Loading…
Reference in New Issue
Block a user