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

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

Issue 1753783004: NTP4: erase notification promo UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 1 more Created 4 years, 10 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/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 6cda72cff2e8f06fc991fcab4cab1b645f5ffa04..8a3cc3db65e193becacee21c1987b1be56db08a7 100644
--- a/chrome/browser/resources/ntp4/tile_page.js
+++ b/chrome/browser/resources/ntp4/tile_page.js
@@ -500,25 +500,6 @@ cr.define('ntp', function() {
},
/**
- * The notification content of this tile (if any, otherwise null).
- * @type {!HTMLElement}
- */
- get notification() {
- return this.topMargin_.nextElementSibling.id == 'notification-container' ?
- this.topMargin_.nextElementSibling : null;
- },
- /**
- * The notification content of this tile (if any, otherwise null).
- * @type {!HTMLElement}
- */
- set notification(node) {
- assert(node instanceof HTMLElement, '|node| isn\'t an HTMLElement!');
- // NOTE: Implicitly removes from DOM if |node| is inside it.
- this.content_.insertBefore(node, this.topMargin_.nextElementSibling);
- this.positionNotification_();
- },
-
- /**
* Fetches the size, in pixels, of the padding-top of the tile contents.
* @type {number}
*/
@@ -968,7 +949,6 @@ cr.define('ntp', function() {
this.classList.add('animating-tile-page');
this.heightChanged_();
- this.positionNotification_();
this.repositionTiles_();
},
@@ -1044,35 +1024,6 @@ cr.define('ntp', function() {
},
/**
- * Position the notification if there's one showing.
- */
- positionNotification_: function() {
- var notification = this.notification;
- if (!notification || notification.hidden)
- return;
-
- // Update the horizontal position.
- var animatedLeftMargin = this.getAnimatedLeftMargin_();
- notification.style.WebkitMarginStart = animatedLeftMargin + 'px';
- var leftOffset = (this.layoutValues_.leftMargin - animatedLeftMargin) *
- (isRTL() ? -1 : 1);
- notification.style.WebkitTransform = 'translateX(' + leftOffset + 'px)';
-
- // Update the allowable widths of the text.
- var buttonWidth = notification.querySelector('button').offsetWidth + 8;
- notification.querySelector('span').style.maxWidth =
- this.layoutValues_.gridWidth - buttonWidth + 'px';
-
- // This makes sure the text doesn't condense smaller than the narrow size
- // of the grid (e.g. when a user makes the window really small).
- notification.style.minWidth =
- this.gridValues_.narrowWidth - buttonWidth + 'px';
-
- // Update the top position.
- notification.style.marginTop = -notification.offsetHeight + 'px';
- },
-
- /**
* Handles final setup that can only happen after |this| is inserted into
* the page.
* @private
« 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