зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1132203 - Fixing theme and intermittent test failure; r=jryans
--HG-- extra : rebase_source : 6c00287d9acf958270b0abfcc53ba5a57b35b654
This commit is contained in:
Родитель
1a8cc9ec95
Коммит
64a0ec014f
|
@ -50,7 +50,7 @@ var HeadersToolbar = React.createFactory(React.createClass({
|
|||
render: function() {
|
||||
return (
|
||||
Toolbar({},
|
||||
ToolbarButton({className: "copy", onClick: this.onCopy},
|
||||
ToolbarButton({className: "btn copy", onClick: this.onCopy},
|
||||
Locale.$STR("jsonViewer.Copy")
|
||||
)
|
||||
)
|
||||
|
|
|
@ -79,10 +79,10 @@ var JsonToolbar = React.createFactory(React.createClass({
|
|||
render: function() {
|
||||
return (
|
||||
Toolbar({},
|
||||
ToolbarButton({className: "save", onClick: this.onSave},
|
||||
ToolbarButton({className: "btn save", onClick: this.onSave},
|
||||
Locale.$STR("jsonViewer.Save")
|
||||
),
|
||||
ToolbarButton({className: "copy", onClick: this.onCopy},
|
||||
ToolbarButton({className: "btn copy", onClick: this.onCopy},
|
||||
Locale.$STR("jsonViewer.Copy")
|
||||
),
|
||||
SearchBox({
|
||||
|
|
|
@ -46,13 +46,13 @@ var TextToolbar = React.createFactory(React.createClass({
|
|||
render: function() {
|
||||
return (
|
||||
Toolbar({},
|
||||
ToolbarButton({className: "prettyprint",onClick: this.onPrettify},
|
||||
ToolbarButton({className: "btn prettyprint",onClick: this.onPrettify},
|
||||
Locale.$STR("jsonViewer.PrettyPrint")
|
||||
),
|
||||
ToolbarButton({className: "save", onClick: this.onSave},
|
||||
ToolbarButton({className: "btn save", onClick: this.onSave},
|
||||
Locale.$STR("jsonViewer.Save")
|
||||
),
|
||||
ToolbarButton({className: "copy", onClick: this.onCopy},
|
||||
ToolbarButton({className: "btn copy", onClick: this.onCopy},
|
||||
Locale.$STR("jsonViewer.Copy")
|
||||
)
|
||||
)
|
||||
|
|
|
@ -199,7 +199,7 @@ var Converter = Class({
|
|||
var baseUrl = "resource:///modules/devtools/client/jsonview/";
|
||||
var theme = (themeClassName == "theme-light") ? "light" : "dark";
|
||||
var themeUrl = '<link rel="stylesheet" type="text/css" ' +
|
||||
'href="chrome://devtools/skin/themes/' + theme + '-theme.css">';
|
||||
'href="css/' + theme + '-theme.css">';
|
||||
|
||||
return '<!DOCTYPE html>\n' +
|
||||
'<html><head><title>' + this.htmlEncode(title) + '</title>' +
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
/* 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/. */
|
||||
|
||||
/******************************************************************************/
|
||||
/* Dark Theme (copied from themes/dark-theme.css) */
|
||||
|
||||
:root {
|
||||
--theme-body-background: #14171a;
|
||||
|
||||
--theme-tab-toolbar-background: #252c33;
|
||||
--theme-toolbar-background: #343c45;
|
||||
--theme-selection-background: #1d4f73;
|
||||
--theme-splitter-color: black;
|
||||
--theme-selection-color: #f5f7fa;
|
||||
--theme-comment: #757873;
|
||||
|
||||
--theme-body-color: #8fa1b2;
|
||||
--theme-body-color-alt: #b6babf;
|
||||
--theme-content-color1: #a9bacb;
|
||||
|
||||
--theme-highlight-green: #70bf53;
|
||||
--theme-highlight-blue: #46afe3;
|
||||
--theme-highlight-orange: #d96629;
|
||||
--theme-highlight-bluegrey: #5e88b0;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
/* vim:set ts=2 sw=2 sts=2 et: */
|
||||
/* 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/. */
|
||||
|
||||
/******************************************************************************/
|
||||
/* Light Theme Constants (copied from themes/light-theme.css) */
|
||||
|
||||
:root {
|
||||
--theme-body-background: #fcfcfc;
|
||||
|
||||
--theme-tab-toolbar-background: #ebeced;
|
||||
--theme-toolbar-background: #f0f1f2;
|
||||
--theme-selection-background: #4c9ed9;
|
||||
--theme-splitter-color: #aaaaaa;
|
||||
--theme-selection-color: #f5f7fa;
|
||||
--theme-comment: #757873;
|
||||
|
||||
--theme-body-color: #18191a;
|
||||
--theme-body-color-alt: #585959;
|
||||
--theme-content-color1: #292e33;
|
||||
|
||||
--theme-highlight-green: #2cbb0f;
|
||||
--theme-highlight-blue: #0088cc;
|
||||
--theme-highlight-orange: #f13c00;
|
||||
--theme-highlight-bluegrey: #0072ab;
|
||||
}
|
|
@ -6,10 +6,12 @@
|
|||
|
||||
|
||||
DevToolsModules(
|
||||
'dark-theme.css',
|
||||
'dom-tree.css',
|
||||
'general.css',
|
||||
'headers-panel.css',
|
||||
'json-panel.css',
|
||||
'light-theme.css',
|
||||
'main.css',
|
||||
'read-only-prop.svg',
|
||||
'reps.css',
|
||||
|
|
|
@ -71,6 +71,12 @@ addMessageListener("Test:JsonView:WaitForFilter", function(msg) {
|
|||
let firstRow = content.document.querySelector(
|
||||
".jsonPanelBox .domTable .memberRow");
|
||||
|
||||
// Check if the filter is already set.
|
||||
if (firstRow.classList.contains("hidden")) {
|
||||
sendAsyncMessage(msg.name);
|
||||
return;
|
||||
}
|
||||
|
||||
// Wait till the first row has 'hidden' class set.
|
||||
var observer = new content.MutationObserver(function(mutations) {
|
||||
for (let i = 0; i < mutations.length; i++) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче