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

Unified Diff: chrome/browser/resources/new_new_tab.js

Issue 3292003: De-suck the NTP a bit more: (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Fix unit test Created 10 years, 4 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 | « chrome/browser/resources/new_new_tab.html ('k') | chrome/browser/resources/ntp/apps.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/new_new_tab.js
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js
index f78083701f7ad74a8d0647f3c88afc1bf97c5a9c..89297c5c21b0a98b39015a4df73138bfe5d4f10c 100644
--- a/chrome/browser/resources/new_new_tab.js
+++ b/chrome/browser/resources/new_new_tab.js
@@ -6,6 +6,9 @@
// than this many items in the miniview.
var MAX_MINIVIEW_ITEMS = 15;
+// Extra spacing at the top of the layout.
+var LAYOUT_SPACING_TOP = 5;
+
var loading = true;
function updateSimpleSection(id, section) {
@@ -152,7 +155,7 @@ SectionLayoutInfo.getAll = function() {
function layoutSections() {
var sections = SectionLayoutInfo.getAll();
var expandedSection = null;
- var headerHeight = 0;
+ var headerHeight = LAYOUT_SPACING_TOP;
var footerHeight = 0;
// Calculate the height of the fixed elements above the expanded section. Also
@@ -204,7 +207,7 @@ function layoutSections() {
}
// Now position all the elements.
- var y = 0;
+ var y = LAYOUT_SPACING_TOP;
for (i = 0, section; section = sections[i]; i++) {
section.header.style.top = y + 'px';
y += section.header.offsetHeight;
@@ -737,7 +740,7 @@ $('main').addEventListener('click', function(e) {
}
p = p.parentNode;
- if (p.noexpand) {
+ if (p.hasAttribute('noexpand')) {
return;
}
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | chrome/browser/resources/ntp/apps.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698