mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
merge m-c to fx-team
This commit is contained in:
commit
c7fa6f36e0
@ -1029,7 +1029,7 @@ pref("devtools.debugger.chrome-enabled", false);
|
||||
pref("devtools.debugger.remote-host", "localhost");
|
||||
pref("devtools.debugger.remote-autoconnect", false);
|
||||
pref("devtools.debugger.remote-connection-retries", 3);
|
||||
pref("devtools.debugger.remote-timeout", 3000);
|
||||
pref("devtools.debugger.remote-timeout", 20000);
|
||||
|
||||
// The default Debugger UI settings
|
||||
pref("devtools.debugger.ui.height", 250);
|
||||
|
@ -11,7 +11,7 @@ const Cu = Components.utils;
|
||||
|
||||
const DBG_XUL = "chrome://browser/content/debugger.xul";
|
||||
const DBG_STRINGS_URI = "chrome://browser/locale/devtools/debugger.properties";
|
||||
const REMOTE_PROFILE_NAME = "_remote-debug";
|
||||
const CHROME_DEBUGGER_PROFILE_NAME = "_chrome-debugger-profile";
|
||||
const TAB_SWITCH_NOTIFICATION = "debugger-tab-switch";
|
||||
|
||||
Cu.import("resource://gre/modules/devtools/dbg-server.jsm");
|
||||
@ -489,9 +489,9 @@ ChromeDebuggerProcess.prototype = {
|
||||
|
||||
let dbgProfileName;
|
||||
try {
|
||||
dbgProfileName = profileService.selectedProfile.name + REMOTE_PROFILE_NAME;
|
||||
dbgProfileName = profileService.selectedProfile.name + CHROME_DEBUGGER_PROFILE_NAME;
|
||||
} catch(e) {
|
||||
dbgProfileName = REMOTE_PROFILE_NAME;
|
||||
dbgProfileName = CHROME_DEBUGGER_PROFILE_NAME;
|
||||
Cu.reportError(e);
|
||||
}
|
||||
|
||||
|
@ -1353,6 +1353,16 @@ SourceScripts.prototype = {
|
||||
_onLoadSourceFinished:
|
||||
function SS__onLoadSourceFinished(aScriptUrl, aSourceText, aContentType, aOptions) {
|
||||
let element = DebuggerView.Scripts.getScriptByLocation(aScriptUrl);
|
||||
|
||||
// Tab navigated before we got a chance to finish loading and displaying
|
||||
// the source. The outcome is that the expected url is not present anymore
|
||||
// in the scripts container, hence the original script object coming from
|
||||
// the active thread no longer exists. There's really nothing that needs
|
||||
// to be done in this case, nor something that can be currently avoided.
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
|
||||
let script = element.getUserData("sourceScript");
|
||||
|
||||
script.loaded = true;
|
||||
|
@ -83,8 +83,7 @@
|
||||
tabindex="0"/>
|
||||
</hbox>
|
||||
<menulist id="scripts" class="devtools-menulist"
|
||||
sizetopopup="always"
|
||||
label="&debuggerUI.emptyScriptText;"/>
|
||||
sizetopopup="always"/>
|
||||
<textbox id="scripts-search" type="search"
|
||||
class="devtools-searchinput"/>
|
||||
<checkbox id="pause-exceptions"
|
||||
|
@ -7,7 +7,9 @@
|
||||
|
||||
var gWindow = null;
|
||||
var gTab = null;
|
||||
var gRemoteHost = null;
|
||||
var gRemotePort = null;
|
||||
var gRemoteTimeout = null;
|
||||
var gAutoConnect = null;
|
||||
|
||||
const TEST_URL = EXAMPLE_URL + "browser_dbg_iframes.html";
|
||||
@ -18,8 +20,12 @@ function test() {
|
||||
gWindow = aWindow;
|
||||
let gDebugger = gWindow.contentWindow;
|
||||
|
||||
info("Current remote host: " +
|
||||
Services.prefs.getCharPref("devtools.debugger.remote-host"));
|
||||
info("Current remote port: " +
|
||||
Services.prefs.getIntPref("devtools.debugger.remote-port"));
|
||||
info("Current remote timeout: " +
|
||||
Services.prefs.getIntPref("devtools.debugger.remote-timeout"));
|
||||
info("Current autoconnect flag: " +
|
||||
Services.prefs.getBoolPref("devtools.debugger.remote-autoconnect"));
|
||||
|
||||
@ -66,18 +72,22 @@ function test() {
|
||||
}
|
||||
DebuggerServer.closeListener();
|
||||
|
||||
gRemoteHost = Services.prefs.getCharPref("devtools.debugger.remote-host");
|
||||
gRemotePort = Services.prefs.getIntPref("devtools.debugger.remote-port");
|
||||
gRemoteTimeout = Services.prefs.getIntPref("devtools.debugger.remote-timeout");
|
||||
gAutoConnect = Services.prefs.getBoolPref("devtools.debugger.remote-autoconnect");
|
||||
|
||||
// Open the listener at some point in the future to test automatic reconnect.
|
||||
openListener(gRemotePort + 1);
|
||||
openListener(gRemoteHost, gRemotePort + 1, gRemoteTimeout / 10);
|
||||
});
|
||||
}
|
||||
|
||||
let attempts = 0;
|
||||
|
||||
function openListener(port) {
|
||||
function openListener(host, port, timeout) {
|
||||
Services.prefs.setCharPref("devtools.debugger.remote-host", host);
|
||||
Services.prefs.setIntPref("devtools.debugger.remote-port", port);
|
||||
Services.prefs.setIntPref("devtools.debugger.remote-timeout", timeout);
|
||||
Services.prefs.setBoolPref("devtools.debugger.remote-autoconnect", true);
|
||||
|
||||
info("Attempting to open a new listener on port " + port);
|
||||
@ -101,11 +111,15 @@ function openListener(port) {
|
||||
}
|
||||
|
||||
registerCleanupFunction(function() {
|
||||
Services.prefs.setCharPref("devtools.debugger.remote-host", gRemoteHost);
|
||||
Services.prefs.setIntPref("devtools.debugger.remote-port", gRemotePort);
|
||||
Services.prefs.setIntPref("devtools.debugger.remote-timeout", gRemoteTimeout);
|
||||
Services.prefs.setBoolPref("devtools.debugger.remote-autoconnect", gAutoConnect);
|
||||
removeTab(gTab);
|
||||
gWindow = null;
|
||||
gTab = null;
|
||||
gRemoteHost = null;
|
||||
gRemotePort = null;
|
||||
gRemoteTimeout = null;
|
||||
gAutoConnect = null;
|
||||
});
|
||||
|
@ -99,7 +99,7 @@ MarkupView.prototype = {
|
||||
_onSelect: function MT__onSelect()
|
||||
{
|
||||
if (this._inspector.selection) {
|
||||
this.showNode(this._inspector.selection);
|
||||
this.showNode(this._inspector.selection, true);
|
||||
}
|
||||
this.selectNode(this._inspector.selection);
|
||||
},
|
||||
@ -254,7 +254,7 @@ MarkupView.prototype = {
|
||||
}
|
||||
|
||||
let node = aContainer.node;
|
||||
this.showNode(node);
|
||||
this.showNode(node, false);
|
||||
this.selectNode(node);
|
||||
|
||||
if (this._inspector._IUI.highlighter.isNodeHighlightable(node)) {
|
||||
@ -343,7 +343,7 @@ MarkupView.prototype = {
|
||||
* Make sure the given node's parents are expanded and the
|
||||
* node is scrolled on to screen.
|
||||
*/
|
||||
showNode: function MT_showNode(aNode)
|
||||
showNode: function MT_showNode(aNode, centered)
|
||||
{
|
||||
this.importNode(aNode);
|
||||
let walker = documentWalker(aNode);
|
||||
@ -351,7 +351,7 @@ MarkupView.prototype = {
|
||||
while (parent = walker.parentNode()) {
|
||||
this.expandNode(parent);
|
||||
}
|
||||
LayoutHelpers.scrollIntoViewIfNeeded(this._containers.get(aNode).editor.elt, false);
|
||||
LayoutHelpers.scrollIntoViewIfNeeded(this._containers.get(aNode).editor.elt, centered);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -9,6 +9,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<link rel="stylesheet" href="chrome://browser/content/devtools/markup-view.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="chrome://browser/skin/devtools/markup-view.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="chrome://browser/skin/devtools/common.css" type="text/css"/>
|
||||
</head>
|
||||
<body role="application">
|
||||
<div id="root"></div>
|
||||
@ -17,19 +18,19 @@
|
||||
<li id="template-container" save="${elt}" class="container"><span save="${expander}" class="expander"></span><span save="${codeBox}" class="codebox"><ul save="${children}" class="children"></ul></span></li>
|
||||
</ul>
|
||||
|
||||
<span id="template-element" save="${elt}" class="editor"><span><</span><span save="${tag}" class="tagname"></span><span save="${attrList}"></span><span save="${newAttr}" class="newattr" tabindex="0"></span>></span>
|
||||
<span id="template-element" save="${elt}" class="editor"><span><</span><span save="${tag}" class="tagname devtools-theme-tagname"></span><span save="${attrList}"></span><span save="${newAttr}" class="newattr" tabindex="0"></span>></span>
|
||||
|
||||
<span id="template-attribute" save="${attr}" data-attr="${attrName}" class="attreditor" style="display:none"> <span class="editable" save="${inner}" tabindex="0"><span save="${name}" class="attrname"></span>="<span save="${val}" class="attrvalue"></span>"</span></span>
|
||||
<span id="template-attribute" save="${attr}" data-attr="${attrName}" class="attreditor" style="display:none"> <span class="editable" save="${inner}" tabindex="0"><span save="${name}" class="attrname devtools-theme-attrname"></span>="<span save="${val}" class="attrvalue devtools-theme-attrvalue"></span>"</span></span>
|
||||
|
||||
<span id="template-text" save="${elt}" class="editor">
|
||||
<span id="template-text" save="${elt}" class="editor text">
|
||||
<pre save="${value}" style="display:inline-block;" tabindex="0"></pre>
|
||||
</span>
|
||||
|
||||
<span id="template-comment" save="${elt}" class="editor comment">
|
||||
<span id="template-comment" save="${elt}" class="editor comment devtools-theme-comment">
|
||||
<span><!--</span><pre save="${value}" style="display:inline-block;" tabindex="0"></pre><span>--></span>
|
||||
</span>
|
||||
|
||||
<span id="template-elementClose" save="${closeElt}"></<span save="${closeTag}" class="tagname"></span>></span>
|
||||
<span id="template-elementClose" save="${closeElt}"></<span save="${closeTag}" class="tagname devtools-theme-tagname"></span>></span>
|
||||
</div>
|
||||
<div id="previewbar" class="disabled">
|
||||
<div id="preview"/>
|
||||
|
@ -35,24 +35,6 @@
|
||||
- checkbox that toggles pausing on exceptions. -->
|
||||
<!ENTITY debuggerUI.pauseExceptions "Pause on exceptions">
|
||||
|
||||
<!-- LOCALIZATION NOTE (debuggerUI.stackTitle): This is the label for the
|
||||
- widget that displays the call stack frames in the debugger. -->
|
||||
<!ENTITY debuggerUI.stackTitle "Call stack">
|
||||
|
||||
<!-- LOCALIZATION NOTE (debuggerUI.scriptTitle): This is the label for the
|
||||
- widget that displays the source code for the script that is currently
|
||||
- being inspected in the debugger. -->
|
||||
<!ENTITY debuggerUI.scriptTitle "Script">
|
||||
|
||||
<!-- LOCALIZATION NOTE (debuggerUI.propertiesTitle): This is the label for the
|
||||
- widget that displays the variables in the various available scopes in the
|
||||
- debugger. -->
|
||||
<!ENTITY debuggerUI.propertiesTitle "Scope variables">
|
||||
|
||||
<!-- LOCALIZATION NOTE (debuggerUI.searchPanelTitle): This is the text that
|
||||
- appears in the filter panel popup as a description. -->
|
||||
<!ENTITY debuggerUI.searchPanelTitle "Operators">
|
||||
|
||||
<!-- LOCALIZATION NOTE (emptyScriptText): The text to display in the menulist when
|
||||
- there are no scripts. -->
|
||||
<!ENTITY debuggerUI.emptyScriptText "No scripts">
|
||||
|
@ -174,3 +174,33 @@
|
||||
-moz-margin-end: -3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Theme */
|
||||
|
||||
.devtools-theme-background {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.devtools-theme-comment {
|
||||
color: hsl(90,2%,46%); /* grey */
|
||||
}
|
||||
|
||||
.devtools-theme-keyword {
|
||||
color: hsl(276,44%,45%); /* purple */
|
||||
}
|
||||
|
||||
.devtools-theme-string {
|
||||
color: hsl(72,100%,27%); /* green */
|
||||
}
|
||||
|
||||
.devtools-theme-tagname {
|
||||
color: hsl(208,81%,21%); /* dark blue */
|
||||
}
|
||||
|
||||
.devtools-theme-attrname {
|
||||
color: hsl(208,56%,40%); /* blue */
|
||||
}
|
||||
|
||||
.devtools-theme-attrvalue {
|
||||
color: hsl(24,85%,39%); /* orange */
|
||||
}
|
||||
|
@ -144,7 +144,7 @@
|
||||
}
|
||||
|
||||
.ruleview-rule-source {
|
||||
color: hsl(121,42%,43%); /* green */
|
||||
color: hsl(90,2%,46%); /* grey */
|
||||
-moz-padding-start: 5px;
|
||||
cursor: pointer;
|
||||
text-align: right;
|
||||
@ -231,7 +231,7 @@
|
||||
|
||||
.ruleview-propertyname {
|
||||
padding: 1px 0;
|
||||
color: hsl(210,100%,38%); /* blue */
|
||||
color: hsl(276,44%,45%); /* purple */
|
||||
}
|
||||
|
||||
.ruleview-propertyvalue {
|
||||
|
@ -9,32 +9,19 @@
|
||||
|
||||
body {
|
||||
font: message-box;
|
||||
background-color: #131c26;
|
||||
color: #8fa1b2;
|
||||
color: hsl(0,0%,50%);
|
||||
}
|
||||
|
||||
.tagname {
|
||||
color: #a673bf;
|
||||
}
|
||||
|
||||
.attrname {
|
||||
color: #b26b47;
|
||||
}
|
||||
|
||||
.attrvalue {
|
||||
color: #3689b2;
|
||||
.text {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.newattr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.comment {
|
||||
color: #5c6773;
|
||||
}
|
||||
|
||||
.selected {
|
||||
background-color: #253847;
|
||||
background-color: hsl(0,0%,90%);
|
||||
}
|
||||
|
||||
/* Give some padding to focusable elements to match the editor input
|
||||
|
@ -3,24 +3,24 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
.viewContainer {
|
||||
background: #cddae5; /* This will be seen as the continuation of the ruler */
|
||||
background: hsl(0,0%,89%); /* This will be seen as the continuation of the ruler */
|
||||
font-family: monospace;
|
||||
font-size: inherit; /* inherit browser's default monospace font size */
|
||||
}
|
||||
|
||||
.view {
|
||||
color: black; /* Default text color */
|
||||
background: #f0f0ff; /* Background of the editor */
|
||||
background: white; /* Background of the editor */
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.readonly > .view {
|
||||
background: #f0f0ff;
|
||||
background: #fdfefd; /* super light green */
|
||||
}
|
||||
|
||||
.ruler {
|
||||
background: #cddae5;
|
||||
color: #7a8a99;
|
||||
background: hsl(0,0%,89%);
|
||||
color: hsl(0,0%,55%);
|
||||
}
|
||||
.ruler.annotations {
|
||||
width: 16px;
|
||||
@ -105,16 +105,10 @@
|
||||
outline: 1px solid grey;
|
||||
}
|
||||
|
||||
.token_singleline_comment {
|
||||
color: #45a946; /* green */
|
||||
}
|
||||
|
||||
.token_multiline_comment {
|
||||
color: #45a946; /* green */
|
||||
}
|
||||
|
||||
.token_doc_comment {
|
||||
color: #45a946; /* green */
|
||||
.token_singleline_comment,
|
||||
.token_multiline_comment,
|
||||
.token_doc_comment {
|
||||
color: hsl(90,2%,50%); /* grey */
|
||||
}
|
||||
|
||||
.token_doc_html_markup {
|
||||
@ -131,12 +125,12 @@
|
||||
}
|
||||
|
||||
.token_string {
|
||||
color: #1e66b1; /* blue */
|
||||
color: hsl(72,100%,27%); /* green */
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token_keyword {
|
||||
color: #dd0058; /* purple */
|
||||
color: hsl(276,44%,45%); /* purple */
|
||||
}
|
||||
|
||||
.token_space {
|
||||
@ -155,34 +149,33 @@
|
||||
|
||||
.line_caret,
|
||||
.annotationLine.currentLine { /* Current line */
|
||||
background: #dae2ee; /* lighter than the background */
|
||||
background: hsl(208, 93%, 94%);
|
||||
}
|
||||
|
||||
.readonly .line_caret,
|
||||
.readonly .annotationLine.currentLine {
|
||||
background: #cddae5; /* a bit darker than the background */
|
||||
background: hsl(208, 80%, 90%);
|
||||
}
|
||||
|
||||
/* Styling for html syntax highlighting */
|
||||
.entity-name-tag {
|
||||
color: #dd0058; /* purple */
|
||||
color: hsl(208,48%,40%); /* blue */
|
||||
}
|
||||
|
||||
.entity-other-attribute-name {
|
||||
color: #dd0058; /* purple */
|
||||
color: hsl(208,48%,40%); /* blue */
|
||||
}
|
||||
|
||||
.punctuation-definition-comment {
|
||||
color: #45a946; /* green */
|
||||
color: hsl(90,2%,50%); /* grey */
|
||||
}
|
||||
|
||||
.comment {
|
||||
color: #45a946; /* green */
|
||||
color: hsl(90,2%,50%); /* grey */
|
||||
}
|
||||
|
||||
.string-quoted {
|
||||
color: #1e66b1; /* blue */
|
||||
font-style: italic;
|
||||
color: hsl(24,85%,39%); /* orange */
|
||||
}
|
||||
|
||||
.invalid {
|
||||
|
@ -189,3 +189,33 @@
|
||||
-moz-margin-end: -3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Theme */
|
||||
|
||||
.devtools-theme-background {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.devtools-theme-comment {
|
||||
color: hsl(90,2%,46%); /* grey */
|
||||
}
|
||||
|
||||
.devtools-theme-keyword {
|
||||
color: hsl(276,44%,45%); /* purple */
|
||||
}
|
||||
|
||||
.devtools-theme-string {
|
||||
color: hsl(72,100%,27%); /* green */
|
||||
}
|
||||
|
||||
.devtools-theme-tagname {
|
||||
color: hsl(208,81%,21%); /* dark blue */
|
||||
}
|
||||
|
||||
.devtools-theme-attrname {
|
||||
color: hsl(208,56%,40%); /* blue */
|
||||
}
|
||||
|
||||
.devtools-theme-attrvalue {
|
||||
color: hsl(24,85%,39%); /* orange */
|
||||
}
|
||||
|
@ -146,7 +146,7 @@
|
||||
}
|
||||
|
||||
.ruleview-rule-source {
|
||||
color: hsl(121,42%,43%); /* green */
|
||||
color: hsl(90,2%,46%); /* grey */
|
||||
-moz-padding-start: 5px;
|
||||
cursor: pointer;
|
||||
text-align: right;
|
||||
@ -233,7 +233,7 @@
|
||||
|
||||
.ruleview-propertyname {
|
||||
padding: 1px 0;
|
||||
color: hsl(210,100%,38%); /* blue */
|
||||
color: hsl(276,44%,45%); /* purple */
|
||||
}
|
||||
|
||||
.ruleview-propertyvalue {
|
||||
|
@ -9,32 +9,19 @@
|
||||
|
||||
body {
|
||||
font: message-box;
|
||||
background-color: #131c26;
|
||||
color: #8fa1b2;
|
||||
color: hsl(0,0%,50%);
|
||||
}
|
||||
|
||||
.tagname {
|
||||
color: #a673bf;
|
||||
}
|
||||
|
||||
.attrname {
|
||||
color: #b26b47;
|
||||
}
|
||||
|
||||
.attrvalue {
|
||||
color: #3689b2;
|
||||
.text {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.newattr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.comment {
|
||||
color: #5c6773;
|
||||
}
|
||||
|
||||
.selected {
|
||||
background-color: #253847;
|
||||
background-color: hsl(0,0%,90%);
|
||||
}
|
||||
|
||||
/* Give some padding to focusable elements to match the editor input
|
||||
|
@ -3,24 +3,24 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
.viewContainer {
|
||||
background: #cddae5; /* This will be seen as the continuation of the ruler */
|
||||
background: hsl(0,0%,89%); /* This will be seen as the continuation of the ruler */
|
||||
font-family: monospace;
|
||||
font-size: inherit; /* inherit browser's default monospace font size */
|
||||
}
|
||||
|
||||
.view {
|
||||
color: black; /* Default text color */
|
||||
background: #f0f0ff; /* Background of the editor */
|
||||
background: white; /* Background of the editor */
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.readonly > .view {
|
||||
background: #f0f0ff;
|
||||
background: #fdfefd; /* super light green */
|
||||
}
|
||||
|
||||
.ruler {
|
||||
background: #cddae5;
|
||||
color: #7a8a99;
|
||||
background: hsl(0,0%,89%);
|
||||
color: hsl(0,0%,55%);
|
||||
}
|
||||
.ruler.annotations {
|
||||
width: 16px;
|
||||
@ -105,16 +105,10 @@
|
||||
outline: 1px solid grey;
|
||||
}
|
||||
|
||||
.token_singleline_comment {
|
||||
color: #45a946; /* green */
|
||||
}
|
||||
|
||||
.token_multiline_comment {
|
||||
color: #45a946; /* green */
|
||||
}
|
||||
|
||||
.token_doc_comment {
|
||||
color: #45a946; /* green */
|
||||
.token_singleline_comment,
|
||||
.token_multiline_comment,
|
||||
.token_doc_comment {
|
||||
color: hsl(90,2%,50%); /* grey */
|
||||
}
|
||||
|
||||
.token_doc_html_markup {
|
||||
@ -131,12 +125,12 @@
|
||||
}
|
||||
|
||||
.token_string {
|
||||
color: #1e66b1; /* blue */
|
||||
color: hsl(72,100%,27%); /* green */
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token_keyword {
|
||||
color: #dd0058; /* purple */
|
||||
color: hsl(276,44%,45%); /* purple */
|
||||
}
|
||||
|
||||
.token_space {
|
||||
@ -155,34 +149,33 @@
|
||||
|
||||
.line_caret,
|
||||
.annotationLine.currentLine { /* Current line */
|
||||
background: #dae2ee; /* lighter than the background */
|
||||
background: hsl(208, 93%, 94%);
|
||||
}
|
||||
|
||||
.readonly .line_caret,
|
||||
.readonly .annotationLine.currentLine {
|
||||
background: #cddae5; /* a bit darker than the background */
|
||||
background: hsl(208, 80%, 90%);
|
||||
}
|
||||
|
||||
/* Styling for html syntax highlighting */
|
||||
.entity-name-tag {
|
||||
color: #dd0058; /* purple */
|
||||
color: hsl(208,48%,40%); /* blue */
|
||||
}
|
||||
|
||||
.entity-other-attribute-name {
|
||||
color: #dd0058; /* purple */
|
||||
color: hsl(208,48%,40%); /* blue */
|
||||
}
|
||||
|
||||
.punctuation-definition-comment {
|
||||
color: #45a946; /* green */
|
||||
color: hsl(90,2%,50%); /* grey */
|
||||
}
|
||||
|
||||
.comment {
|
||||
color: #45a946; /* green */
|
||||
color: hsl(90,2%,50%); /* grey */
|
||||
}
|
||||
|
||||
.string-quoted {
|
||||
color: #1e66b1; /* blue */
|
||||
font-style: italic;
|
||||
color: hsl(24,85%,39%); /* orange */
|
||||
}
|
||||
|
||||
.invalid {
|
||||
|
@ -195,3 +195,33 @@
|
||||
-moz-margin-end: -3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Theme */
|
||||
|
||||
.devtools-theme-background {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.devtools-theme-comment {
|
||||
color: hsl(90,2%,46%); /* grey */
|
||||
}
|
||||
|
||||
.devtools-theme-keyword {
|
||||
color: hsl(276,44%,45%); /* purple */
|
||||
}
|
||||
|
||||
.devtools-theme-string {
|
||||
color: hsl(72,100%,27%); /* green */
|
||||
}
|
||||
|
||||
.devtools-theme-tagname {
|
||||
color: hsl(208,81%,21%); /* dark blue */
|
||||
}
|
||||
|
||||
.devtools-theme-attrname {
|
||||
color: hsl(208,56%,40%); /* blue */
|
||||
}
|
||||
|
||||
.devtools-theme-attrvalue {
|
||||
color: hsl(24,85%,39%); /* orange */
|
||||
}
|
||||
|
@ -146,7 +146,7 @@
|
||||
}
|
||||
|
||||
.ruleview-rule-source {
|
||||
color: hsl(121,42%,43%); /* green */
|
||||
color: hsl(90,2%,46%); /* grey */
|
||||
-moz-padding-start: 5px;
|
||||
cursor: pointer;
|
||||
text-align: right;
|
||||
@ -233,7 +233,7 @@
|
||||
|
||||
.ruleview-propertyname {
|
||||
padding: 1px 0;
|
||||
color: hsl(210,100%,38%); /* blue */
|
||||
color: hsl(276,44%,45%); /* purple */
|
||||
}
|
||||
|
||||
.ruleview-propertyvalue {
|
||||
|
@ -9,32 +9,19 @@
|
||||
|
||||
body {
|
||||
font: message-box;
|
||||
background-color: #131c26;
|
||||
color: #8fa1b2;
|
||||
color: hsl(0,0%,50%);
|
||||
}
|
||||
|
||||
.tagname {
|
||||
color: #a673bf;
|
||||
}
|
||||
|
||||
.attrname {
|
||||
color: #b26b47;
|
||||
}
|
||||
|
||||
.attrvalue {
|
||||
color: #3689b2;
|
||||
.text {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.newattr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.comment {
|
||||
color: #5c6773;
|
||||
}
|
||||
|
||||
.selected {
|
||||
background-color: #253847;
|
||||
background-color: hsl(0,0%,90%);
|
||||
}
|
||||
|
||||
/* Give some padding to focusable elements to match the editor input
|
||||
|
@ -3,24 +3,24 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
.viewContainer {
|
||||
background: #cddae5; /* This will be seen as the continuation of the ruler */
|
||||
background: hsl(0,0%,89%); /* This will be seen as the continuation of the ruler */
|
||||
font-family: monospace;
|
||||
font-size: inherit; /* inherit browser's default monospace font size */
|
||||
}
|
||||
|
||||
.view {
|
||||
color: black; /* Default text color */
|
||||
background: #f0f0ff; /* Background of the editor */
|
||||
background: white; /* Background of the editor */
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.readonly > .view {
|
||||
background: #f0f0ff;
|
||||
background: #fdfefd; /* super light green */
|
||||
}
|
||||
|
||||
.ruler {
|
||||
background: #cddae5;
|
||||
color: #7a8a99;
|
||||
background: hsl(0,0%,89%);
|
||||
color: hsl(0,0%,55%);
|
||||
}
|
||||
.ruler.annotations {
|
||||
width: 16px;
|
||||
@ -105,16 +105,10 @@
|
||||
outline: 1px solid grey;
|
||||
}
|
||||
|
||||
.token_singleline_comment {
|
||||
color: #45a946; /* green */
|
||||
}
|
||||
|
||||
.token_multiline_comment {
|
||||
color: #45a946; /* green */
|
||||
}
|
||||
|
||||
.token_doc_comment {
|
||||
color: #45a946; /* green */
|
||||
.token_singleline_comment,
|
||||
.token_multiline_comment,
|
||||
.token_doc_comment {
|
||||
color: hsl(90,2%,50%); /* grey */
|
||||
}
|
||||
|
||||
.token_doc_html_markup {
|
||||
@ -131,12 +125,12 @@
|
||||
}
|
||||
|
||||
.token_string {
|
||||
color: #1e66b1; /* blue */
|
||||
color: hsl(72,100%,27%); /* green */
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token_keyword {
|
||||
color: #dd0058; /* purple */
|
||||
color: hsl(276,44%,45%); /* purple */
|
||||
}
|
||||
|
||||
.token_space {
|
||||
@ -155,34 +149,33 @@
|
||||
|
||||
.line_caret,
|
||||
.annotationLine.currentLine { /* Current line */
|
||||
background: #dae2ee; /* lighter than the background */
|
||||
background: hsl(208, 93%, 94%);
|
||||
}
|
||||
|
||||
.readonly .line_caret,
|
||||
.readonly .annotationLine.currentLine {
|
||||
background: #cddae5; /* a bit darker than the background */
|
||||
background: hsl(208, 80%, 90%);
|
||||
}
|
||||
|
||||
/* Styling for html syntax highlighting */
|
||||
.entity-name-tag {
|
||||
color: #dd0058; /* purple */
|
||||
color: hsl(208,48%,40%); /* blue */
|
||||
}
|
||||
|
||||
.entity-other-attribute-name {
|
||||
color: #dd0058; /* purple */
|
||||
color: hsl(208,48%,40%); /* blue */
|
||||
}
|
||||
|
||||
.punctuation-definition-comment {
|
||||
color: #45a946; /* green */
|
||||
color: hsl(90,2%,50%); /* grey */
|
||||
}
|
||||
|
||||
.comment {
|
||||
color: #45a946; /* green */
|
||||
color: hsl(90,2%,50%); /* grey */
|
||||
}
|
||||
|
||||
.string-quoted {
|
||||
color: #1e66b1; /* blue */
|
||||
font-style: italic;
|
||||
color: hsl(24,85%,39%); /* orange */
|
||||
}
|
||||
|
||||
.invalid {
|
||||
|
@ -286,7 +286,9 @@ var Addons = {
|
||||
|
||||
// Also send a notification to match the behavior of desktop Firefox
|
||||
let id = aListItem.getAttribute("addonID");
|
||||
Services.obs.notifyObservers(document, "addon-options-displayed", id);
|
||||
Services.obs.notifyObservers(document,
|
||||
AddonManager.OPTIONS_NOTIFICATION_DISPLAYED,
|
||||
id);
|
||||
}
|
||||
} catch (e) {
|
||||
Cu.reportError(e)
|
||||
|
@ -155,7 +155,9 @@
|
||||
|
||||
// Also send a notification to match the behavior of desktop Firefox
|
||||
let id = this.id.substring(17); // length of |urn:mozilla:item:|
|
||||
Services.obs.notifyObservers(document, "addon-options-displayed", id);
|
||||
Services.obs.notifyObservers(document,
|
||||
AddonManager.OPTIONS_NOTIFICATION_DISPLAYED,
|
||||
id);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -2200,6 +2200,12 @@ var AddonManager = {
|
||||
// Options will be displayed in a new tab, if possible
|
||||
OPTIONS_TYPE_TAB: 3,
|
||||
|
||||
// Constants for displayed or hidden options notifications
|
||||
// Options notification will be displayed
|
||||
OPTIONS_NOTIFICATION_DISPLAYED: "addon-options-displayed",
|
||||
// Options notification will be hidden
|
||||
OPTIONS_NOTIFICATION_HIDDEN: "addon-options-hidden",
|
||||
|
||||
// Constants for getStartupChanges, addStartupChange and removeStartupChange
|
||||
// Add-ons that were detected as installed during startup. Doesn't include
|
||||
// add-ons that were pending installation the last time the application ran.
|
||||
|
@ -2729,7 +2729,7 @@ var gDetailView = {
|
||||
if (this._addon) {
|
||||
if (this._addon.optionsType == AddonManager.OPTIONS_TYPE_INLINE) {
|
||||
Services.obs.notifyObservers(document,
|
||||
"addon-options-hidden",
|
||||
AddonManager.OPTIONS_NOTIFICATION_HIDDEN,
|
||||
this._addon.id);
|
||||
}
|
||||
|
||||
@ -2907,14 +2907,18 @@ var gDetailView = {
|
||||
gDetailView.node.removeEventListener("ViewChanged", viewChangedEventListener, false);
|
||||
if (firstSetting)
|
||||
firstSetting.clientTop;
|
||||
Services.obs.notifyObservers(document, "addon-options-displayed", gDetailView._addon.id);
|
||||
Services.obs.notifyObservers(document,
|
||||
AddonManager.OPTIONS_NOTIFICATION_DISPLAYED,
|
||||
gDetailView._addon.id);
|
||||
if (aScrollToPreferences)
|
||||
gDetailView.scrollToPreferencesRows();
|
||||
}, false);
|
||||
} else {
|
||||
if (firstSetting)
|
||||
firstSetting.clientTop;
|
||||
Services.obs.notifyObservers(document, "addon-options-displayed", this._addon.id);
|
||||
Services.obs.notifyObservers(document,
|
||||
AddonManager.OPTIONS_NOTIFICATION_DISPLAYED,
|
||||
this._addon.id);
|
||||
if (aScrollToPreferences)
|
||||
gDetailView.scrollToPreferencesRows();
|
||||
}
|
||||
@ -2969,7 +2973,7 @@ var gDetailView = {
|
||||
if (!aNeedsRestart &&
|
||||
this._addon.optionsType == AddonManager.OPTIONS_TYPE_INLINE) {
|
||||
Services.obs.notifyObservers(document,
|
||||
"addon-options-hidden",
|
||||
AddonManager.OPTIONS_NOTIFICATION_HIDDEN,
|
||||
this._addon.id);
|
||||
}
|
||||
},
|
||||
|
@ -32,7 +32,7 @@ var observer = {
|
||||
is(this.lastHidden, null, "'addon-options-hidden' notification should not have fired");
|
||||
},
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
if (aTopic == "addon-options-displayed") {
|
||||
if (aTopic == AddonManager.OPTIONS_NOTIFICATION_DISPLAYED) {
|
||||
this.lastDisplayed = aData;
|
||||
// Test if the binding has applied before the observers are notified. We test the second setting here,
|
||||
// because the code operates on the first setting and we want to check it applies to all.
|
||||
@ -48,7 +48,7 @@ var observer = {
|
||||
this.callback = null;
|
||||
tempCallback();
|
||||
}
|
||||
} else if (aTopic == "addon-options-hidden") {
|
||||
} else if (aTopic == AddonManager.OPTIONS_NOTIFICATION_HIDDEN) {
|
||||
this.lastHidden = aData;
|
||||
}
|
||||
}
|
||||
@ -108,8 +108,12 @@ function test() {
|
||||
gManagerWindow = aWindow;
|
||||
gCategoryUtilities = new CategoryUtilities(gManagerWindow);
|
||||
|
||||
Services.obs.addObserver(observer, "addon-options-displayed", false);
|
||||
Services.obs.addObserver(observer, "addon-options-hidden", false);
|
||||
Services.obs.addObserver(observer,
|
||||
AddonManager.OPTIONS_NOTIFICATION_DISPLAYED,
|
||||
false);
|
||||
Services.obs.addObserver(observer,
|
||||
AddonManager.OPTIONS_NOTIFICATION_HIDDEN,
|
||||
false);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -117,7 +121,8 @@ function test() {
|
||||
}
|
||||
|
||||
function end_test() {
|
||||
Services.obs.removeObserver(observer, "addon-options-displayed");
|
||||
Services.obs.removeObserver(observer,
|
||||
AddonManager.OPTIONS_NOTIFICATION_DISPLAYED);
|
||||
|
||||
Services.prefs.clearUserPref("extensions.inlinesettings1.bool");
|
||||
Services.prefs.clearUserPref("extensions.inlinesettings1.boolint");
|
||||
@ -135,7 +140,8 @@ function end_test() {
|
||||
|
||||
close_manager(gManagerWindow, function() {
|
||||
observer.checkHidden("inlinesettings2@tests.mozilla.org");
|
||||
Services.obs.removeObserver(observer, "addon-options-hidden");
|
||||
Services.obs.removeObserver(observer,
|
||||
AddonManager.OPTIONS_NOTIFICATION_HIDDEN);
|
||||
|
||||
AddonManager.getAddonByID("inlinesettings1@tests.mozilla.org", function(aAddon) {
|
||||
aAddon.uninstall();
|
||||
|
Loading…
Reference in New Issue
Block a user