Bug 1668480 - [devtools] Update CodeMirror to 5.58.1. r=jdescottes.

The build script was broken because of the usage of the optional chaining operator,
which is not supported by Node yet, so we fix it.

We also move one modification that was made for Bug 1651443 directly to
codemirror.css (which should be an exact copy of what's provided by the library),
to mozilla.css, our internal, devtools-specific stylesheet.

Differential Revision: https://phabricator.services.mozilla.com/D92041
This commit is contained in:
Nicolas Chevobbe 2020-10-01 13:06:55 +00:00
Родитель 4cf0ea4831
Коммит 41ff0bc532
6 изменённых файлов: 382 добавлений и 352 удалений

Просмотреть файл

@ -5,7 +5,7 @@ code, and optionally help with indentation.
# Upgrade
Currently used version is 5.49.0. To upgrade: download a new version of
Currently used version is 5.58.1. To upgrade: download a new version of
CodeMirror from the project's page [1] and replace all JavaScript and
CSS files inside the codemirror directory [2].

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -164,17 +164,17 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
.CodeMirror-scroll {
overflow: scroll !important; /* Things will break if this is overridden */
/* 30px is the magic margin used to hide the element's real scrollbars */
/* 50px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px;
margin-bottom: -50px; margin-right: -50px;
padding-bottom: 50px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
border-right: 30px solid transparent;
border-right: 50px solid transparent;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
@ -184,6 +184,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
position: absolute;
z-index: 6;
display: none;
outline: none;
}
.CodeMirror-vscrollbar {
right: 0; top: 0;
@ -212,7 +213,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
height: 100%;
display: inline-block;
vertical-align: top;
margin-bottom: -30px;
margin-bottom: -50px;
}
.CodeMirror-gutter-wrapper {
position: absolute;
@ -236,7 +237,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
.CodeMirror-lines {
cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
text-align: left;
}
.CodeMirror pre.CodeMirror-line,
.CodeMirror pre.CodeMirror-line-like {

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -288,3 +288,12 @@
*/
animation: cursor-blink calc(var(--caret-blink-time, 0.53s) * 2) steps(1) infinite;
}
/*
* Always align CodeMirror lines to the left.
* See Bug 1651443 for more information.
*/
.CodeMirror-lines {
text-align: left;
}

Просмотреть файл

@ -42,9 +42,7 @@ module.exports = (env, argv) => {
"./codemirror/lib/codemirror.js",
],
optimization: {
minimize: !(
argv?.optimization && argv.optimization.minimizer === "false"
),
minimize: !(argv.optimization && argv.optimization.minimizer === "false"),
},
output: {
path: path.resolve(__dirname, "./codemirror/"),