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

Side by Side Diff: chrome/browser/resources/ntp4/new_tab.js

Issue 7674001: [ntp4] Prevent the page switcher from overlapping the bookmarks-page title header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview New tab page 6 * @fileoverview New tab page
7 * This is the main code for the new tab page used by touch-enabled Chrome 7 * This is the main code for the new tab page used by touch-enabled Chrome
8 * browsers. For now this is still a prototype. 8 * browsers. For now this is still a prototype.
9 */ 9 */
10 10
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 546
547 var pageSwitcherLeft = isRTL() ? pageSwitcherEnd : pageSwitcherStart; 547 var pageSwitcherLeft = isRTL() ? pageSwitcherEnd : pageSwitcherStart;
548 var pageSwitcherRight = isRTL() ? pageSwitcherStart : pageSwitcherEnd; 548 var pageSwitcherRight = isRTL() ? pageSwitcherStart : pageSwitcherEnd;
549 var scrollbarWidth = page.scrollbarWidth; 549 var scrollbarWidth = page.scrollbarWidth;
550 pageSwitcherLeft.style.width = 550 pageSwitcherLeft.style.width =
551 (page.sideMargin + 13) + 'px'; 551 (page.sideMargin + 13) + 'px';
552 pageSwitcherLeft.style.left = '0'; 552 pageSwitcherLeft.style.left = '0';
553 pageSwitcherRight.style.width = 553 pageSwitcherRight.style.width =
554 (page.sideMargin - scrollbarWidth + 13) + 'px'; 554 (page.sideMargin - scrollbarWidth + 13) + 'px';
555 pageSwitcherRight.style.right = scrollbarWidth + 'px'; 555 pageSwitcherRight.style.right = scrollbarWidth + 'px';
556 pageSwitcherLeft.style.top = pageSwitcherRight.style.top =
Evan Stade 2011/08/18 00:40:01 I'm not sure but I think that this will force a re
csilv 2011/08/18 18:10:36 Re-worked, PTAL.
557 pageSwitcherLeft.style.paddingBottom =
558 pageSwitcherRight.style.paddingBottom =
559 page.querySelector('.tile-page-content').offsetTop + 'px';
556 } 560 }
557 561
558 /** 562 /**
559 * Returns the index of the given page. 563 * Returns the index of the given page.
560 * @param {AppsPage} page The AppsPage for we wish to find. 564 * @param {AppsPage} page The AppsPage for we wish to find.
561 * @return {number} The index of |page|, or -1 if it is not here. 565 * @return {number} The index of |page|, or -1 if it is not here.
562 */ 566 */
563 function getAppsPageIndex(page) { 567 function getAppsPageIndex(page) {
564 return Array.prototype.indexOf.call(appsPages, page); 568 return Array.prototype.indexOf.call(appsPages, page);
565 } 569 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 // TODO(estade): update the content handlers to use ntp namespace instead of 742 // TODO(estade): update the content handlers to use ntp namespace instead of
739 // making these global. 743 // making these global.
740 var assert = ntp4.assert; 744 var assert = ntp4.assert;
741 var getAppsCallback = ntp4.getAppsCallback; 745 var getAppsCallback = ntp4.getAppsCallback;
742 var appsPrefChangeCallback = ntp4.appsPrefChangeCallback; 746 var appsPrefChangeCallback = ntp4.appsPrefChangeCallback;
743 var themeChanged = ntp4.themeChanged; 747 var themeChanged = ntp4.themeChanged;
744 var recentlyClosedTabs = ntp4.setRecentlyClosedTabs; 748 var recentlyClosedTabs = ntp4.setRecentlyClosedTabs;
745 var setMostVisitedPages = ntp4.setMostVisitedPages; 749 var setMostVisitedPages = ntp4.setMostVisitedPages;
746 750
747 document.addEventListener('DOMContentLoaded', ntp4.initialize); 751 document.addEventListener('DOMContentLoaded', ntp4.initialize);
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698