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

Side by Side Diff: chrome/browser/resources/md_downloads/downloads.js

Issue 2361973002: MD Downloads: preload bold Roboto in a better way (Closed)
Patch Set: !chromeos Created 4 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 window.addEventListener('load', downloads.Manager.onLoad); 5 window.addEventListener('load', function() {
6 downloads.Manager.onLoad();
7
8 if (!cr.isChromeOS) {
9 // TODO(dbeam): this is copied out of roboto.css. I excluded roboto.css from
10 // vulcanize.py and tried to re-use the "src:" rule from the file via
11 // querySelector(href$=roboto.css).sheet.rules[2].style.src, but alas .rules
12 // can't be accessed because the origins don't match (chrome://resources vs
13 // chrome://downloads). So it's duplicated.
14 new FontFace('Roboto', "local('Roboto Bold'), local('Roboto-Bold'), " +
15 "url(chrome://resources/roboto/roboto-bold.woff2) format('woff2')",
16 {weight: 'bold'}).load();
17 }
18 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/downloads.html ('k') | chrome/browser/resources/md_downloads/vulcanized.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698