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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/EventSourceMessagesView.js

Issue 2444223002: [Devtools] Cleanup DataGrid's typecast and identifier naming (Closed)
Patch Set: changes Created 4 years, 2 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/network/EventSourceMessagesView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/EventSourceMessagesView.js b/third_party/WebKit/Source/devtools/front_end/network/EventSourceMessagesView.js
index 8734a10b62db2d79f81befec5e75e18a4ab03237..d7f742b6192b5c8f560b6348af0b2751fe183d82 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/EventSourceMessagesView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/EventSourceMessagesView.js
@@ -14,12 +14,12 @@ WebInspector.EventSourceMessagesView = function(request)
this.element.classList.add("event-source-messages-view");
this._request = request;
- var columns = [
+ var columns = /** @type {!Array<!WebInspector.DataGrid.ColumnDescriptor>} */ ([
{id: "id", title: WebInspector.UIString("Id"), sortable: true, weight: 8},
{id: "type", title: WebInspector.UIString("Type"), sortable: true, weight: 8},
{id: "data", title: WebInspector.UIString("Data"), sortable: false, weight: 88},
{id: "time", title: WebInspector.UIString("Time"), sortable: true, weight: 8}
- ];
+ ]);
this._dataGrid = new WebInspector.SortableDataGrid(columns);
this._dataGrid.setStickToBottom(true);
@@ -58,10 +58,10 @@ WebInspector.EventSourceMessagesView.prototype = {
_sortItems: function()
{
- var sortColumnIdentifier = this._dataGrid.sortColumnIdentifier();
- if (!sortColumnIdentifier)
+ var sortColumnId = this._dataGrid.sortColumnId();
+ if (!sortColumnId)
return;
- var comparator = WebInspector.EventSourceMessageNode.Comparators[sortColumnIdentifier];
+ var comparator = WebInspector.EventSourceMessageNode.Comparators[sortColumnId];
if (!comparator)
return;
this._dataGrid.sortNodes(comparator, !this._dataGrid.isSortOrderAscending());

Powered by Google App Engine
This is Rietveld 408576698