summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/local_ntp/most_visited_single.js
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-16 09:59:13 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-20 10:28:53 +0000
commit6c11fb357ec39bf087b8b632e2b1e375aef1b38b (patch)
treec8315530db18a8ee566521c39ab8a6af4f72bc03 /chromium/chrome/browser/resources/local_ntp/most_visited_single.js
parent3ffaed019d0772e59d6cdb2d0d32fe4834c31f72 (diff)
BASELINE: Update Chromium to 74.0.3729.159
Change-Id: I8d2497da544c275415aedd94dd25328d555de811 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/chrome/browser/resources/local_ntp/most_visited_single.js')
-rw-r--r--chromium/chrome/browser/resources/local_ntp/most_visited_single.js23
1 files changed, 7 insertions, 16 deletions
diff --git a/chromium/chrome/browser/resources/local_ntp/most_visited_single.js b/chromium/chrome/browser/resources/local_ntp/most_visited_single.js
index d4752fc1568..8dfe125e856 100644
--- a/chromium/chrome/browser/resources/local_ntp/most_visited_single.js
+++ b/chromium/chrome/browser/resources/local_ntp/most_visited_single.js
@@ -44,7 +44,8 @@ const IDS = {
const CLASSES = {
FAILED_FAVICON: 'failed-favicon', // Applied when the favicon fails to load.
REORDER: 'reorder', // Applied to the tile being moved while reordering.
- REORDERING: 'reordering', // Applied while we are reordering.
+ REORDERING: 'reordering', // Applied while we are reordering.
+ MAC_CHROMEOS: 'mac-chromeos', // Reduces font weight for MacOS and ChromeOS.
// Material Design classes.
MD_EMPTY_TILE: 'md-empty-tile',
MD_ICON_BACKGROUND: 'md-icon-background',
@@ -331,6 +332,7 @@ var handleCommand = function(data) {
*/
var showTiles = function(info) {
logEvent(LOG_TYPE.NTP_ALL_TILES_RECEIVED);
+ utils.setPlatformClass(document.body);
countLoad();
};
@@ -346,10 +348,11 @@ var updateTheme = function(info) {
document.documentElement.setAttribute('darkmode', info.isDarkMode);
// Reduce font weight on the default(white) background for Mac and CrOS.
- document.body.classList.toggle('mac-chromeos',
+ document.body.classList.toggle(
+ CLASSES.MAC_CHROMEOS,
!info.isThemeDark && !info.isUsingTheme &&
- (navigator.userAgent.indexOf('Mac') > -1 ||
- navigator.userAgent.indexOf('CrOS') > -1));
+ (navigator.userAgent.indexOf('Mac') > -1 ||
+ navigator.userAgent.indexOf('CrOS') > -1));
};
@@ -752,9 +755,6 @@ function renderMaterialDesignTile(data) {
let fallbackLetter = document.createElement('div');
fallbackLetter.className = CLASSES.MD_FALLBACK_LETTER;
fallbackLetter.textContent = data.title.charAt(0).toUpperCase();
- if (navigator.userAgent.indexOf('Windows') > -1) {
- fallbackLetter.style.fontWeight = 600;
- }
mdIcon.classList.add(CLASSES.FAILED_FAVICON);
fallbackBackground.appendChild(fallbackLetter);
@@ -784,10 +784,6 @@ function renderMaterialDesignTile(data) {
let mdTitleTextwrap = document.createElement('span');
mdTitleTextwrap.innerText = data.title;
mdTitle.style.direction = data.direction || 'ltr';
- // Windows font family fallback to Segoe
- if (navigator.userAgent.indexOf('Windows') > -1) {
- mdTitle.style.fontFamily = 'Segoe UI';
- }
mdTitleContainer.appendChild(mdTitle);
mdTileInner.appendChild(mdTitleContainer);
mdTile.appendChild(mdTileInner);
@@ -869,11 +865,6 @@ var init = function() {
html.dir = 'rtl';
}
- // Enable dark mode.
- if (queryArgs['enableDarkMode'] == '1') {
- document.documentElement.setAttribute('darkmode', true);
- }
-
// Enable custom links.
if (queryArgs['enableCustomLinks'] == '1') {
isCustomLinksEnabled = true;