Bug 1320053 - set height 100% on .CodeMirror element;r=gl
MozReview-Commit-ID: IKmRGwiOjwu
--- 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",