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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js

Issue 2444223002: [Devtools] Cleanup DataGrid's typecast and identifier naming (Closed)
Patch Set: changes Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 }; 116 };
117 117
118 WebInspector.IDBDataView.prototype = { 118 WebInspector.IDBDataView.prototype = {
119 /** 119 /**
120 * @return {!WebInspector.DataGrid} 120 * @return {!WebInspector.DataGrid}
121 */ 121 */
122 _createDataGrid: function() 122 _createDataGrid: function()
123 { 123 {
124 var keyPath = this._isIndex ? this._index.keyPath : this._objectStore.ke yPath; 124 var keyPath = this._isIndex ? this._index.keyPath : this._objectStore.ke yPath;
125 125
126 var columns = []; 126 var columns = /** @type {!Array<!WebInspector.DataGrid.ColumnDescriptor> } */ ([]);
127 columns.push({id: "number", title: WebInspector.UIString("#"), width: "5 0px"}); 127 columns.push({id: "number", title: WebInspector.UIString("#"), sortable: false, width: "50px"});
128 columns.push({id: "key", titleDOMFragment: this._keyColumnHeaderFragment (WebInspector.UIString("Key"), keyPath)}); 128 columns.push({id: "key", titleDOMFragment: this._keyColumnHeaderFragment (WebInspector.UIString("Key"), keyPath), sortable: false});
129 if (this._isIndex) 129 if (this._isIndex)
130 columns.push({id: "primaryKey", titleDOMFragment: this._keyColumnHea derFragment(WebInspector.UIString("Primary key"), this._objectStore.keyPath)}); 130 columns.push({id: "primaryKey", titleDOMFragment: this._keyColumnHea derFragment(WebInspector.UIString("Primary key"), this._objectStore.keyPath), so rtable: false});
131 columns.push({id: "value", title: WebInspector.UIString("Value")}); 131 columns.push({id: "value", title: WebInspector.UIString("Value"), sortab le: false});
132 132
133 var dataGrid = new WebInspector.DataGrid(columns); 133 var dataGrid = new WebInspector.DataGrid(columns);
134 return dataGrid; 134 return dataGrid;
135 }, 135 },
136 136
137 /** 137 /**
138 * @param {string} prefix 138 * @param {string} prefix
139 * @param {*} keyPath 139 * @param {*} keyPath
140 * @return {!DocumentFragment} 140 * @return {!DocumentFragment}
141 */ 141 */
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 cell.appendChild(objectElement); 367 cell.appendChild(objectElement);
368 break; 368 break;
369 default: 369 default:
370 } 370 }
371 371
372 return cell; 372 return cell;
373 }, 373 },
374 374
375 __proto__: WebInspector.DataGridNode.prototype 375 __proto__: WebInspector.DataGridNode.prototype
376 }; 376 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698