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

Unified Diff: chrome/browser/resources/settings/settings_ui/settings_ui.js

Issue 2385873002: MD Settings: preload Roboto bold to reduce flicker (Closed)
Patch Set: comment for dpapad@ Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/settings_ui/settings_ui.js
diff --git a/chrome/browser/resources/settings/settings_ui/settings_ui.js b/chrome/browser/resources/settings/settings_ui/settings_ui.js
index 52307933182e0026b5b1776e4d7fbef7f130da58..4150dc00a50c9b44883fbb8d78fde66d5a56a1a5 100644
--- a/chrome/browser/resources/settings/settings_ui/settings_ui.js
+++ b/chrome/browser/resources/settings/settings_ui/settings_ui.js
@@ -105,6 +105,12 @@ Polymer({
}
},
+ /** @override */
+ attached: function() {
+ // Preload bold Roboto so it doesn't load and flicker the first time used.
+ document.fonts.load('bold 12px Roboto');
+ },
+
/**
* @param {Event} event
* @private
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698