Bug 1113032 - Replace deprecated expression closures in about:newtab with real functions. r=ttaubert

This commit is contained in:
Chris Peterson 2014-12-16 19:14:12 -08:00
parent 6335c7bba0
commit 91e979cfbc
5 changed files with 15 additions and 15 deletions

View File

@ -29,7 +29,7 @@ Cell.prototype = {
/**
* The cell's DOM node.
*/
get node() this._node,
get node() { return this._node; },
/**
* The cell's offset in the grid.

View File

@ -18,15 +18,15 @@ let gDrag = {
* The site that is dragged.
*/
_draggedSite: null,
get draggedSite() this._draggedSite,
get draggedSite() { return this._draggedSite; },
/**
* The cell width/height at the point the drag started.
*/
_cellWidth: null,
_cellHeight: null,
get cellWidth() this._cellWidth,
get cellHeight() this._cellHeight,
get cellWidth() { return this._cellWidth; },
get cellHeight() { return this._cellHeight; },
/**
* Start a new drag operation.
@ -146,6 +146,6 @@ let gDrag = {
// After the 'dragstart' event has been processed we can remove the
// temporary drag element from the DOM.
setTimeout(function () scrollbox.removeChild(dragElement), 0);
setTimeout(() => scrollbox.removeChild(dragElement), 0);
}
};

View File

@ -73,7 +73,7 @@ let gDrop = {
});
// Re-pin all shifted pinned cells.
pinnedSites.forEach(function (aSite) aSite.pin(sites.indexOf(aSite)), this);
pinnedSites.forEach(aSite => aSite.pin(sites.indexOf(aSite)));
},
/**

View File

@ -18,7 +18,7 @@ let gGrid = {
* The DOM node of the grid.
*/
_node: null,
get node() this._node,
get node() { return this._node; },
/**
* The cached DOM fragment for sites.
@ -29,18 +29,18 @@ let gGrid = {
* All cells contained in the grid.
*/
_cells: [],
get cells() this._cells,
get cells() { return this._cells; },
/**
* All sites contained in the grid's cells. Sites may be empty.
*/
get sites() [for (cell of this.cells) cell.site],
get sites() { return [for (cell of this.cells) cell.site]; },
// Tells whether the grid has already been initialized.
get ready() !!this._ready,
get ready() { return !!this._ready; },
// Returns whether the page has finished loading yet.
get isDocumentLoaded() document.readyState == "complete",
get isDocumentLoaded() { return document.readyState == "complete"; },
/**
* Initializes the grid.

View File

@ -22,22 +22,22 @@ Site.prototype = {
/**
* The site's DOM node.
*/
get node() this._node,
get node() { return this._node; },
/**
* The site's link.
*/
get link() this._link,
get link() { return this._link; },
/**
* The url of the site's link.
*/
get url() this.link.url,
get url() { return this.link.url; },
/**
* The title of the site's link.
*/
get title() this.link.title,
get title() { return this.link.title; },
/**
* The site's parent cell.