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

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

Issue 297893003: Devtools: DataGrid: do not render hidden columns. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests & nit Created 6 years, 7 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/ui/DataGrid.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/ShowMoreDataGridNode.js
diff --git a/Source/devtools/front_end/ui/ShowMoreDataGridNode.js b/Source/devtools/front_end/ui/ShowMoreDataGridNode.js
index ef8fb3bab5040a62a61c034ab1336a81134aca96..e8420fce60f4c7937a37a3e26da2e6c3abe55502 100644
--- a/Source/devtools/front_end/ui/ShowMoreDataGridNode.js
+++ b/Source/devtools/front_end/ui/ShowMoreDataGridNode.js
@@ -91,24 +91,30 @@ WebInspector.ShowMoreDataGridNode.prototype = {
this.showAll.textContent = WebInspector.UIString("Show all %d", totalSize);
},
+ /** override */
createCells: function()
{
- var cell = document.createElement("td");
- if (this.depth)
- cell.style.setProperty("padding-left", (this.depth * this.dataGrid.indentWidth) + "px");
- cell.appendChild(this.showNext);
- cell.appendChild(this.showAll);
- cell.appendChild(this.showLast);
- this._element.appendChild(cell);
-
- var columns = this.dataGrid.columns;
- var count = 0;
- for (var c in columns)
- ++count;
- while (--count > 0) {
- cell = document.createElement("td");
- this._element.appendChild(cell);
+ this._hasCells = false;
+ WebInspector.DataGridNode.prototype.createCells.call(this);
+ },
+
+ /**
+ * @override
+ * @param {string} columnIdentifier
+ * @return {!Element}
+ */
+ createCell: function(columnIdentifier)
+ {
+ var cell = this.createTD(columnIdentifier);
+ if (!this._hasCells) {
+ this._hasCells = true;
+ if (this.depth)
+ cell.style.setProperty("padding-left", (this.depth * this.dataGrid.indentWidth) + "px");
+ cell.appendChild(this.showNext);
+ cell.appendChild(this.showAll);
+ cell.appendChild(this.showLast);
}
+ return cell;
},
/**
« no previous file with comments | « Source/devtools/front_end/ui/DataGrid.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698