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

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

Issue 429493002: DevTools: DataGrid: autosize filler when rows fit viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 | 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/DataGrid.js
diff --git a/Source/devtools/front_end/ui/DataGrid.js b/Source/devtools/front_end/ui/DataGrid.js
index cc73f45c27c1c03ccddd69207aa62104f6fda470..4859fba76be24bc45fc59e3ee542c5ef01c410af 100644
--- a/Source/devtools/front_end/ui/DataGrid.js
+++ b/Source/devtools/front_end/ui/DataGrid.js
@@ -84,7 +84,7 @@ WebInspector.DataGrid = function(columnsArray, editCallback, deleteCallback, ref
this._topFillerRow = document.createElementWithClass("tr", "filler");
/** @type {!Element} */
this._bottomFillerRow = document.createElementWithClass("tr", "filler");
- this._bottomFillerRow.style.height = "auto";
+ this.setVerticalPadding(0, 0);
/** @type {!Array.<!WebInspector.DataGrid.ColumnDescriptor>} */
this._columnsArray = columnsArray;
@@ -214,7 +214,10 @@ WebInspector.DataGrid.prototype = {
setVerticalPadding: function(top, bottom)
{
this._topFillerRow.style.height = top + "px";
- this._bottomFillerRow.style.height = bottom + "px";
+ if (top || bottom)
vsevik 2014/07/29 08:51:45 I think "if (bottom)" should be enough
eustas 2014/07/29 11:00:19 Acknowledged.
+ this._bottomFillerRow.style.height = bottom + "px";
+ else
+ this._bottomFillerRow.style.height = "auto";
vsevik 2014/07/29 08:52:17 Is it guaranteed that the bottom filler row will e
eustas 2014/07/29 11:00:19 Acknowledged.
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698