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

Unified Diff: chrome/browser/resources/ntp4/tile_page.js

Issue 8771060: ntp: adjust top padding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « chrome/browser/resources/ntp4/tile_page.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/tile_page.js
diff --git a/chrome/browser/resources/ntp4/tile_page.js b/chrome/browser/resources/ntp4/tile_page.js
index b5ab15d0da0b41a68dd75cc9b1a97e31b9056570..fb0b3ec86a7047f08ef185d07550ae831db4b0d2 100644
--- a/chrome/browser/resources/ntp4/tile_page.js
+++ b/chrome/browser/resources/ntp4/tile_page.js
@@ -897,9 +897,9 @@ cr.define('ntp4', function() {
(this.isCurrentDragTarget && !this.withinPageDrag_ ? 1 : 0);
var numRows = Math.ceil(numTiles / layout.numRowTiles);
var usedHeight = layout.rowHeight * numRows;
- // 100 matches the top padding of tile-page.
+ // 60 matches the top padding of tile-page (which acts as the minimum).
var newMargin = document.documentElement.clientHeight / 3 -
- usedHeight / 2 - 100 - this.content_.offsetTop;
Evan Stade 2011/12/07 00:12:04 I can't remember why I ever put offsetTop in here,
+ usedHeight / 3 - 60;
Dan Beam 2011/12/07 00:16:28 What do you think about instead of 60 doing this o
Evan Stade 2011/12/07 00:36:15 do not want
newMargin = Math.max(newMargin, 0);
// |newMargin| is the final margin we actually want to show. However,
« no previous file with comments | « chrome/browser/resources/ntp4/tile_page.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698