merge backout of bug 605621, a=#developers
authorRob Campbell <rcampbell@mozilla.com>
Wed, 19 Jan 2011 16:42:20 -0400
changeset 60878 f4db6f267ddec2944daf4613ac5ca088b0bed8fb
parent 60876 7756b033258fe3f3079dd8c416e63d3eb1afd0b1 (current diff)
parent 60877 def11b0e968cdc025ced5f61a4dec9f6b657c96e (diff)
child 60880 c729839a60342fd84db21877be5799845e49a25d
push idunknown
push userunknown
push dateunknown
bugs605621
milestone2.0b10pre
merge backout of bug 605621, a=#developers
--- a/toolkit/components/console/hudservice/HUDService.jsm
+++ b/toolkit/components/console/hudservice/HUDService.jsm
@@ -4887,16 +4887,20 @@ ConsoleUtils = {
   function ConsoleUtils_createMessageNode(aDocument, aCategory, aSeverity,
                                           aBody, aSourceURL, aSourceLine,
                                           aClipboardText) {
     if (aBody instanceof Ci.nsIDOMNode && aClipboardText == null) {
       throw new Error("HUDService.createMessageNode(): DOM node supplied " +
                       "without any clipboard text");
     }
 
+    // Make the marker (the colored part of the timeline).
+    let markerNode = aDocument.createElementNS(XUL_NS, "xul:vbox");
+    markerNode.classList.add("webconsole-marker");
+
     // Make the icon container, which is a vertical box. Its purpose is to
     // ensure that the icon stays anchored at the top of the message even for
     // long multi-line messages.
     let iconContainer = aDocument.createElementNS(XUL_NS, "xul:vbox");
     iconContainer.classList.add("webconsole-msg-icon-container");
 
     // Make the icon node. It's sprited and the actual region of the image is
     // determined by CSS rules.
@@ -4943,16 +4947,17 @@ ConsoleUtils = {
     let node = aDocument.createElementNS(XUL_NS, "xul:richlistitem");
     node.clipboardText = aClipboardText;
     node.classList.add("hud-msg-node");
 
     node.timestamp = timestamp;
     ConsoleUtils.setMessageType(node, aCategory, aSeverity);
 
     node.appendChild(timestampNode);
+    node.appendChild(markerNode);
     node.appendChild(iconContainer);
     node.appendChild(bodyNode);
     if (locationNode) {
       node.appendChild(locationNode);
     }
 
     return node;
   },
--- a/toolkit/themes/gnomestripe/global/webConsole.css
+++ b/toolkit/themes/gnomestripe/global/webConsole.css
@@ -55,72 +55,70 @@
   height: 100%;
 }
 
 .hud-console-wrapper {
   width: 100%;
   overflow: auto;
 }
 
-/* General output styles */
-
-.webconsole-timestamp {
-  color: GrayText;
-  margin-top: 0;
-  margin-bottom: 0;
-}
-
-.webconsole-msg-icon {
-  list-style-image: url(chrome://global/skin/icons/webconsole.png);
-  margin: 2px 3px;
-  width: 10px;
-  height: 10px;
-}
-
-.webconsole-msg-log > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  visibility: hidden;
+.hud-main-label {
+  font-size: 1em;
+  padding-top: 0.33em;
+  font-weight: bold;
 }
 
 .hud-clickable {
   cursor: pointer;
   text-decoration: underline;
 }
 
-.webconsole-msg-body {
-  margin-top: 0;
-  margin-bottom: 3px;
-  -moz-margin-start: 3px;
-  -moz-margin-end: 6px;
+.hud-network {
+  color: blue;
+}
+
+.hud-error {
+  color: red;
+}
+
+.hud-log {
+  color: black;
+}
+
+.hud-warn {
+  color: orange;
 }
 
-.webconsole-location {
-  margin-top: 0;
-  margin-bottom: 0;
-  -moz-margin-start: 0;
-  -moz-margin-end: 6px;
-  width: 10em;
-  text-align: end;
+.hud-info {
+  color: green;
+}
+
+.hud-exception {
+  color: red;
+  font-weight: bold;
 }
 
-.hud-msg-node[selected="true"] > .webconsole-timestamp,
-.hud-msg-node[selected="true"] > .webconsole-location {
-  color: inherit;
-}
-
-.hud-output-node,
-.jsterm-input-node,
-.jsterm-complete-node {
-  font: 12px "DejaVu Sans Mono", monospace;
+.hud-msg-node {
+  width: 100%;
+  margin-top: 0.3em;
+  margin-bottom: 0.3em;
+  padding-left: 1em;
+  -moz-user-select: text;
+  white-space: pre-wrap;
+  -moz-user-focus: normal;
 }
 
 .hud-output-node {
-  -moz-appearance: none;
-  border-bottom: 1px solid ThreeDShadow;
-  border-top: 1px solid ThreeDShadow;
-  margin: 0;
+  border-bottom: 1px solid #ddd;
+  border-top: 1px solid #ddd;
+  overflow-x: auto;
+  overflow: auto;
+  font: 1em monospace;
+  background-color: white;
+  width: 100%;
 }
 
 .hud-filtered-by-type,
 .hud-filtered-by-string {
   display: none;
 }
 
 .webconsole-clear-console-button > .toolbarbutton-icon {
@@ -128,91 +126,36 @@
 }
 
 .webconsole-filter-button > .toolbarbutton-menubutton-button,
 .webconsole-filter-button:not([type="menu-button"]) {
   -moz-box-orient: horizontal;
   list-style-image: url("chrome://global/skin/icons/webconsole.png");
 }
 
-/* Network styles */
+/* Network button */
 .webconsole-filter-button[category="net"] {
-  -moz-image-region: rect(0, 40px, 10px, 30px);
+  -moz-image-region: rect(0px, 40px, 10px, 30px);
 }
 
-.webconsole-msg-network > .webconsole-msg-icon-container {
-  -moz-border-start: solid #000 6px;
-}
-
-.webconsole-msg-network.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(0, 10px, 10px, 0);
-}
-
-/* CSS styles */
+/* CSS button */
 .webconsole-filter-button[category="css"] {
   -moz-image-region: rect(10px, 40px, 20px, 30px);
 }
 
-.webconsole-msg-cssparser > .webconsole-msg-icon-container {
-  -moz-border-start: solid #00b6f0 6px;
-}
-
-.webconsole-msg-cssparser.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(10px, 10px, 20px, 0);
-}
-
-.webconsole-msg-cssparser.webconsole-msg-warn > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(10px, 20px, 20px, 10px);
-}
-
-/* JS styles */
+/* JS button */
 .webconsole-filter-button[category="js"] {
   -moz-image-region: rect(20px, 40px, 30px, 30px);
 }
 
-.webconsole-msg-exception > .webconsole-msg-icon-container {
-  -moz-border-start: solid #fb9500 6px;
-}
-
-.webconsole-msg-exception.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(20px, 10px, 30px, 0);
-}
-
-.webconsole-msg-exception.webconsole-msg-warn > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(20px, 20px, 30px, 10px);
-}
-
-/* Web Developer styles */
+/* Web Developer button */
 .webconsole-filter-button[category="webdev"] {
   -moz-image-region: rect(30px, 40px, 40px, 30px);
 }
 
-.webconsole-msg-console > .webconsole-msg-icon-container {
-  -moz-border-start: solid #cbcbcb 6px;
-}
-
-.webconsole-msg-console.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon,
-.webconsole-msg-output.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(30px, 10px, 40px, 0);
-}
-
-.webconsole-msg-console.webconsole-msg-warn > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(30px, 20px, 40px, 10px);
-}
-
-.webconsole-msg-console.webconsole-msg-info > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(30px, 30px, 40px, 20px);
-}
-
-/* Input and output styles */
-.webconsole-msg-input > .webconsole-msg-icon-container,
-.webconsole-msg-output > .webconsole-msg-icon-container {
-  border-left: solid #808080 6px;
-}
-
 .webconsole-close-button {
   list-style-image: url("moz-icon://stock/gtk-close?size=menu");
 }
 
 /* JSTerm Styles */
 
 .jsterm-wrapper-node {
   font-family: monospace;
@@ -240,16 +183,18 @@
   width: 1px;
   position: relative;
   top: 92%;
   display: block;
 }
 
 .jsterm-input-node,
 .jsterm-complete-node {
+  font-family: monospace;
+  font-size: 9pt;
   border: none;
   padding: 0 0 0 16px;
   -moz-appearance: none;
 }
 
 .jsterm-input-node {
   width: 98%;
   background: url("chrome://global/skin/icons/commandline.png") 4px 3px no-repeat;
--- a/toolkit/themes/pinstripe/global/webConsole.css
+++ b/toolkit/themes/pinstripe/global/webConsole.css
@@ -58,72 +58,70 @@
   height: 100%;
 }
 
 .hud-console-wrapper {
   width: 100%;
   overflow: auto;
 }
 
-/* General output styles */
-
-.webconsole-timestamp {
-  color: GrayText;
-  margin-top: 0;
-  margin-bottom: 0;
-}
-
-.webconsole-msg-icon {
-  list-style-image: url(chrome://global/skin/icons/webconsole.png);
-  margin: 2px 3px;
-  width: 10px;
-  height: 10px;
-}
-
-.webconsole-msg-log > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  visibility: hidden;
+.hud-main-label {
+  font-size: 1em;
+  padding-top: 0.33em;
+  font-weight: bold;
 }
 
 .hud-clickable {
   cursor: pointer;
   text-decoration: underline;
 }
 
-.webconsole-msg-body {
-  margin-top: 0;
-  margin-bottom: 3px;
-  -moz-margin-start: 3px;
-  -moz-margin-end: 6px;
+.hud-network {
+  color: blue;
+}
+
+.hud-error {
+  color: red;
+}
+
+.hud-log {
+  color: black;
+}
+
+.hud-warn {
+  color: orange;
 }
 
-.webconsole-location {
-  margin-top: 0;
-  margin-bottom: 0;
-  -moz-margin-start: 0;
-  -moz-margin-end: 6px;
-  width: 10em;
-  text-align: end;
+.hud-info {
+  color: green;
+}
+
+.hud-exception {
+  color: red;
+  font-weight: bold;
 }
 
-.hud-msg-node[selected="true"] > .webconsole-timestamp,
-.hud-msg-node[selected="true"] > .webconsole-location {
-  color: inherit;
-}
-
-.hud-output-node,
-.jsterm-input-node,
-.jsterm-complete-node {
-  font: 11px Menlo, Monaco, monospace;
+.hud-msg-node {
+  width: 100%;
+  margin-top: 0.3em;
+  margin-bottom: 0.3em;
+  padding-left: 1em;
+  -moz-user-select: text;
+  white-space: pre-wrap;
+  -moz-user-focus: normal;
 }
 
 .hud-output-node {
-  -moz-appearance: none;
-  border-bottom: 1px solid ThreeDShadow;
-  border-top: 1px solid ThreeDShadow;
-  margin: 0;
+  border-bottom: 1px solid #ddd;
+  border-top: 1px solid #ddd;
+  overflow-x: auto;
+  overflow: auto;
+  font: 1em monospace;
+  background-color: white;
+  width: 100%;
 }
 
 .hud-filtered-by-type,
 .hud-filtered-by-string {
   display: none;
 }
 
 .webconsole-filter-button,
@@ -182,95 +180,36 @@
   -moz-margin-start: 3px;
 }
 
 .webconsole-filter-button > .toolbarbutton-menubutton-dropmarker {
   padding: 6px 3px 2px;
   -moz-border-start: dotted #aaaaaa 1px;
 }
 
-.webconsole-new-group {
-  margin-top: 6px;
-}
-
-/* Network styles */
+/* Network button */
 .webconsole-filter-button[category="net"] {
   -moz-image-region: rect(0, 40px, 10px, 30px);
 }
 
-.webconsole-msg-network > .webconsole-msg-icon-container {
-  -moz-border-start: solid #000 6px;
-}
-
-.webconsole-msg-network.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(0, 10px, 10px, 0);
-}
-
-/* CSS styles */
+/* CSS button */
 .webconsole-filter-button[category="css"] {
   -moz-image-region: rect(10px, 40px, 20px, 30px);
 }
 
-.webconsole-msg-cssparser > .webconsole-msg-icon-container {
-  -moz-border-start: solid #00b6f0 6px;
-}
-
-.webconsole-msg-cssparser.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(10px, 10px, 20px, 0);
-}
-
-.webconsole-msg-cssparser.webconsole-msg-warn > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(10px, 20px, 20px, 10px);
-}
-
-/* JS styles */
+/* JS button */
 .webconsole-filter-button[category="js"] {
   -moz-image-region: rect(20px, 40px, 30px, 30px);
 }
 
-.webconsole-msg-exception > .webconsole-msg-icon-container {
-  -moz-border-start: solid #fb9500 6px;
-}
-
-.webconsole-msg-exception.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(20px, 10px, 30px, 0);
-}
-
-.webconsole-msg-exception.webconsole-msg-warn > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(20px, 20px, 30px, 10px);
-}
-
-/* Web Developer styles */
+/* Web Developer button */
 .webconsole-filter-button[category="webdev"] {
   -moz-image-region: rect(30px, 40px, 40px, 30px);
 }
 
-.webconsole-msg-console > .webconsole-msg-icon-container {
-  -moz-border-start: solid #cbcbcb 6px;
-}
-
-.webconsole-msg-console.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon,
-.webconsole-msg-output.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(30px, 10px, 40px, 0);
-}
-
-.webconsole-msg-console.webconsole-msg-warn > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(30px, 20px, 40px, 10px);
-}
-
-.webconsole-msg-console.webconsole-msg-info > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(30px, 30px, 40px, 20px);
-}
-
-/* Input and output styles */
-.webconsole-msg-input > .webconsole-msg-icon-container,
-.webconsole-msg-output > .webconsole-msg-icon-container {
-  border-left: solid #808080 6px;
-}
-
 .webconsole-close-button {
   list-style-image: url("chrome://global/skin/icons/closetab.png");
   margin-top: 0;
   margin-bottom: 0;
   -moz-margin-start: 3px;
   -moz-margin-end: -14px;
   min-width: 0;
   -moz-appearance: none;
@@ -312,16 +251,18 @@
   width: 1px;
   position: relative;
   top: 92%;
   display: block;
 }
 
 .jsterm-input-node,
 .jsterm-complete-node {
+  font-family: monospace;
+  font-size: 9pt;
   border: none;
   padding: 0 0 0 16px;
   -moz-appearance: none;
 }
 
 .jsterm-input-node {
   background: url("chrome://global/skin/icons/commandline.png") 4px 2px no-repeat;
 }
--- a/toolkit/themes/winstripe/global/webConsole.css
+++ b/toolkit/themes/winstripe/global/webConsole.css
@@ -54,163 +54,106 @@
   height: 100%;
 }
 
 .hud-console-wrapper {
   width: 100%;
   overflow: auto;
 }
 
-/* General output styles */
-
-.webconsole-timestamp {
-  color: GrayText;
-  margin-top: 0;
-  margin-bottom: 0;
-}
-
-.webconsole-msg-icon {
-  list-style-image: url(chrome://global/skin/icons/webconsole.png);
-  margin: 2px 3px;
-  width: 10px;
-  height: 10px;
-}
-
-.webconsole-msg-log > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  visibility: hidden;
+.hud-main-label {
+  font-size: 1em;
+  padding-top: 0.33em;
+  font-weight: bold;
 }
 
 .hud-clickable {
   cursor: pointer;
   text-decoration: underline;
 }
 
-.webconsole-msg-body {
-  margin-top: 0;
-  margin-bottom: 3px;
-  -moz-margin-start: 3px;
-  -moz-margin-end: 6px;
+.hud-network {
+  color: blue;
+}
+
+.hud-error {
+  color: red;
+}
+
+.hud-log {
+  color: black;
+}
+
+.hud-warn {
+  color: orange;
 }
 
-.webconsole-location {
-  margin-top: 0;
-  margin-bottom: 0;
-  -moz-margin-start: 0;
-  -moz-margin-end: 6px;
-  width: 10em;
-  text-align: end;
+.hud-info {
+  color: green;
+}
+
+.hud-exception {
+  color: red;
+  font-weight: bold;
 }
 
-.hud-msg-node[selected="true"] > .webconsole-timestamp,
-.hud-msg-node[selected="true"] > .webconsole-location {
-  color: inherit;
-}
-
-.hud-output-node,
-.jsterm-input-node,
-.jsterm-complete-node {
-  font: 12px Consolas, Lucida Console, monospace;
+.hud-msg-node {    
+  width: 100%;
+  margin-top: 0.3em;
+  margin-bottom: 0.3em;
+  padding-left: 1em;
+  -moz-user-select: text;
+  white-space: pre-wrap;
+  -moz-user-focus: normal;
 }
 
 .hud-output-node {
-  -moz-appearance: none;
-  border-bottom: 1px solid ThreeDShadow;
-  border-top: 1px solid ThreeDShadow;
-  margin: 0;
+  border-bottom: 1px solid #ddd;
+  border-top: 1px solid #ddd;
+  overflow-x: auto;
+  overflow: auto;
+  font: 1em monospace;
+  background-color: white;
+  width: 100%;
 }
 
 .hud-filtered-by-type,
 .hud-filtered-by-string {
   display: none;
 }
 
 .webconsole-clear-console-button > .toolbarbutton-icon {
   display: none;
 }
 
 .webconsole-filter-button > .toolbarbutton-menubutton-button {
   -moz-box-orient: horizontal;
   list-style-image: url("chrome://global/skin/icons/webconsole.png");
 }
 
-/* Network styles */
+/* Network button */
 .webconsole-filter-button[category="net"] {
   -moz-image-region: rect(0, 40px, 10px, 30px);
 }
 
-.webconsole-msg-network > .webconsole-msg-icon-container {
-  -moz-border-start: solid #000 6px;
-}
-
-.webconsole-msg-network.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(0, 10px, 10px, 0);
-}
-
-/* CSS styles */
+/* CSS button */
 .webconsole-filter-button[category="css"] {
   -moz-image-region: rect(10px, 40px, 20px, 30px);
 }
 
-.webconsole-msg-cssparser > .webconsole-msg-icon-container {
-  -moz-border-start: solid #00b6f0 6px;
-}
-
-.webconsole-msg-cssparser.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(10px, 10px, 20px, 0);
-}
-
-.webconsole-msg-cssparser.webconsole-msg-warn > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(10px, 20px, 20px, 10px);
-}
-
-/* JS styles */
+/* JS button */
 .webconsole-filter-button[category="js"] {
   -moz-image-region: rect(20px, 40px, 30px, 30px);
 }
 
-.webconsole-msg-exception > .webconsole-msg-icon-container {
-  -moz-border-start: solid #fb9500 6px;
-}
-
-.webconsole-msg-exception.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(20px, 10px, 30px, 0);
-}
-
-.webconsole-msg-exception.webconsole-msg-warn > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(20px, 20px, 30px, 10px);
-}
-
-/* Web Developer styles */
+/* Web Developer button */
 .webconsole-filter-button[category="webdev"] {
   -moz-image-region: rect(30px, 40px, 40px, 30px);
 }
 
-.webconsole-msg-console > .webconsole-msg-icon-container {
-  -moz-border-start: solid #cbcbcb 6px;
-}
-
-.webconsole-msg-console.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon,
-.webconsole-msg-output.webconsole-msg-error > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(30px, 10px, 40px, 0);
-}
-
-.webconsole-msg-console.webconsole-msg-warn > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(30px, 20px, 40px, 10px);
-}
-
-.webconsole-msg-console.webconsole-msg-info > .webconsole-msg-icon-container > .webconsole-msg-icon {
-  -moz-image-region: rect(30px, 30px, 40px, 20px);
-}
-
-/* Input and output styles */
-.webconsole-msg-input > .webconsole-msg-icon-container,
-.webconsole-msg-output > .webconsole-msg-icon-container {
-  border-left: solid #808080 6px;
-}
-
 .webconsole-close-button {
   border: none;
   padding: 3px;
   list-style-image: url("chrome://global/skin/icons/close.png");
   -moz-image-region: rect(0, 16px, 16px, 0);
   -moz-appearance: none;
 }
 
@@ -250,16 +193,18 @@
   width: 1px;
   position: relative;
   top: 92%;
   display: block;
 }
 
 .jsterm-input-node,
 .jsterm-complete-node {
+  font-family: monospace;
+  font-size: 9pt;
   border: none;
   padding: 0 0 0 16px;
   -moz-appearance: none;
 }
 
 .jsterm-input-node {
   background: url("chrome://global/skin/icons/commandline.png") 4px 3px no-repeat;
 }