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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/ViewportDataGrid.js

Issue 2445923002: [Devtools] Cleanup DataGrid.js (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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.DataGrid} 7 * @extends {WebInspector.DataGrid}
8 * @param {!Array.<!WebInspector.DataGrid.ColumnDescriptor>} columnsArray 8 * @param {!Array.<!WebInspector.DataGrid.ColumnDescriptor>} columnsArray
9 * @param {function(!WebInspector.DataGridNode, string, string, string)=} editCa llback 9 * @param {function(!WebInspector.DataGridNode, string, string, string)=} editCa llback
10 * @param {function(!WebInspector.DataGridNode)=} deleteCallback 10 * @param {function(!WebInspector.DataGridNode)=} deleteCallback
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 this._hiddenWheelTarget = oldNode.abandonElement(); 236 this._hiddenWheelTarget = oldNode.abandonElement();
237 else 237 else
238 element.remove(); 238 element.remove();
239 oldNode.wasDetached(); 239 oldNode.wasDetached();
240 } 240 }
241 } 241 }
242 242
243 var previousElement = this._topFillerRow; 243 var previousElement = this._topFillerRow;
244 if (previousElement.nextSibling === this._hiddenWheelTarget) 244 if (previousElement.nextSibling === this._hiddenWheelTarget)
245 previousElement = this._hiddenWheelTarget; 245 previousElement = this._hiddenWheelTarget;
246 var tBody = this.dataTableBody; 246 var tBody = this._dataTableBody;
lushnikov 2016/10/24 23:34:55 this is a file-private field; you should expose it
allada 2016/10/24 23:49:11 Done.
247 var offset = viewportState.offset; 247 var offset = viewportState.offset;
248 for (var i = 0; i < visibleNodes.length; ++i) { 248 for (var i = 0; i < visibleNodes.length; ++i) {
249 var node = visibleNodes[i]; 249 var node = visibleNodes[i];
250 var element = node.element(); 250 var element = node.element();
251 node.willAttach(); 251 node.willAttach();
252 element.classList.toggle("odd", (offset + i) % 2 === 0); 252 element.classList.toggle("odd", (offset + i) % 2 === 0);
253 tBody.insertBefore(element, previousElement.nextSibling); 253 tBody.insertBefore(element, previousElement.nextSibling);
254 previousElement = element; 254 previousElement = element;
255 } 255 }
256 256
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 return result; 476 return result;
477 }, 477 },
478 478
479 reveal: function() 479 reveal: function()
480 { 480 {
481 this.dataGrid._revealViewportNode(this); 481 this.dataGrid._revealViewportNode(this);
482 }, 482 },
483 483
484 __proto__: WebInspector.DataGridNode.prototype 484 __proto__: WebInspector.DataGridNode.prototype
485 } 485 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui_lazy/DataGrid.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698