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

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

Issue 2649153005: DevTools: convert datagrid and network waterfall sort icons to UI.Icon (Closed)
Patch Set: rebaseline Created 3 years, 11 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/data_grid/DataGrid.js
diff --git a/third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js b/third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js
index 0c971135127d803e38eda79bbab5a29c087e1e86..51ac5eef466bf20af4cb6cdc1c7c5afdebf3987d 100644
--- a/third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js
+++ b/third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js
@@ -168,7 +168,9 @@ DataGrid.DataGrid = class extends Common.Object {
if (column.sortable) {
cell.addEventListener('click', this._clickInHeaderCell.bind(this), false);
cell.classList.add('sortable');
- cell.createChild('div', 'sort-order-icon-container').createChild('div', 'sort-order-icon');
+ var icon = UI.Icon.create('', 'sort-order-icon');
+ cell.createChild('div', 'sort-order-icon-container').appendChild(icon);
+ cell[DataGrid.DataGrid._sortIconSymbol] = icon;
}
}
@@ -903,6 +905,9 @@ DataGrid.DataGrid = class extends Common.Object {
this._sortColumnCell = cell;
cell.classList.add(sortOrder);
+ var icon = cell[DataGrid.DataGrid._sortIconSymbol];
+ icon.setIconType(
+ sortOrder === DataGrid.DataGrid.Order.Ascending ? 'smallicon-triangle-up' : 'smallicon-triangle-down');
this.dispatchEventToListeners(DataGrid.DataGrid.Events.SortingChanged);
}
@@ -1186,6 +1191,7 @@ DataGrid.DataGrid.Align = {
DataGrid.DataGrid._preferredWidthSymbol = Symbol('preferredWidth');
DataGrid.DataGrid._columnIdSymbol = Symbol('columnId');
+DataGrid.DataGrid._sortIconSymbol = Symbol('sortIcon');
DataGrid.DataGrid.ColumnResizePadding = 24;
DataGrid.DataGrid.CenterResizerOverBorderAdjustment = 3;

Powered by Google App Engine
This is Rietveld 408576698