Bug 1113825 - Nowrap content in console.table(). r=bgrins
authorJennifer Fong <jfong@mozilla.com>
Wed, 20 Jul 2016 15:19:11 -0400
changeset 345908 c050984325e379286c1456a261b0cdc92dab89c1
parent 345907 d8384a5bd4dfd6371e3d0d17fa0a91367a20dc7a
child 345909 3367c6049a4f1a7f94532da415bba9e5e348e883
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1113825
milestone50.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 1113825 - Nowrap content in console.table(). r=bgrins
devtools/client/themes/webconsole.css
devtools/client/webconsole/console-output.js
--- a/devtools/client/themes/webconsole.css
+++ b/devtools/client/themes/webconsole.css
@@ -493,16 +493,26 @@ a {
   border: 1px solid var(--theme-splitter-color);
   border-radius: 3px;
 }
 
 .consoletable {
   margin: 5px 0 0 0;
 }
 
+/* Force cells to only show one row of contents.  Getting normal ellipses
+   behavior has proven impossible so far, so this is better than letting
+   rows get out of vertical alignment when one cell has a lot of content. */
+.consoletable .table-widget-cell > span {
+  overflow: hidden;
+  display: flex;
+  height: 1.25em;
+  line-height: 1.25em;
+}
+
 .theme-light .message[severity=error] .stacktrace {
   background-color: rgba(255, 255, 255, 0.5);
 }
 
 .theme-dark .message[severity=error] .stacktrace {
   background-color: rgba(0, 0, 0, 0.5);
 }
 
--- a/devtools/client/webconsole/console-output.js
+++ b/devtools/client/webconsole/console-output.js
@@ -3615,16 +3615,17 @@ Widgets.Table.prototype = extend(Widgets
     if (this.element) {
       return this;
     }
 
     let result = this.element = this.document.createElementNS(XHTML_NS, "div");
     result.className = "consoletable devtools-monospace";
 
     this.table = new TableWidget(result, {
+      wrapTextInElements: true,
       initialColumns: this.columns,
       uniqueId: "_index",
       firstColumn: "_index"
     });
 
     for (let row of this.data) {
       this.table.push(row);
     }