Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js

Issue 1774503005: [DevTools] Roll closure compiler to ToT version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js
index 046a2b5d89f0bf23b1c087ad5b80f47b54552bd6..d0cef396e797becae79e57d16969c219729c1d63 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js
@@ -99,7 +99,7 @@ WebInspector.DataGrid = function(columnsArray, editCallback, deleteCallback, ref
for (var i = 0; i < columnsArray.length; ++i) {
var column = columnsArray[i];
- var columnIdentifier = column.identifier = column.id || i;
+ var columnIdentifier = column.identifier = column.id || "" + i;
caseq 2016/03/08 20:08:25 nit: String(i)
this._columns[columnIdentifier] = column;
if (column.disclosure)
this.disclosureColumnIdentifier = columnIdentifier;
@@ -161,6 +161,7 @@ WebInspector.DataGrid.CornerWidth = 14;
/**
* @constructor
+ * @struct
*/
WebInspector.DataGrid.ColumnDescriptor = function()
{
@@ -175,6 +176,8 @@ WebInspector.DataGrid.ColumnDescriptor = function()
/** @type {boolean|undefined} */ this.nonSelectable;
/** @type {boolean|undefined} */ this.longText;
/** @type {boolean|undefined} */ this.disclosure;
+ /** @type {string|undefined} */ this.identifier;
+ /** @type {number|undefined} */ this.weight;
}
WebInspector.DataGrid.Events = {
@@ -217,7 +220,7 @@ WebInspector.DataGrid.prototype = {
for (var i = 0; i < this._visibleColumnsArray.length; ++i) {
var column = this._visibleColumnsArray[i];
- var columnIdentifier = column.identifier;
+ var columnIdentifier = column.identifier || "" + i;
caseq 2016/03/08 20:08:25 ditto
kozy 2016/03/08 20:28:55 Done.
var headerColumn = this._headerTableColumnGroup.createChild("col");
var dataColumn = this._dataTableColumnGroup.createChild("col");
if (column.width) {
@@ -717,7 +720,7 @@ WebInspector.DataGrid.prototype = {
this._visibleColumnsArray = [];
for (var i = 0; i < this._columnsArray.length; ++i) {
var column = this._columnsArray[i];
- if (columnsVisibility[column.identifier])
+ if (columnsVisibility[column.identifier || "" + i])
caseq 2016/03/08 20:08:25 ditto
kozy 2016/03/08 20:28:55 Done.
this._visibleColumnsArray.push(column);
}
this._refreshHeader();
@@ -1236,7 +1239,7 @@ WebInspector.DataGridNode.prototype = {
this._element.removeChildren();
var columnsArray = this.dataGrid._visibleColumnsArray;
for (var i = 0; i < columnsArray.length; ++i)
- this._element.appendChild(this.createCell(columnsArray[i].identifier));
+ this._element.appendChild(this.createCell(columnsArray[i].identifier || "" + i));
caseq 2016/03/08 20:08:25 ditto
kozy 2016/03/08 20:28:55 Done.
this._element.appendChild(this._createTDWithClass("corner"));
},

Powered by Google App Engine
This is Rietveld 408576698