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

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..61e9c4af61d52191105ad960f89c01daee75dbce 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 || String(i);
this._columns[columnIdentifier] = column;
if (column.disclosure)
this.disclosureColumnIdentifier = columnIdentifier;
@@ -160,22 +160,22 @@ WebInspector.DataGrid = function(columnsArray, editCallback, deleteCallback, ref
WebInspector.DataGrid.CornerWidth = 14;
/**
- * @constructor
+ * @typedef {{
+ * id: string,
+ * title: string,
+ * sortable: boolean,
+ * sort: (?WebInspector.DataGrid.Order|undefined),
+ * align: (?WebInspector.DataGrid.Align|undefined),
+ * fixedWidth: (boolean|undefined),
+ * editable: (boolean|undefined),
+ * nonSelectable: (boolean|undefined),
+ * longText: (boolean|undefined),
+ * disclosure: (boolean|undefined),
+ * identifier: (string|undefined),
+ * weight: (number|undefined)
+ * }}
*/
-WebInspector.DataGrid.ColumnDescriptor = function()
-{
- /** @type {string} */ this.id;
- /** @type {string} */ this.title;
- /** @type {string} */ this.width;
- /** @type {boolean} */ this.fixedWidth;
- /** @type {boolean} */ this.sortable;
- /** @type {?WebInspector.DataGrid.Order|undefined} */ this.sort;
- /** @type {?WebInspector.DataGrid.Align|undefined} */ this.align;
- /** @type {boolean|undefined} */ this.editable;
- /** @type {boolean|undefined} */ this.nonSelectable;
- /** @type {boolean|undefined} */ this.longText;
- /** @type {boolean|undefined} */ this.disclosure;
-}
+WebInspector.DataGrid.ColumnDescriptor;
WebInspector.DataGrid.Events = {
SelectedNode: "SelectedNode",
@@ -217,7 +217,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 || String(i);
var headerColumn = this._headerTableColumnGroup.createChild("col");
var dataColumn = this._dataTableColumnGroup.createChild("col");
if (column.width) {
@@ -717,7 +717,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 || String(i)])
this._visibleColumnsArray.push(column);
}
this._refreshHeader();
@@ -1236,7 +1236,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 || String(i)));
this._element.appendChild(this._createTDWithClass("corner"));
},

Powered by Google App Engine
This is Rietveld 408576698