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

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

Issue 2716993002: [Devtools] Change logic of DataGrid's padding-left for grouping (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | third_party/WebKit/Source/devtools/front_end/data_grid/ViewportDataGrid.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a71306fabcba2d4dd22a26454c11bdc58d53fb0e..a28510fc1b5f53a4d1d1201ab13d73804dffd299 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
@@ -1264,6 +1264,8 @@ DataGrid.DataGridNode = class extends Common.Object {
this.nextSibling = null;
/** @type {number} */
this.disclosureToggleWidth = 10;
+ /** @type {?Element} */
+ this._disclosureCell = null;
/** @type {boolean} */
this.selectable = true;
@@ -1284,6 +1286,13 @@ DataGrid.DataGridNode = class extends Common.Object {
}
/**
+ * @return {?Element}
+ */
+ disclosureCell() {
+ return this._disclosureCell;
+ }
+
+ /**
* @protected
* @return {!Element}
*/
@@ -1570,9 +1579,8 @@ DataGrid.DataGridNode = class extends Common.Object {
cell.classList.add(alignment);
if (columnId === this.dataGrid.disclosureColumnId) {
+ this._disclosureCell = cell;
cell.classList.add('disclosure');
- if (this.leftPadding)
- cell.style.setProperty('padding-left', this.leftPadding + 'px');
}
return cell;
@@ -1937,6 +1945,10 @@ DataGrid.DataGridNode = class extends Common.Object {
if (!this.dataGrid || this._attached)
return;
+ var leftPadding = this.leftPadding;
+ if (leftPadding && this._disclosureCell)
+ this._disclosureCell.style.setProperty('padding-left', leftPadding + 'px');
+
this._attached = true;
var previousNode = this.traversePreviousNode(true, true);
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/data_grid/ViewportDataGrid.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698