Bug 1256757 - Use common.css in JSON Viewer. r=jryans
authorJan Odvarko <odvarko@gmail.com>
Fri, 18 Mar 2016 15:58:59 +0100
changeset 289597 f450e16672e4abfa30e9b9f9b764d8d9ca7f7bcc
parent 289596 3ddb1c19d1003e3eccc9f82f4664349e8d6b1213
child 289598 3ce5d23d337f45ae96100c00ab994b53d202d7c4
push id30107
push usercbook@mozilla.com
push dateTue, 22 Mar 2016 10:00:23 +0000
treeherdermozilla-central@3587b25bae30 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1256757
milestone48.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
Bug 1256757 - Use common.css in JSON Viewer. r=jryans
devtools/client/jsonview/converter-child.js
devtools/client/jsonview/css/main.css
devtools/client/themes/moz.build
--- a/devtools/client/jsonview/converter-child.js
+++ b/devtools/client/jsonview/converter-child.js
@@ -204,23 +204,26 @@ let Converter = Class({
       .replace(/>/g, "&gt;") : "";
   },
 
   toHTML: function(json, headers, title) {
     let themeClassName = "theme-" + JsonViewUtils.getCurrentTheme();
     let clientBaseUrl = "resource://devtools/client/";
     let baseUrl = clientBaseUrl + "jsonview/";
     let themeVarsUrl = clientBaseUrl + "themes/variables.css";
+    let commonUrl = clientBaseUrl + "themes/common.css";
 
     return "<!DOCTYPE html>\n" +
       "<html class=\"" + themeClassName + "\">" +
       "<head><title>" + this.htmlEncode(title) + "</title>" +
       "<base href=\"" + this.htmlEncode(baseUrl) + "\">" +
       "<link rel=\"stylesheet\" type=\"text/css\" href=\"" +
         themeVarsUrl + "\">" +
+      "<link rel=\"stylesheet\" type=\"text/css\" href=\"" +
+        commonUrl + "\">" +
       "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\">" +
       "<script data-main=\"viewer-config\" src=\"lib/require.js\"></script>" +
       "</head><body>" +
       "<div id=\"content\"></div>" +
       "<div id=\"json\">" + this.htmlEncode(json) + "</div>" +
       "<div id=\"headers\">" + this.htmlEncode(headers) + "</div>" +
       "</body></html>";
   },
--- a/devtools/client/jsonview/css/main.css
+++ b/devtools/client/jsonview/css/main.css
@@ -16,17 +16,17 @@
 
 
 /******************************************************************************/
 /* Panel Content */
 
 .panelContent {
   overflow-y: auto;
   font-size: 11px;
-  font-family: monospace;
+  font-family: var(--monospace-font-family);
 }
 
 /* The tree takes the entire horizontal space within the panel content. */
 .panelContent .treeTable {
   width: 100%;
 }
 
 /* Make sure there is a little space between label and value columns. */
--- a/devtools/client/themes/moz.build
+++ b/devtools/client/themes/moz.build
@@ -1,9 +1,10 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DevToolsModules(
+    'common.css',
     'variables.css',
 )