Bug 1320053 - set height 100% on .CodeMirror element;r=gl
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 25 Nov 2016 18:36:57 +0100
changeset 324354 a105cf2d33a5643d63c516d5ecfe917d8eb5eeee
parent 324353 a06c5b8741d78cdcee4b3ceb8648f0ca06a4a096
child 324355 7f137d9fa7ba6f092eb1821b3972ff2f1ea85a12
push id34674
push userjdescottes@mozilla.com
push dateMon, 28 Nov 2016 09:12:48 +0000
treeherderautoland@a105cf2d33a5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1320053
milestone53.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 1320053 - set height 100% on .CodeMirror element;r=gl MozReview-Commit-ID: IKmRGwiOjwu
devtools/client/sourceeditor/codemirror/mozilla.css
devtools/client/sourceeditor/editor.js
--- a/devtools/client/sourceeditor/codemirror/mozilla.css
+++ b/devtools/client/sourceeditor/codemirror/mozilla.css
@@ -11,16 +11,21 @@
 
 .theme-dark:root {
   --breakpoint-background: url("chrome://devtools/skin/images/breakpoint.svg#dark");
   --breakpoint-hover-background: url("chrome://devtools/skin/images/breakpoint.svg#dark-hover");
   --breakpoint-active-color: rgba(112,191,83,.4);
   --breakpoint-conditional-background: url("chrome://devtools/skin/images/breakpoint.svg#dark-conditional");
 }
 
+.CodeMirror {
+  height: 100%;
+  cursor: text;
+}
+
 .CodeMirror .errors {
   width: 16px;
 }
 
 .CodeMirror .error {
   display: inline-block;
   margin-left: 5px;
   width: 12px;
@@ -87,20 +92,16 @@
 }
 
 /* Don't display the highlight color since the debug line
    is already highlighted */
 .debug-line .CodeMirror-activeline-background {
   display: none;
 }
 
-.CodeMirror {
-  cursor: text;
-}
-
 .CodeMirror-gutters {
   cursor: default;
 }
 
 /* This is to avoid the fake horizontal scrollbar div of codemirror to go 0
 height when floating scrollbars are active. Make sure that this value is equal
 to the maximum of `min-height` specific to the `scrollbar[orient="horizontal"]`
 selector in floating-scrollbar-light.css across all platforms. */
--- a/devtools/client/sourceeditor/editor.js
+++ b/devtools/client/sourceeditor/editor.js
@@ -57,18 +57,17 @@ const CM_SCRIPTS = [
 
 const CM_IFRAME =
   "data:text/html;charset=utf8,<!DOCTYPE html>" +
   "<html dir='ltr'>" +
   "  <head>" +
   "    <style>" +
   "      html, body { height: 100%; }" +
   "      body { margin: 0; overflow: hidden; }" +
-  "      .CodeMirror { width: 100%; height: 100% !important; " +
-  "line-height: 1.25 !important;}" +
+  "      .CodeMirror { width: 100% !important; line-height: 1.25 !important; }" +
   "    </style>" +
   CM_STYLES.map(style => "<link rel='stylesheet' href='" + style + "'>").join("\n") +
   "  </head>" +
   "  <body class='theme-body devtools-monospace'></body>" +
   "</html>";
 
 const CM_MAPPING = [
   "focus",