author | Michael Ratcliffe <mratcliffe@mozilla.com> |
Mon, 26 Feb 2018 17:15:36 +0000 | |
changeset 405705 | c518398e5fd10943d41ac660ba05c978d52edfd1 |
parent 405704 | 7ce5b596279883bb34d36a48b6dcd95cb51c7318 |
child 405706 | 283b2a4cb2196dde012ee0cfdc9b6577d2333a11 |
push id | 33530 |
push user | csabou@mozilla.com |
push date | Wed, 28 Feb 2018 21:47:36 +0000 |
treeherder | mozilla-central@b3c95e78fd75 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | nchevobbe |
bugs | 1441218, 1441147 |
milestone | 60.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/devtools/client/inspector/fonts/fonts.js +++ b/devtools/client/inspector/fonts/fonts.js @@ -33,21 +33,16 @@ class FontInspector { this.onNewNode = this.onNewNode.bind(this); this.onPreviewFonts = this.onPreviewFonts.bind(this); this.onThemeChanged = this.onThemeChanged.bind(this); this.init(); } - componentWillMount() { - this.store.dispatch(updatePreviewText("")); - this.update(false, ""); - } - init() { if (!this.inspector) { return; } let fontsApp = FontsApp({ onPreviewFonts: this.onPreviewFonts, }); @@ -62,16 +57,19 @@ class FontInspector { // Expose the provider to let inspector.js use it in setupSidebar. this.provider = provider; this.inspector.selection.on("new-node-front", this.onNewNode); this.inspector.sidebar.on("fontinspector-selected", this.onNewNode); // Listen for theme changes as the color of the previews depend on the theme gDevTools.on("theme-switched", this.onThemeChanged); + + this.store.dispatch(updatePreviewText("")); + this.update(false, ""); } /** * Given all fonts on the page, and given the fonts used in given node, return all fonts * not from the page not used in this node. * * @param {Array} allFonts * All fonts used on the entire page