Bug 682791 - Ensure that all functions have an internal name for Panorama r=tim
This commit is contained in:
@@ -236,7 +236,7 @@ let TabView = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
show: function() {
|
show: function TabView_show() {
|
||||||
if (this.isVisible())
|
if (this.isVisible())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ let TabView = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
hide: function() {
|
hide: function TabView_hide() {
|
||||||
if (!this.isVisible())
|
if (!this.isVisible())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ let TabView = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
toggle: function() {
|
toggle: function TabView_toggle() {
|
||||||
if (this.isVisible())
|
if (this.isVisible())
|
||||||
this.hide();
|
this.hide();
|
||||||
else
|
else
|
||||||
@@ -287,7 +287,7 @@ let TabView = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
updateContextMenu: function(tab, popup) {
|
updateContextMenu: function TabView_updateContextMenu(tab, popup) {
|
||||||
let separator = document.getElementById("context_tabViewNamedGroups");
|
let separator = document.getElementById("context_tabViewNamedGroups");
|
||||||
let isEmpty = true;
|
let isEmpty = true;
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ let TabView = {
|
|||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
// Prepares the tab view for undo close tab.
|
// Prepares the tab view for undo close tab.
|
||||||
prepareUndoCloseTab: function(blankTabToRemove) {
|
prepareUndoCloseTab: function TabView_prepareUndoCloseTab(blankTabToRemove) {
|
||||||
if (this._window) {
|
if (this._window) {
|
||||||
this._window.UI.restoredClosedTab = true;
|
this._window.UI.restoredClosedTab = true;
|
||||||
|
|
||||||
@@ -385,7 +385,7 @@ let TabView = {
|
|||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
// Cleans up the tab view after undo close tab.
|
// Cleans up the tab view after undo close tab.
|
||||||
afterUndoCloseTab: function () {
|
afterUndoCloseTab: function TabView_afterUndoCloseTab() {
|
||||||
if (this._window)
|
if (this._window)
|
||||||
this._window.UI.restoredClosedTab = false;
|
this._window.UI.restoredClosedTab = false;
|
||||||
},
|
},
|
||||||
@@ -435,7 +435,7 @@ let TabView = {
|
|||||||
// Function: enableSessionRestore
|
// Function: enableSessionRestore
|
||||||
// Enables automatic session restore when the browser is started. Does
|
// Enables automatic session restore when the browser is started. Does
|
||||||
// nothing if we already did that once in the past.
|
// nothing if we already did that once in the past.
|
||||||
enableSessionRestore: function UI_enableSessionRestore() {
|
enableSessionRestore: function TabView_enableSessionRestore() {
|
||||||
if (!this._window || !this.firstUseExperienced)
|
if (!this._window || !this.firstUseExperienced)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -862,7 +862,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||||||
// ----------
|
// ----------
|
||||||
// Function: _fadeAwayUndoButton
|
// Function: _fadeAwayUndoButton
|
||||||
// Fades away the undo button
|
// Fades away the undo button
|
||||||
_fadeAwayUndoButton: function GroupItem__fadeAwayUdoButton() {
|
_fadeAwayUndoButton: function GroupItem__fadeAwayUndoButton() {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
if (this.$undoContainer) {
|
if (this.$undoContainer) {
|
||||||
@@ -956,7 +956,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
// Sets up fade away undo button timeout.
|
// Sets up fade away undo button timeout.
|
||||||
setupFadeAwayUndoButtonTimer: function() {
|
setupFadeAwayUndoButtonTimer: function GroupItem_setupFadeAwayUndoButtonTimer() {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
if (!this._undoButtonTimeoutId) {
|
if (!this._undoButtonTimeoutId) {
|
||||||
@@ -968,7 +968,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
// Cancels the fade away undo button timeout.
|
// Cancels the fade away undo button timeout.
|
||||||
_cancelFadeAwayUndoButtonTimer: function() {
|
_cancelFadeAwayUndoButtonTimer: function GroupItem__cancelFadeAwayUndoButtonTimer() {
|
||||||
clearTimeout(this._undoButtonTimeoutId);
|
clearTimeout(this._undoButtonTimeoutId);
|
||||||
this._undoButtonTimeoutId = null;
|
this._undoButtonTimeoutId = null;
|
||||||
},
|
},
|
||||||
@@ -2089,7 +2089,7 @@ let GroupItems = {
|
|||||||
// ----------
|
// ----------
|
||||||
// Function: getAppTabFavIconUrl
|
// Function: getAppTabFavIconUrl
|
||||||
// Gets the fav icon url for app tab.
|
// Gets the fav icon url for app tab.
|
||||||
getAppTabFavIconUrl: function GroupItems__getAppTabFavIconUrl(xulTab) {
|
getAppTabFavIconUrl: function GroupItems_getAppTabFavIconUrl(xulTab) {
|
||||||
let iconUrl;
|
let iconUrl;
|
||||||
|
|
||||||
if (UI.shouldLoadFavIcon(xulTab.linkedBrowser))
|
if (UI.shouldLoadFavIcon(xulTab.linkedBrowser))
|
||||||
@@ -2548,7 +2548,7 @@ let GroupItems = {
|
|||||||
// Paramaters:
|
// Paramaters:
|
||||||
// tab - the <xul:tab>.
|
// tab - the <xul:tab>.
|
||||||
// groupItemId - the <groupItem>'s id. If nothing, create a new <groupItem>.
|
// groupItemId - the <groupItem>'s id. If nothing, create a new <groupItem>.
|
||||||
moveTabToGroupItem : function GroupItems_moveTabToGroupItem (tab, groupItemId) {
|
moveTabToGroupItem : function GroupItems_moveTabToGroupItem(tab, groupItemId) {
|
||||||
if (tab.pinned)
|
if (tab.pinned)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ Range.prototype = {
|
|||||||
// Function: contains
|
// Function: contains
|
||||||
// Whether the <Range> contains the given <Range> or value or not.
|
// Whether the <Range> contains the given <Range> or value or not.
|
||||||
//
|
//
|
||||||
// Paramaters
|
// Parameters
|
||||||
// - a number or <Range>
|
// - a number or <Range>
|
||||||
contains: function Range_contains(value) {
|
contains: function Range_contains(value) {
|
||||||
if (Utils.isNumber(value))
|
if (Utils.isNumber(value))
|
||||||
@@ -338,11 +338,11 @@ Range.prototype = {
|
|||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
// Function: overlaps
|
// Function: overlaps
|
||||||
// Whether the <Range> overlaps with the given <Range> or value or not.
|
// Whether the <Range> overlaps with the given <Range> value or not.
|
||||||
//
|
//
|
||||||
// Paramaters
|
// Parameters
|
||||||
// - a number or <Range>
|
// - a number or <Range>
|
||||||
overlaps: function Rect_overlaps(value) {
|
overlaps: function Range_overlaps(value) {
|
||||||
if (Utils.isNumber(value))
|
if (Utils.isNumber(value))
|
||||||
return this.contains(value);
|
return this.contains(value);
|
||||||
if (Utils.isRange(value))
|
if (Utils.isRange(value))
|
||||||
@@ -355,7 +355,7 @@ Range.prototype = {
|
|||||||
// Maps the given value to the range [0,1], so that it returns 0 if the value is <= the min,
|
// Maps the given value to the range [0,1], so that it returns 0 if the value is <= the min,
|
||||||
// returns 1 if the value >= the max, and returns an interpolated "proportion" in (min, max).
|
// returns 1 if the value >= the max, and returns an interpolated "proportion" in (min, max).
|
||||||
//
|
//
|
||||||
// Paramaters
|
// Parameters
|
||||||
// - a number
|
// - a number
|
||||||
// - (bool) smooth? If true, a smooth tanh-based function will be used instead of the linear.
|
// - (bool) smooth? If true, a smooth tanh-based function will be used instead of the linear.
|
||||||
proportion: function Range_proportion(value, smooth) {
|
proportion: function Range_proportion(value, smooth) {
|
||||||
@@ -386,7 +386,7 @@ Range.prototype = {
|
|||||||
// Function: scale
|
// Function: scale
|
||||||
// Takes the given value in [0,1] and maps it to the associated value on the Range.
|
// Takes the given value in [0,1] and maps it to the associated value on the Range.
|
||||||
//
|
//
|
||||||
// Paramaters
|
// Parameters
|
||||||
// - a number in [0,1]
|
// - a number in [0,1]
|
||||||
scale: function Range_scale(value) {
|
scale: function Range_scale(value) {
|
||||||
if (value > 1)
|
if (value > 1)
|
||||||
@@ -783,7 +783,7 @@ let Utils = {
|
|||||||
// Tries to execute a number of functions. Returns immediately the return
|
// Tries to execute a number of functions. Returns immediately the return
|
||||||
// value of the first non-failed function without executing successive
|
// value of the first non-failed function without executing successive
|
||||||
// functions, or null.
|
// functions, or null.
|
||||||
attempt: function () {
|
attempt: function Utils_attempt() {
|
||||||
let args = arguments;
|
let args = arguments;
|
||||||
|
|
||||||
for (let i = 0; i < args.length; i++) {
|
for (let i = 0; i < args.length; i++) {
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ TabItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
|||||||
// Function: isShowingCachedData
|
// Function: isShowingCachedData
|
||||||
// Returns a boolean indicates whether the cached data is being displayed or
|
// Returns a boolean indicates whether the cached data is being displayed or
|
||||||
// not.
|
// not.
|
||||||
isShowingCachedData: function() {
|
isShowingCachedData: function TabItem_isShowingCachedData() {
|
||||||
return (this._cachedImageData != null);
|
return (this._cachedImageData != null);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -888,7 +888,7 @@ let TabItems = {
|
|||||||
// ----------
|
// ----------
|
||||||
// Function: isComplete
|
// Function: isComplete
|
||||||
// Return whether the xul:tab has fully loaded.
|
// Return whether the xul:tab has fully loaded.
|
||||||
isComplete: function TabItems_update(tab) {
|
isComplete: function TabItems_isComplete(tab) {
|
||||||
// If our readyState is complete, but we're showing about:blank,
|
// If our readyState is complete, but we're showing about:blank,
|
||||||
// and we're not loading about:blank, it means we haven't really
|
// and we're not loading about:blank, it means we haven't really
|
||||||
// started loading. This can happen to the first few tabs in a
|
// started loading. This can happen to the first few tabs in a
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ Trench.prototype = {
|
|||||||
// position - (integer) px center position of the trench
|
// position - (integer) px center position of the trench
|
||||||
// range - (<Range>) the explicit active range of the trench
|
// range - (<Range>) the explicit active range of the trench
|
||||||
// minRange - (<Range>) the minimum range of the trench
|
// minRange - (<Range>) the minimum range of the trench
|
||||||
setPosition: function Trench_setPos(position, range, minRange) {
|
setPosition: function Trench_setPosition(position, range, minRange) {
|
||||||
this.position = position;
|
this.position = position;
|
||||||
|
|
||||||
var page = Items.getPageBounds(true);
|
var page = Items.getPageBounds(true);
|
||||||
@@ -172,7 +172,7 @@ Trench.prototype = {
|
|||||||
//
|
//
|
||||||
// Parameters:
|
// Parameters:
|
||||||
// activeRange - (<Range>)
|
// activeRange - (<Range>)
|
||||||
setActiveRange: function Trench_setActiveRect(activeRange) {
|
setActiveRange: function Trench_setActiveRange(activeRange) {
|
||||||
if (!Utils.isRange(activeRange))
|
if (!Utils.isRange(activeRange))
|
||||||
return false;
|
return false;
|
||||||
this.activeRange = activeRange;
|
this.activeRange = activeRange;
|
||||||
|
|||||||
@@ -1009,7 +1009,7 @@ let UI = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
updateTabButton: function UI__updateTabButton() {
|
updateTabButton: function UI_updateTabButton() {
|
||||||
let exitButton = document.getElementById("exit-button");
|
let exitButton = document.getElementById("exit-button");
|
||||||
let numberOfGroups = GroupItems.groupItems.length;
|
let numberOfGroups = GroupItems.groupItems.length;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user