diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-29 02:12:01 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-29 02:12:01 +0000 |
commit | 74d2ad51c6509c0d25c5cb42545029338a15bb30 (patch) | |
tree | 4decfc0337a2a6d90304f346a164d88e8a90e800 /chrome | |
parent | cb9de21da25d440157b8e5c7f0482774226afe5c (diff) | |
download | chromium_src-74d2ad51c6509c0d25c5cb42545029338a15bb30.zip chromium_src-74d2ad51c6509c0d25c5cb42545029338a15bb30.tar.gz chromium_src-74d2ad51c6509c0d25c5cb42545029338a15bb30.tar.bz2 |
ntp - don't show scrollbar for apps-less apps pages
(i.e. apps pages that only have a [+])
BUG=none
TEST=manual
Review URL: http://codereview.chromium.org/9791046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/resources/ntp4/tile_page.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/resources/ntp4/tile_page.js b/chrome/browser/resources/ntp4/tile_page.js index 40a9398..7a79c0b 100644 --- a/chrome/browser/resources/ntp4/tile_page.js +++ b/chrome/browser/resources/ntp4/tile_page.js @@ -973,7 +973,9 @@ cr.define('ntp', function() { // be 1/3 down the page. var numTiles = this.tileCount + (this.isCurrentDragTarget && !this.withinPageDrag_ ? 1 : 0); - var numRows = Math.ceil(numTiles / layout.numRowTiles); + // Minimum of 1 row (this can come into play when there is an app install + // hint hiding the webstore tile, and there are no other tiles). + var numRows = Math.max(1, Math.ceil(numTiles / layout.numRowTiles)); var usedHeight = layout.rowHeight * numRows; // 60 matches the top padding of tile-page (which acts as the minimum). var newMargin = document.documentElement.clientHeight / 3 - |