Bug 1380499 - Prevent horizontal scrollbar from appearing in the console after vertical overflow. r=nchevobbe
authorBrian Grinstead <bgrinstead@mozilla.com>
Sat, 22 Jul 2017 07:58:42 -0700
changeset 419132 a072c721ee167b3b58999df2cacc914aa48af6bb
parent 419131 96cfe82f2bfee15c2cfbf66585df037720f580a8
child 419133 8d6a41df163058c5382f8c25d518de13c21df8b6
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnchevobbe
bugs1380499
milestone56.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 1380499 - Prevent horizontal scrollbar from appearing in the console after vertical overflow. r=nchevobbe MozReview-Commit-ID: zU3uHLLmef
devtools/client/themes/webconsole.css
devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_init.js
--- a/devtools/client/themes/webconsole.css
+++ b/devtools/client/themes/webconsole.css
@@ -753,20 +753,16 @@ a.learn-more-link.webconsole-learn-more-
 .devtools-toolbar.webconsole-filterbar-secondary {
   height: initial;
 }
 
 .webconsole-filterbar-primary .devtools-plaininput {
   flex: 1 1 100%;
 }
 
-.webconsole-output-wrapper .message {
-  width: 100vw;
-}
-
 .webconsole-output-wrapper .message-flex-body > .message-body {
   display: flex;
   flex-wrap: wrap;
   max-width: 100%;
 }
 
 .webconsole-output-wrapper .message-body > * {
   flex-shrink: 0;
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_init.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_init.js
@@ -10,26 +10,27 @@ const TEST_URI = "http://example.com/bro
 add_task(function* () {
   let toolbox = yield openNewTabAndToolbox(TEST_URI, "webconsole");
   let hud = toolbox.getCurrentPanel().hud;
   let {ui} = hud;
 
   ok(ui.jsterm, "jsterm exists");
   ok(ui.newConsoleOutput, "newConsoleOutput exists");
 
-  // @TODO: fix proptype errors
   let receievedMessages = waitForMessages({
     hud,
-    messages: [{
-      text: "0",
-    }, {
-      text: "1",
-    }, {
-      text: "2",
-    }],
+    messages: [
+      { text: "19" },
+    ]
   });
 
   yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
-    content.wrappedJSObject.doLogs(3);
+    content.wrappedJSObject.doLogs(20);
   });
 
   yield receievedMessages;
+
+  const outputContainer = ui.outputNode.querySelector(".webconsole-output");
+  is(outputContainer.querySelectorAll(".message.console-api").length, 20,
+    "Correct number of messages appear");
+  is(outputContainer.scrollWidth, outputContainer.clientWidth,
+    "No horizontal overflow");
 });