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

Unified Diff: Source/devtools/front_end/ui/DataGrid.js

Issue 438273002: DevTools: introduce ViewportDataGrid (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: inline mode Created 6 years, 4 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
« no previous file with comments | « Source/devtools/front_end/network/NetworkPanel.js ('k') | Source/devtools/front_end/ui/SortableDataGrid.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/DataGrid.js
diff --git a/Source/devtools/front_end/ui/DataGrid.js b/Source/devtools/front_end/ui/DataGrid.js
index dd46bfb639ff6ec128565a944be0ce3d6a5d84a2..6c1a8e935e7e3afef903a5b52915bc0ecb98013a 100644
--- a/Source/devtools/front_end/ui/DataGrid.js
+++ b/Source/devtools/front_end/ui/DataGrid.js
@@ -1144,9 +1144,18 @@ WebInspector.DataGridNode.prototype = {
*/
element: function()
{
- if (this._element)
- return this._element;
+ if (!this._element) {
+ this.createElement();
+ this.createCells();
+ }
+ return /** @type {!Element} */ (this._element);
+ },
+ /**
+ * @protected
+ */
+ createElement: function()
+ {
this._element = document.createElement("tr");
this._element._dataGridNode = this;
@@ -1158,10 +1167,6 @@ WebInspector.DataGridNode.prototype = {
this._element.classList.add("selected");
if (this.revealed)
this._element.classList.add("revealed");
-
- this.createCells();
-
- return this._element;
},
/**
« no previous file with comments | « Source/devtools/front_end/network/NetworkPanel.js ('k') | Source/devtools/front_end/ui/SortableDataGrid.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698