Chromium Code Reviews| Index: chrome/browser/resources/ntp4/tile_page.js |
| =================================================================== |
| --- chrome/browser/resources/ntp4/tile_page.js (revision 99605) |
| +++ chrome/browser/resources/ntp4/tile_page.js (working copy) |
| @@ -319,6 +319,12 @@ |
| // the tile page padding. |
| var MIN_WIDE_MARGIN = 18; |
| + // Extra space to allow at the bottom of a tilegrid when setting the |
| + // min-height property. This is a bit of a hack to allow pages to insert |
| + // small content at the bottom. |
| + // TODO(csilv): Remove the need for this. |
| + var TILE_GRID_EXTRA_PADDING = 40; |
|
Evan Stade
2011/09/05 01:59:20
can you do this as a function on TilePage which ch
csilv
2011/09/06 05:33:33
Done.
|
| + |
| /** |
| * Creates a new TilePage object. This object contains tiles and controls |
| * their layout. |
| @@ -486,6 +492,7 @@ |
| this.tileElements_[index]); |
| } |
| this.calculateLayoutValues_(); |
| + this.heightChanged_(); |
| this.positionTile_(index); |
| }, |
| @@ -755,7 +762,8 @@ |
| // a flex box, and the tile grid could be box-flex: 1, but this exposes a |
| // bug where repositioning tiles will cause the scroll position to reset. |
| this.tileGrid_.style.minHeight = (this.clientHeight - |
| - this.tileGrid_.offsetTop) + 'px'; |
| + this.tileGrid_.offsetTop - this.content_.offsetTop - |
| + TILE_GRID_EXTRA_PADDING) + 'px'; |
| }, |
| /** |