Upgrade CodeMirror

R=tvanderlippe@chromium.org

Bug: 1241848
Change-Id: I72391b6e203d5010d13733ff76896fed597db336
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3317336
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
This commit is contained in:
Tim van der Lippe
2021-12-07 14:41:47 +00:00
committed by Devtools-frontend LUCI CQ
parent 2d09754f44
commit b154da2d03
5 changed files with 17 additions and 30 deletions
File diff suppressed because one or more lines are too long
+8 -6
View File
@@ -2276,6 +2276,7 @@ interface MeasureRequest<T> {
*/
key?: any;
}
declare type AttrSource = Attrs | ((view: EditorView) => Attrs | null);
/**
View [plugins](https://codemirror.net/6/docs/ref/#view.ViewPlugin) are given instances of this
class, which describe what happened, whenever the view is updated.
@@ -2539,6 +2540,7 @@ declare class EditorView {
readonly contentDOM: HTMLElement;
private announceDOM;
private plugins;
private pluginMap;
private editorAttrs;
private contentAttrs;
private styleModules;
@@ -2960,12 +2962,12 @@ declare class EditorView {
Facet that provides additional DOM attributes for the editor's
editable DOM element.
*/
static contentAttributes: Facet<Attrs, Attrs>;
static contentAttributes: Facet<AttrSource, readonly AttrSource[]>;
/**
Facet that provides DOM attributes for the editor's outer
element.
*/
static editorAttributes: Facet<Attrs, Attrs>;
static editorAttributes: Facet<AttrSource, readonly AttrSource[]>;
/**
An extension that enables line wrapping in the editor (by
setting CSS `white-space` to `pre-wrap` in the content).
@@ -3157,10 +3159,10 @@ Configuration options.
config?: SpecialCharConfig): Extension;
/**
Returns a plugin that makes sure the content has a bottom margin
equivalent to the height of the editor, minus one line height, so
that every line in the document can be scrolled to the top of the
editor.
Returns an extension that makes sure the content has a bottom
margin equivalent to the height of the editor, minus one line
height, so that every line in the document can be scrolled to the
top of the editor.
This is only meaningful when the editor is scrollable, and should
not be enabled in editors that take the size of their content.
+3 -3
View File
@@ -8,7 +8,7 @@
"@codemirror/commands": "0.19.5",
"@codemirror/comment": "0.19.0",
"@codemirror/fold": "0.19.2",
"@codemirror/gutter": "0.19.7",
"@codemirror/gutter": "0.19.8",
"@codemirror/highlight": "0.19.6",
"@codemirror/history": "0.19.0",
"@codemirror/lang-cpp": "0.19.1",
@@ -22,7 +22,7 @@
"@codemirror/lang-python": "0.19.2",
"@codemirror/lang-wast": "0.19.0",
"@codemirror/lang-xml": "0.19.2",
"@codemirror/language": "0.19.6",
"@codemirror/language": "0.19.7",
"@codemirror/legacy-modes": "0.19.0",
"@codemirror/matchbrackets": "0.19.3",
"@codemirror/panel": "0.19.0",
@@ -32,7 +32,7 @@
"@codemirror/stream-parser": "0.19.2",
"@codemirror/text": "0.19.5",
"@codemirror/tooltip": "0.19.10",
"@codemirror/view": "0.19.23",
"@codemirror/view": "0.19.25",
"@lezer/common": "0.15.10",
"@lezer/lr": "0.15.5",
"@rollup/plugin-node-resolve": "^13.0.4",
@@ -4,25 +4,6 @@ Script snippet #1
Script snippet #2
aXe violations: [
{
"ruleDescription": "Ensures ARIA attributes are allowed for an element's role",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.3/aria-allowed-attr?application=axeAPI",
"ruleId": "aria-allowed-attr",
"impact": "critical",
"failedNodes": [
{
"target": [
[
"devtools-text-editor",
".cm-content"
]
],
"html": "<div spellcheck=\"false\" autocorrect=\"off\" autocapitalize=\"off\" translate=\"no\" contenteditable=\"true\" class=\"cm-content\" style=\"tab-size: 4;\" role=\"textbox\" aria-multiline=\"true\" aria-label=\"Code editor\" aria-autocomplete=\"list\" aria-expanded=\"false\"><div class=\"cm-line\"><br></div></div>",
"failureSummary": "Fix any of the following:\n ARIA attribute is not allowed: aria-expanded=\"false\""
}
]
}
]
aXe violations: []
@@ -13,6 +13,10 @@
enabled: false,
selector: ':not(.tabbed-pane-header-tabs)'
},
'aria-allowed-attr': {
enabled: false,
selector: '.cm-content'
}
};
await TestRunner.loadTestModule('axe_core_test_runner');