Bug 1001523 - New Tab grid does not provide enough padding below the grid [r=adw]

Calculate offsetHeight from parent containers that includes the margin/padding specified by the children.
This commit is contained in:
Ed Lee 2014-04-25 15:33:59 -07:00
parent 7aff2b1880
commit 4d3300ab80
2 changed files with 2 additions and 2 deletions

View File

@ -198,7 +198,7 @@ let gGrid = {
let availSpace = document.documentElement.clientHeight - this._cellMargin -
document.querySelector("#newtab-margin-undo-container").offsetHeight -
document.querySelector("#newtab-search-form").offsetHeight;
document.querySelector("#newtab-search-container").offsetHeight;
let visibleRows = Math.floor(availSpace / this._cellHeight);
this._node.style.height = this._computeHeight() + "px";
this._node.style.maxHeight = this._computeHeight(visibleRows) + "px";

View File

@ -28,6 +28,7 @@ input[type=button] {
#newtab-undo-container {
transition: opacity 100ms ease-out;
display: -moz-box;
margin-bottom: 26px; /* 32 - 6 search form top "padding" */
-moz-box-align: center;
-moz-box-pack: center;
}
@ -60,7 +61,6 @@ input[type=button] {
#newtab-margin-undo-container {
display: -moz-box;
-moz-box-pack: center;
margin-bottom: 26px; /* 32 - 6 search form top "padding" */
}
#newtab-horizontal-margin {