chrome-devtools-frontend 1.0.956975 → 1.0.957495

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ import type * as SDK from '../../core/sdk/sdk.js';
8
8
  import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
9
9
  import * as Components from '../../ui/legacy/components/utils/utils.js';
10
10
  import * as UI from '../../ui/legacy/legacy.js';
11
+ import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
11
12
 
12
13
  import type {NetworkNode} from './NetworkDataGridNode.js';
13
14
  import {NetworkRequestNode} from './NetworkDataGridNode.js';
@@ -205,6 +206,10 @@ export class NetworkLogViewColumns {
205
206
 
206
207
  this.setupDataGrid();
207
208
  this.setupWaterfall();
209
+
210
+ ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {
211
+ this.scheduleRefresh();
212
+ });
208
213
  }
209
214
 
210
215
  private static convertToDataGridDescriptor(columnConfig: Descriptor): DataGrid.DataGrid.ColumnDescriptor {
@@ -127,6 +127,7 @@ export const editorTheme = CM.EditorView.theme({
127
127
 
128
128
  '.cm-tooltip.cm-tooltip-autocomplete > ul': {
129
129
  backgroundColor: 'var(--color-background)',
130
+ maxHeight: '25em',
130
131
  minWidth: '16em',
131
132
  '& > li.cm-secondaryCompletion': {
132
133
  display: 'flex',
@@ -42,7 +42,7 @@ let themeSupportInstance: ThemeSupport;
42
42
  const themeValuesCache = new Map<CSSStyleDeclaration, Map<string, string>>();
43
43
 
44
44
  export class ThemeSupport extends EventTarget {
45
- private themeNameInternal = 'systemPreferred';
45
+ private themeNameInternal = 'default';
46
46
  private customSheets: Set<string> = new Set();
47
47
  private computedRoot = Common.Lazy.lazy(() => window.getComputedStyle(document.documentElement));
48
48
 
package/package.json CHANGED
@@ -53,5 +53,5 @@
53
53
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
54
54
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
55
55
  },
56
- "version": "1.0.956975"
56
+ "version": "1.0.957495"
57
57
  }
@@ -1,3 +0,0 @@
1
- Treat `codemirror.css` like a rolled-in upstream dependency. Instead of changing it directly, consider changing `front_end/text_editor/cmdevtools.css` instead.
2
-
3
- [Issue #1076825](https://bugs.chromium.org/p/chromium/issues/detail?id=1076825) tracks the effort to use the upstream file more directly.
@@ -1,283 +0,0 @@
1
- /* The rest of this file contains styles related to the mechanics of
2
- the editor. You probably shouldn't touch them. */
3
-
4
- .CodeMirror {
5
- position: relative;
6
- overflow: hidden;
7
- background: var(--color-background);
8
- }
9
-
10
- .CodeMirror-scroll {
11
- overflow: scroll !important; /* Things will break if this is overridden */
12
- /* 50px is the magic margin used to hide the element's real scrollbars */
13
- /* See overflow: hidden in .CodeMirror */
14
- margin-bottom: -50px;
15
- margin-right: -50px;
16
- padding-bottom: 50px;
17
- height: 100%;
18
- outline: none; /* Prevent dragging from highlighting the element */
19
- position: relative;
20
- }
21
-
22
- .CodeMirror-sizer {
23
- position: relative;
24
- border-right: 50px solid transparent;
25
- }
26
-
27
- /* The fake, visible scrollbars. Used to force redraw during scrolling
28
- before actual scrolling happens, thus preventing shaking and
29
- flickering artifacts. */
30
- .CodeMirror-vscrollbar,
31
- .CodeMirror-hscrollbar,
32
- .CodeMirror-scrollbar-filler,
33
- .CodeMirror-gutter-filler {
34
- position: absolute;
35
- z-index: 6;
36
- display: none;
37
- outline: none;
38
- }
39
-
40
- .CodeMirror-vscrollbar {
41
- right: 0;
42
- top: 0;
43
- overflow-x: hidden;
44
- overflow-y: scroll;
45
- }
46
-
47
- .CodeMirror-hscrollbar {
48
- bottom: 0;
49
- left: 0;
50
- overflow-y: hidden;
51
- overflow-x: scroll;
52
- }
53
-
54
- .CodeMirror-scrollbar-filler {
55
- right: 0;
56
- bottom: 0;
57
- }
58
-
59
- .CodeMirror-gutter-filler {
60
- left: 0;
61
- bottom: 0;
62
- }
63
-
64
- .CodeMirror-gutters {
65
- position: absolute;
66
- left: 0;
67
- top: 0;
68
- min-height: 100%;
69
- z-index: 3;
70
- }
71
-
72
- .CodeMirror-gutter {
73
- white-space: normal;
74
- height: 100%;
75
- display: inline-block;
76
- vertical-align: top;
77
- margin-bottom: -50px;
78
- }
79
-
80
- .CodeMirror-gutter-wrapper {
81
- position: absolute;
82
- z-index: 4;
83
- background: none !important;
84
- border: none !important;
85
- }
86
-
87
- .CodeMirror-gutter-background {
88
- position: absolute;
89
- top: 0;
90
- bottom: 0;
91
- z-index: 4;
92
- }
93
-
94
- .CodeMirror-gutter-elt {
95
- position: absolute;
96
- cursor: default;
97
- z-index: 4;
98
- }
99
-
100
- .CodeMirror-gutter-wrapper ::selection {
101
- background-color: transparent;
102
- }
103
-
104
- .CodeMirror-gutter-wrapper ::-moz-selection {
105
- background-color: transparent;
106
- }
107
-
108
- .CodeMirror-lines {
109
- cursor: text;
110
- min-height: 1px; /* prevents collapsing before first draw */
111
- }
112
-
113
- .CodeMirror pre.CodeMirror-line,
114
- .CodeMirror pre.CodeMirror-line-like {
115
- /* Reset some styles that the rest of the page might have set */
116
- /* stylelint-disable-next-line property-no-vendor-prefix */
117
- -moz-border-radius: 0;
118
- /* stylelint-disable-next-line property-no-vendor-prefix */
119
- -webkit-border-radius: 0;
120
- border-radius: 0;
121
- border-width: 0;
122
- background: transparent;
123
- font-family: inherit;
124
- font-size: inherit;
125
- margin: 0;
126
- white-space: pre;
127
- word-wrap: normal;
128
- line-height: inherit;
129
- color: inherit;
130
- z-index: 2;
131
- position: relative;
132
- overflow: visible;
133
- -webkit-tap-highlight-color: transparent;
134
- /* stylelint-disable-next-line property-no-vendor-prefix */
135
- -webkit-font-variant-ligatures: contextual;
136
- font-variant-ligatures: contextual;
137
- }
138
-
139
- .CodeMirror-wrap pre.CodeMirror-line,
140
- .CodeMirror-wrap pre.CodeMirror-line-like {
141
- word-wrap: break-word;
142
- white-space: pre-wrap;
143
- word-break: normal;
144
- }
145
-
146
- .CodeMirror-linebackground {
147
- position: absolute;
148
- left: 0;
149
- right: 0;
150
- top: 0;
151
- bottom: 0;
152
- z-index: 0;
153
- }
154
-
155
- .CodeMirror-linewidget {
156
- position: relative;
157
- z-index: 2;
158
- padding: 0.1px; /* Force widget margins to stay inside of the container */
159
- }
160
-
161
- .CodeMirror-rtl pre {
162
- direction: rtl;
163
- }
164
-
165
- .CodeMirror-code {
166
- outline: none;
167
- }
168
-
169
- /* Force content-box sizing for the elements where we expect it */
170
- .CodeMirror-scroll,
171
- .CodeMirror-sizer,
172
- .CodeMirror-gutter,
173
- .CodeMirror-gutters,
174
- .CodeMirror-linenumber {
175
- /* stylelint-disable-next-line property-no-vendor-prefix */
176
- -moz-box-sizing: content-box;
177
- box-sizing: content-box;
178
- }
179
-
180
- .CodeMirror-measure {
181
- position: absolute;
182
- width: 100%;
183
- height: 0;
184
- overflow: hidden;
185
- visibility: hidden;
186
- }
187
-
188
- .CodeMirror-cursor {
189
- position: absolute;
190
- pointer-events: none;
191
- }
192
-
193
- .CodeMirror-measure pre {
194
- position: static;
195
- }
196
-
197
- div.CodeMirror-cursors {
198
- visibility: hidden;
199
- position: relative;
200
- z-index: 3;
201
- }
202
-
203
- div.CodeMirror-dragcursors {
204
- visibility: visible;
205
- }
206
-
207
- .CodeMirror-focused div.CodeMirror-cursors {
208
- visibility: visible;
209
- }
210
-
211
- .CodeMirror-selected {
212
- --override-cm-selected-background-color: #d9d9d9;
213
-
214
- background: var(--override-cm-selected-background-color);
215
- }
216
-
217
- .-theme-with-dark-background .CodeMirror-selected,
218
- :host-context(.-theme-with-dark-background) .CodeMirror-selected {
219
- --override-cm-selected-background-color: rgb(38 38 38);
220
- }
221
-
222
- .CodeMirror-focused .CodeMirror-selected {
223
- --override-cm-selected-background-color: #d7d4f0;
224
- }
225
-
226
- .-theme-with-dark-background .CodeMirror-focused .CodeMirror-selected,
227
- :host-context(.-theme-with-dark-background) .CodeMirror-focused .CodeMirror-selected {
228
- --override-cm-selected-background-color: rgb(18 15 43);
229
- }
230
-
231
- .CodeMirror-crosshair {
232
- cursor: crosshair;
233
- }
234
-
235
- .CodeMirror-line {
236
- --override-line-selection-background-color: #d7d4f0;
237
- }
238
-
239
- .CodeMirror-line::selection,
240
- .CodeMirror-line > span::selection,
241
- .CodeMirror-line > span > span::selection {
242
- background:var(--override-line-selection-background-color);
243
- }
244
-
245
- .CodeMirror-line::-moz-selection,
246
- .CodeMirror-line > span::-moz-selection,
247
- .CodeMirror-line > span > span::-moz-selection {
248
- background: var(--override-line-selection-background-color);
249
- }
250
-
251
- .-theme-with-dark-background .CodeMirror-line,
252
- :host-context(.-theme-with-dark-background) .CodeMirror-line {
253
- --override-line-selection-background-color: rgb(18 15 43);
254
-
255
- }
256
-
257
- .cm-searching {
258
- --override-searching-background-color: rgb(255 255 0 / 40%);
259
-
260
- background-color: var(--override-searching-background-color);
261
- }
262
-
263
- /* Used to force a border model for a node */
264
- .cm-force-border {
265
- padding-right: 0.1px;
266
- }
267
-
268
- @media print {
269
- /* Hide the cursor when printing */
270
- .CodeMirror div.CodeMirror-cursors {
271
- visibility: hidden;
272
- }
273
- }
274
-
275
- /* See issue #2901 */
276
- .cm-tab-wrap-hack::after {
277
- content: "";
278
- }
279
-
280
- /* Help users use markselection to safely style text background */
281
- span.CodeMirror-selectedtext {
282
- background: none;
283
- }
@@ -1,19 +0,0 @@
1
- // Copyright 2019 The Chromium Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import type * as CodeMirrorLegacy from './codemirror-legacy';
6
- export {CodeMirrorLegacy};
7
-
8
- import './package/lib/codemirror.js';
9
- import './package/addon/comment/comment.js';
10
- import './package/addon/edit/closebrackets.js';
11
- import './package/addon/edit/matchbrackets.js';
12
- import './package/addon/mode/multiplex.js';
13
- import './package/addon/mode/overlay.js';
14
- import './package/addon/mode/simple.js';
15
- import './package/addon/selection/active-line.js';
16
- import './package/addon/selection/mark-selection.js';
17
- import './package/addon/fold/foldcode.js';
18
- import './package/addon/fold/foldgutter.js';
19
- import './package/addon/fold/brace-fold.js';