| Index: chrome/browser/resources/ntp4/bookmarks_page.js
|
| ===================================================================
|
| --- chrome/browser/resources/ntp4/bookmarks_page.js (revision 98872)
|
| +++ chrome/browser/resources/ntp4/bookmarks_page.js (working copy)
|
| @@ -59,11 +59,10 @@
|
| var faviconDiv = this.querySelector('.favicon');
|
| var faviconUrl;
|
| if (this.data.url) {
|
| - faviconUrl = 'chrome://favicon/size/32/' + this.data.url;
|
| + faviconUrl = 'chrome://favicon/size/16/' + this.data.url;
|
| chrome.send('getFaviconDominantColor',
|
| [faviconUrl, id, 'ntp4.setBookmarksFaviconDominantColor']);
|
| } else {
|
| - // TODO(csilv): We need a large (32px) icon for this URL.
|
| faviconUrl = 'chrome://theme/IDR_BOOKMARK_BAR_FOLDER';
|
| // TODO(csilv): Should we vary this color by platform?
|
| this.stripeColor = '#919191';
|
| @@ -89,8 +88,11 @@
|
| * animate.
|
| */
|
| setBounds: function(size, x, y) {
|
| - this.style.width = this.style.height = size + 'px';
|
| + this.style.width = size + 'px';
|
| + this.style.height = heightForWidth(size) + 'px';
|
| +
|
| this.style.left = x + 'px';
|
| + this.style.right = x + 'px';
|
| this.style.top = y + 'px';
|
| },
|
|
|
| @@ -173,6 +175,16 @@
|
| TilePage.initGridValues(bookmarksPageGridValues);
|
|
|
| /**
|
| + * Calculates the height for a bookmarks tile for a given width. The size
|
| + * is based on a desired size of 96x72 ratio.
|
| + * @return {number} The height.
|
| + */
|
| + function heightForWidth(width) {
|
| + // The 2s are for borders, the 31 is for the title.
|
| + return (width - 2) * 72 / 96 + 2 + 31;
|
| + }
|
| +
|
| + /**
|
| * Creates a new BookmarksPage object.
|
| * @constructor
|
| * @extends {TilePage}
|
| @@ -275,6 +287,9 @@
|
| return false;
|
| },
|
|
|
| + /** @inheritDoc */
|
| + heightForWidth: heightForWidth,
|
| +
|
| /**
|
| * Invoked before a batch import begins. We will ignore added/changed
|
| * notifications while the operation is in progress.
|
|
|