chrome-devtools-frontend 1.0.930993 → 1.0.932348

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.
Files changed (81) hide show
  1. package/config/gni/devtools_grd_files.gni +6 -2
  2. package/front_end/core/common/ParsedURL.ts +12 -10
  3. package/front_end/core/host/InspectorFrontendHostAPI.ts +8 -6
  4. package/front_end/core/i18n/locales/en-US.json +345 -12
  5. package/front_end/core/i18n/locales/en-XL.json +345 -12
  6. package/front_end/core/platform/DevToolsPath.ts +34 -0
  7. package/front_end/core/platform/platform.ts +2 -0
  8. package/front_end/core/protocol_client/NodeURL.ts +2 -1
  9. package/front_end/core/sdk/CSSStyleSheetHeader.ts +4 -2
  10. package/front_end/core/sdk/ChildTargetManager.ts +2 -0
  11. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +4 -2
  12. package/front_end/core/sdk/DebuggerModel.ts +4 -3
  13. package/front_end/core/sdk/NetworkRequest.ts +3 -2
  14. package/front_end/core/sdk/Resource.ts +6 -5
  15. package/front_end/core/sdk/Script.ts +4 -2
  16. package/front_end/core/sdk/Target.ts +4 -0
  17. package/front_end/core/sdk/TracingModel.ts +8 -17
  18. package/front_end/entrypoint_template.html +1 -1
  19. package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +1 -1
  20. package/front_end/models/bindings/BreakpointManager.ts +6 -3
  21. package/front_end/models/bindings/ResourceMapping.ts +2 -1
  22. package/front_end/models/bindings/StylesSourceMapping.ts +2 -1
  23. package/front_end/models/emulation/DeviceModeModel.ts +1 -1
  24. package/front_end/models/persistence/IsolatedFileSystem.ts +9 -7
  25. package/front_end/models/persistence/IsolatedFileSystemManager.ts +8 -7
  26. package/front_end/models/persistence/PersistenceActions.ts +1 -1
  27. package/front_end/models/persistence/PlatformFileSystem.ts +4 -3
  28. package/front_end/models/text_utils/ContentProvider.ts +2 -1
  29. package/front_end/models/text_utils/StaticContentProvider.ts +4 -2
  30. package/front_end/models/workspace/UISourceCode.ts +3 -2
  31. package/front_end/panels/animation/AnimationGroupPreviewUI.ts +25 -25
  32. package/front_end/panels/animation/AnimationModel.ts +157 -156
  33. package/front_end/panels/animation/AnimationScreenshotPopover.ts +26 -26
  34. package/front_end/panels/animation/AnimationTimeline.ts +274 -260
  35. package/front_end/panels/animation/AnimationUI.ts +155 -145
  36. package/front_end/panels/application/BackForwardCacheStrings.ts +621 -0
  37. package/front_end/panels/application/BackForwardCacheView.ts +24 -8
  38. package/front_end/panels/application/ReportingApiReportsView.ts +3 -2
  39. package/front_end/panels/application/ReportingApiView.ts +1 -2
  40. package/front_end/panels/application/backForwardCacheView.css +10 -0
  41. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +48 -40
  42. package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +37 -37
  43. package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +23 -19
  44. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +56 -56
  45. package/front_end/panels/changes/ChangesView.ts +42 -225
  46. package/front_end/panels/changes/changes-legacy.ts +0 -2
  47. package/front_end/panels/changes/changes.ts +0 -6
  48. package/front_end/panels/changes/changesView.css +2 -69
  49. package/front_end/panels/changes/module.json +1 -1
  50. package/front_end/panels/console/ConsolePinPane.ts +80 -75
  51. package/front_end/panels/console/ConsoleView.ts +1 -9
  52. package/front_end/panels/console/consolePinPane.css +4 -1
  53. package/front_end/panels/elements/StylesSidebarPane.ts +2 -1
  54. package/front_end/panels/security/mainView.css +2 -1
  55. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +2 -1
  56. package/front_end/panels/sources/NavigatorView.ts +5 -2
  57. package/front_end/panels/sources/SourcesPanel.ts +28 -1
  58. package/front_end/panels/sources/sources-meta.ts +1 -4
  59. package/front_end/third_party/codemirror.next/bundle.ts +6 -4
  60. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  61. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
  62. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +30 -1
  63. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  64. package/front_end/third_party/codemirror.next/package.json +4 -3
  65. package/front_end/ui/components/buttons/Button.ts +22 -6
  66. package/front_end/ui/components/buttons/button.css +50 -4
  67. package/front_end/ui/components/diff_view/DiffView.ts +288 -0
  68. package/front_end/ui/components/diff_view/diffView.css +73 -0
  69. package/front_end/ui/components/diff_view/diff_view.ts +5 -0
  70. package/front_end/ui/components/docs/button/basic.html +28 -0
  71. package/front_end/ui/components/docs/button/basic.ts +43 -2
  72. package/front_end/ui/components/report_view/report.css +1 -0
  73. package/front_end/ui/components/text_editor/config.ts +34 -1
  74. package/front_end/ui/legacy/ForwardedInputEventHandler.ts +5 -3
  75. package/front_end/ui/legacy/components/color_picker/spectrum.css +2 -4
  76. package/front_end/ui/legacy/themeColors.css +4 -0
  77. package/package.json +1 -1
  78. package/scripts/build/generate_css_js_files.js +1 -0
  79. package/scripts/migration/class-fields/migrate.js +1 -3
  80. package/front_end/panels/changes/ChangesHighlighter.ts +0 -179
  81. package/front_end/panels/changes/ChangesTextEditor.ts +0 -96
@@ -13,8 +13,9 @@
13
13
  overflow: auto;
14
14
  }
15
15
 
16
- .editor-container {
16
+ .diff-container {
17
17
  flex: 1;
18
+ overflow: auto;
18
19
  }
19
20
 
20
21
  :focus.selected {
@@ -29,75 +30,7 @@
29
30
  --override-selected-color: rgb(0 0 0);
30
31
  }
31
32
 
32
- .CodeMirror-lines:not(:active) {
33
- cursor: default !important; /* stylelint-disable-line declaration-no-important */
34
- }
35
-
36
- .CodeMirror-line:hover {
37
- --override-line-hover-background-color: rgb(0 0 255 / 5%);
38
-
39
- cursor: default !important; /* stylelint-disable-line declaration-no-important */
40
- background-color: var(--override-line-hover-background-color) !important; /* stylelint-disable-line declaration-no-important */
41
- }
42
-
43
- .CodeMirror .CodeMirror-linebackground.spacer {
44
- --override-spacer-color: rgb(0 0 0 / 50%);
45
- --override-spacer-background-color: rgb(0 0 255 / 10%);
46
-
47
- text-align: center;
48
- color: var(--override-spacer-color);
49
- background-color: var(--override-spacer-background-color);
50
- }
51
-
52
- .-theme-with-dark-background .CodeMirror .CodeMirror-linebackground.spacer,
53
- :host-context(.-theme-with-dark-background) .CodeMirror .CodeMirror-linebackground.spacer {
54
- --override-spacer-color: rgb(230 230 230 / 50%);
55
- }
56
-
57
- .CodeMirror .equal > span > span {
58
- opacity: 50%;
59
- }
60
-
61
- .CodeMirror .CodeMirror-selectedtext:not(.CodeMirror-persist-highlight) {
62
- opacity: 100%;
63
- }
64
-
65
- .CodeMirror .CodeMirror-linebackground.addition,
66
- .changes-diff-gutter-marker.addition {
67
- --override-addition-background-color: hsl(144deg 55% 49% / 20%);
68
-
69
- background-color: var(--override-addition-background-color);
70
- }
71
-
72
- .CodeMirror .CodeMirror-linebackground.deletion,
73
- .changes-diff-gutter-marker.deletion {
74
- --override-deletion-background-color: rgb(255 0 0 / 20%);
75
-
76
- background-color: var(--override-deletion-background-color);
77
- }
78
-
79
- .CodeMirror .addition .cm-inner-diff:not(.CodeMirror-selectedtext) {
80
- --override-addition-inner-diff-background-color: hsl(144deg 55% 49% / 30%);
81
-
82
- background-color: var(--override-addition-inner-diff-background-color);
83
- }
84
-
85
- .CodeMirror .deletion .cm-inner-diff:not(.CodeMirror-selectedtext),
86
- .-theme-preserve {
87
- --override-deletion-inner-diff-background-color: rgb(255 0 0 / 30%);
88
-
89
- background-color: var(--override-deletion-inner-diff-background-color);
90
- }
91
-
92
33
  .changes-toolbar {
93
34
  background-color: var(--color-background-elevation-1);
94
35
  border-top: var(--legacy-divider-border);
95
36
  }
96
-
97
- .changes-diff-gutter {
98
- width: 20px;
99
- }
100
-
101
- .changes-diff-gutter-marker {
102
- text-align: center;
103
- }
@@ -4,4 +4,4 @@
4
4
  "panels/snippets",
5
5
  "ui/legacy"
6
6
  ]
7
- }
7
+ }
@@ -5,11 +5,11 @@
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
7
  import * as SDK from '../../core/sdk/sdk.js';
8
- import * as TextUtils from '../../models/text_utils/text_utils.js';
9
8
  import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
10
9
  // eslint-disable-next-line rulesdir/es_modules_import
11
10
  import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
12
- import * as TextEditor from '../../ui/legacy/components/text_editor/text_editor.js';
11
+ import type * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
12
+ import type * as TextEditor from '../../ui/components/text_editor/text_editor.js';
13
13
  import * as UI from '../../ui/legacy/legacy.js';
14
14
 
15
15
  import consolePinPaneStyles from './consolePinPane.css.js';
@@ -55,12 +55,10 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
55
55
  const elementToConsolePin = new WeakMap<Element, ConsolePin>();
56
56
 
57
57
  export class ConsolePinPane extends UI.ThrottledWidget.ThrottledWidget {
58
- private readonly liveExpressionButton: UI.Toolbar.ToolbarButton;
59
58
  private pins: Set<ConsolePin>;
60
59
  private readonly pinsSetting: Common.Settings.Setting<string[]>;
61
- constructor(liveExpressionButton: UI.Toolbar.ToolbarButton) {
60
+ constructor(private readonly liveExpressionButton: UI.Toolbar.ToolbarButton, private readonly focusOut: () => void) {
62
61
  super(true, 250);
63
- this.liveExpressionButton = liveExpressionButton;
64
62
  this.contentElement.classList.add('console-pins', 'monospace');
65
63
  this.contentElement.addEventListener('contextmenu', this.contextMenuEventFired.bind(this), false);
66
64
 
@@ -124,7 +122,7 @@ export class ConsolePinPane extends UI.ThrottledWidget.ThrottledWidget {
124
122
  }
125
123
 
126
124
  addPin(expression: string, userGesture?: boolean): void {
127
- const pin = new ConsolePin(expression, this);
125
+ const pin = new ConsolePin(expression, this, this.focusOut);
128
126
  this.contentElement.appendChild(pin.element());
129
127
  this.pins.add(pin);
130
128
  this.savePins();
@@ -173,32 +171,33 @@ export class ConsolePin {
173
171
  private readonly pinPreview: HTMLElement;
174
172
  private lastResult: SDK.RuntimeModel.EvaluationResult|null;
175
173
  private lastExecutionContext: SDK.RuntimeModel.ExecutionContext|null;
176
- private editor: UI.TextEditor.TextEditor|null;
174
+ private editor: TextEditor.TextEditor.TextEditor|null;
177
175
  private committedExpression: string;
178
176
  private hovered: boolean;
179
177
  private lastNode: SDK.RemoteObject.RemoteObject|null;
180
- private readonly editorPromise: Promise<UI.TextEditor.TextEditor>;
178
+ private readonly editorPromise: Promise<TextEditor.TextEditor.TextEditor>;
181
179
  private consolePinNumber: number;
180
+ private deletePinIcon: UI.UIUtils.DevToolsCloseButton;
182
181
 
183
- constructor(expression: string, pinPane: ConsolePinPane) {
182
+ constructor(expression: string, private readonly pinPane: ConsolePinPane, private readonly focusOut: () => void) {
184
183
  this.consolePinNumber = ++consolePinNumber;
185
- const deletePinIcon = (document.createElement('div', {is: 'dt-close-button'}) as UI.UIUtils.DevToolsCloseButton);
186
- deletePinIcon.gray = true;
187
- deletePinIcon.classList.add('close-button');
188
- deletePinIcon.setTabbable(true);
184
+ this.deletePinIcon = document.createElement('div', {is: 'dt-close-button'}) as UI.UIUtils.DevToolsCloseButton;
185
+ this.deletePinIcon.gray = true;
186
+ this.deletePinIcon.classList.add('close-button');
187
+ this.deletePinIcon.setTabbable(true);
189
188
  if (expression.length) {
190
- deletePinIcon.setAccessibleName(i18nString(UIStrings.removeExpressionS, {PH1: expression}));
189
+ this.deletePinIcon.setAccessibleName(i18nString(UIStrings.removeExpressionS, {PH1: expression}));
191
190
  } else {
192
- deletePinIcon.setAccessibleName(i18nString(UIStrings.removeBlankExpression));
191
+ this.deletePinIcon.setAccessibleName(i18nString(UIStrings.removeBlankExpression));
193
192
  }
194
- self.onInvokeElement(deletePinIcon, event => {
193
+ self.onInvokeElement(this.deletePinIcon, event => {
195
194
  pinPane.removePin(this);
196
195
  event.consume(true);
197
196
  });
198
197
 
199
198
  const fragment = UI.Fragment.Fragment.build`
200
199
  <div class='console-pin'>
201
- ${deletePinIcon}
200
+ ${this.deletePinIcon}
202
201
  <div class='console-pin-name' $='name'></div>
203
202
  <div class='console-pin-preview' $='preview'></div>
204
203
  </div>`;
@@ -224,61 +223,66 @@ export class ConsolePin {
224
223
  }
225
224
  }, false);
226
225
 
227
- const createTextEditor = (factory: UI.TextEditor.TextEditorFactory): UI.TextEditor.TextEditor => {
228
- this.editor = factory.createEditor({
229
- devtoolsAccessibleName: i18nString(UIStrings.liveExpressionEditor),
230
- lineNumbers: false,
231
- lineWrapping: true,
232
- mimeType: 'javascript',
233
- autoHeight: true,
234
- placeholder: i18nString(UIStrings.expression),
235
- bracketMatchingSetting: undefined,
236
- lineWiseCopyCut: undefined,
237
- maxHighlightLength: undefined,
238
- padBottom: undefined,
239
- inputStyle: undefined,
240
- });
241
- this.editor.configureAutocomplete(
242
- ObjectUI.JavaScriptAutocomplete.JavaScriptAutocompleteConfig.createConfigForEditor(this.editor));
243
- this.editor.widget().show(nameElement);
244
- this.editor.widget().element.classList.add('console-pin-editor');
245
- this.editor.widget().element.tabIndex = -1;
246
- this.editor.setText(expression);
247
- this.editor.widget().element.addEventListener('keydown', event => {
248
- if (!this.editor) {
249
- return;
250
- }
251
- if (event.key === 'Tab' && !this.editor.text()) {
252
- event.consume();
253
- return;
254
- }
255
- if (event.keyCode === UI.KeyboardShortcut.Keys.Esc.code) {
256
- this.editor.setText(this.committedExpression);
257
- }
258
- }, true);
259
- this.editor.widget().element.addEventListener('focusout', _event => {
260
- if (!this.editor) {
261
- return;
262
- }
263
- const text = this.editor.text();
264
- const trimmedText = text.trim();
265
- if (text.length !== trimmedText.length) {
266
- this.editor.setText(trimmedText);
267
- }
268
- this.committedExpression = trimmedText;
269
- pinPane.savePins();
270
- if (this.committedExpression.length) {
271
- deletePinIcon.setAccessibleName(i18nString(UIStrings.removeExpressionS, {PH1: this.committedExpression}));
272
- } else {
273
- deletePinIcon.setAccessibleName(i18nString(UIStrings.removeBlankExpression));
274
- }
275
- this.editor.setSelection(TextUtils.TextRange.TextRange.createFromLocation(Infinity, Infinity));
276
- });
277
- return this.editor;
278
- };
226
+ // Prevent Esc from toggling the drawer
227
+ nameElement.addEventListener('keydown', event => {
228
+ if (event.key === 'Escape') {
229
+ event.consume();
230
+ }
231
+ });
232
+ this.editorPromise = this.createEditor(expression, nameElement);
233
+ }
234
+
235
+ async createEditor(expression: string, parent: HTMLElement): Promise<TextEditor.TextEditor.TextEditor> {
236
+ const CM = await import('../../third_party/codemirror.next/codemirror.next.js');
237
+ const TE = await import('../../ui/components/text_editor/text_editor.js');
238
+ this.editor = new TE.TextEditor.TextEditor(CM.EditorState.create({
239
+ doc: expression,
240
+ extensions: [
241
+ CM.EditorView.contentAttributes.of({'aria-label': i18nString(UIStrings.liveExpressionEditor)}),
242
+ CM.EditorView.lineWrapping,
243
+ (await CM.javascript()).javascriptLanguage,
244
+ await TE.JavaScript.completion(),
245
+ TE.Config.showCompletionHint,
246
+ CM.placeholder(i18nString(UIStrings.expression)),
247
+ CM.keymap.of([
248
+ {
249
+ key: 'Escape',
250
+ run: (view: CodeMirror.EditorView): boolean => {
251
+ view.dispatch({changes: {from: 0, to: view.state.doc.length, insert: this.committedExpression}});
252
+ this.focusOut();
253
+ return true;
254
+ },
255
+ },
256
+ {
257
+ key: 'Mod-Enter',
258
+ run: (): boolean => {
259
+ this.focusOut();
260
+ return true;
261
+ },
262
+ },
263
+ ]),
264
+ CM.EditorView.domEventHandlers({blur: (_e, view) => this.onBlur(view)}),
265
+ TE.Config.baseConfiguration(expression),
266
+ ],
267
+ }));
268
+ parent.appendChild(this.editor);
269
+ return this.editor;
270
+ }
279
271
 
280
- const factory = TextEditor.CodeMirrorTextEditor.CodeMirrorTextEditorFactory.instance();
281
- this.editorPromise = Promise.resolve().then(() => createTextEditor(factory));
272
+ onBlur(editor: CodeMirror.EditorView): void {
273
+ const text = editor.state.doc.toString();
274
+ const trimmedText = text.trim();
275
+ this.committedExpression = trimmedText;
276
+ this.pinPane.savePins();
277
+ if (this.committedExpression.length) {
278
+ this.deletePinIcon.setAccessibleName(i18nString(UIStrings.removeExpressionS, {PH1: this.committedExpression}));
279
+ } else {
280
+ this.deletePinIcon.setAccessibleName(i18nString(UIStrings.removeBlankExpression));
281
+ }
282
+ editor.dispatch({
283
+ selection: {anchor: trimmedText.length},
284
+ changes: trimmedText !== text ? {from: 0, to: text.length, insert: trimmedText} : undefined,
285
+ });
282
286
  }
283
287
 
284
288
  setHovered(hovered: boolean): void {
@@ -300,9 +304,9 @@ export class ConsolePin {
300
304
  }
301
305
 
302
306
  async focus(): Promise<void> {
303
- const editor = await this.editorPromise;
304
- editor.widget().focus();
305
- editor.setSelection(TextUtils.TextRange.TextRange.createFromLocation(Infinity, Infinity));
307
+ const editor = this.editor || await this.editorPromise;
308
+ editor.editor.focus();
309
+ editor.editor.dispatch({selection: {anchor: editor.state.doc.length}});
306
310
  }
307
311
 
308
312
  appendToContextMenu(contextMenu: UI.ContextMenu.ContextMenu): void {
@@ -317,7 +321,8 @@ export class ConsolePin {
317
321
  if (!this.editor) {
318
322
  return;
319
323
  }
320
- const text = this.editor.textWithCurrentSuggestion().trim();
324
+ const TE = await import('../../ui/components/text_editor/text_editor.js');
325
+ const text = TE.Config.contentIncludingHint(this.editor.editor);
321
326
  const isEditing = this.pinElement.hasFocus();
322
327
  const throwOnSideEffect = isEditing && text !== this.committedExpression;
323
328
  const timeout = throwOnSideEffect ? 250 : undefined;
@@ -461,17 +461,9 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
461
461
  this.showSettingsPaneSetting.addChangeListener(
462
462
  () => settingsPane.element.classList.toggle('hidden', !this.showSettingsPaneSetting.get()));
463
463
 
464
- this.pinPane = new ConsolePinPane(liveExpressionButton);
464
+ this.pinPane = new ConsolePinPane(liveExpressionButton, () => this.prompt.focus());
465
465
  this.pinPane.element.classList.add('console-view-pinpane');
466
466
  this.pinPane.show(this.contentsElement);
467
- this.pinPane.element.addEventListener('keydown', event => {
468
- if ((event.key === 'Enter' &&
469
- UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey((event as KeyboardEvent))) ||
470
- event.keyCode === UI.KeyboardShortcut.Keys.Esc.code) {
471
- this.prompt.focus();
472
- event.consume();
473
- }
474
- });
475
467
 
476
468
  this.viewport = new ConsoleViewport(this);
477
469
  this.viewport.setStickToBottom(true);
@@ -62,12 +62,15 @@
62
62
  .console-pin-name,
63
63
  .console-pin-preview {
64
64
  width: 100%;
65
- overflow: hidden;
66
65
  text-overflow: ellipsis;
67
66
  white-space: nowrap;
68
67
  min-height: 13px;
69
68
  }
70
69
 
70
+ .console-pin-preview {
71
+ overflow: hidden;
72
+ }
73
+
71
74
  .console-delete-pin {
72
75
  position: absolute;
73
76
  top: 8px;
@@ -799,6 +799,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
799
799
  this.lastRevealedProperty = null;
800
800
  }
801
801
 
802
+ this.swatchPopoverHelper().reposition();
803
+
802
804
  // Record the elements tool load time after the sidepane has loaded.
803
805
  Host.userMetrics.panelLoaded('elements', 'DevTools.Launch.Elements');
804
806
 
@@ -1947,7 +1949,6 @@ export class StylePropertiesSection {
1947
1949
  } else {
1948
1950
  this.showAllButton.classList.add('hidden');
1949
1951
  }
1950
- this.parentPane.swatchPopoverHelper().reposition();
1951
1952
  }
1952
1953
 
1953
1954
  isPropertyOverloaded(property: SDK.CSSProperty.CSSProperty): boolean {
@@ -9,7 +9,6 @@
9
9
  }
10
10
 
11
11
  .security-main-view {
12
- user-select: text;
13
12
  overflow-x: hidden;
14
13
  overflow-y: auto;
15
14
  /* crbug.com/1152736 Consider moving --toolbar-bg-color to theme colors */
@@ -23,6 +22,7 @@
23
22
  .security-summary-section-title {
24
23
  font-size: 15px;
25
24
  margin: 12px 16px;
25
+ user-select: text;
26
26
  }
27
27
 
28
28
  .lock-spectrum {
@@ -109,6 +109,7 @@
109
109
  font-size: 15px;
110
110
  background: var(--color-background);
111
111
  border-color: var(--color-background-elevation-1);
112
+ user-select: text;
112
113
  }
113
114
 
114
115
  .security-summary-secure .triangle-pointer,
@@ -40,7 +40,8 @@ export class SnippetFileSystem extends Persistence.PlatformFileSystem.PlatformFi
40
40
  private readonly lastSnippetIdentifierSetting: Common.Settings.Setting<number>;
41
41
  private readonly snippetsSetting: Common.Settings.Setting<Snippet[]>;
42
42
  constructor() {
43
- super('snippet://', 'snippets');
43
+ // TODO(crbug.com/1253323): Cast to UrlString will be removed when migration to branded types is complete.
44
+ super('snippet://' as Platform.DevToolsPath.UrlString, 'snippets');
44
45
  this.lastSnippetIdentifierSetting =
45
46
  Common.Settings.Settings.instance().createSetting('scriptSnippets_lastIdentifier', 0);
46
47
  this.snippetsSetting = Common.Settings.Settings.instance().createSetting('scriptSnippets', []);
@@ -28,6 +28,8 @@
28
28
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
  */
30
30
 
31
+ // TODO(crbug.com/1253323): All casts to UrlString will be removed from this file when migration to branded types is complete.
32
+
31
33
  import * as Common from '../../core/common/common.js';
32
34
  import * as Host from '../../core/host/host.js';
33
35
  import * as i18n from '../../core/i18n/i18n.js';
@@ -848,8 +850,9 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
848
850
  }
849
851
 
850
852
  if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {
851
- const folderPath = Common.ParsedURL.ParsedURL.urlToPlatformPath(
852
- Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.completeURL(project, path),
853
+ const folderPath = Common.ParsedURL.ParsedURL.urlToRawPathString(
854
+ Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.completeURL(project, path) as
855
+ Platform.DevToolsPath.UrlString,
853
856
  Host.Platform.isWin());
854
857
  contextMenu.revealSection().appendItem(
855
858
  i18nString(UIStrings.openFolder),
@@ -1230,9 +1230,36 @@ export class RevealingActionDelegate implements UI.ActionRegistration.ActionDele
1230
1230
  return false;
1231
1231
  }
1232
1232
  switch (actionId) {
1233
- case 'debugger.toggle-pause':
1233
+ case 'debugger.toggle-pause': {
1234
+ // This action can be triggered both on the DevTools front-end itself,
1235
+ // or on the inspected target. If triggered on the DevTools front-end,
1236
+ // it will take care of resuming.
1237
+ //
1238
+ // If triggered on the target, NOT in hosted mode:
1239
+ // * ..and the paused overlay is enabled:
1240
+ // => do not take any action here, as the paused overlay will resume
1241
+ // * ..and the paused overlay is disabled:
1242
+ // => take care of the resume here
1243
+ // If triggered on the target in hosted mode:
1244
+ // * ..and the paused overlay is enabled:
1245
+ // => execution will not reach here, as shortcuts are not forwarded
1246
+ // and the paused overlay will resume
1247
+ // * ..and the paused overlay is disabled:
1248
+ // => overlay will not take care of resume, and neither will
1249
+ // DevTools as no shortcuts are forwarded from the target
1250
+
1251
+ // Do not trigger a resume action, if: the shortcut was forwarded and the
1252
+ // paused overlay is enabled.
1253
+ const actionHandledInPausedOverlay = context.flavor(UI.ShortcutRegistry.ForwardedShortcut) &&
1254
+ !Common.Settings.Settings.instance().moduleSetting('disablePausedStateOverlay').get();
1255
+ if (actionHandledInPausedOverlay) {
1256
+ // Taken care of by inspector overlay: handled set to true to
1257
+ // register user metric.
1258
+ return true;
1259
+ }
1234
1260
  panel.togglePause();
1235
1261
  return true;
1262
+ }
1236
1263
  }
1237
1264
  return false;
1238
1265
  }
@@ -523,10 +523,7 @@ UI.ActionRegistration.registerActionExtension({
523
523
  },
524
524
  contextTypes() {
525
525
  return maybeRetrieveContextTypes(
526
- Sources =>
527
- [Sources.SourcesView.SourcesView,
528
- UI.ShortcutRegistry.ForwardedShortcut,
529
- ]);
526
+ Sources => [Sources.SourcesView.SourcesView, UI.ShortcutRegistry.ForwardedShortcut]);
530
527
  },
531
528
  options: [
532
529
  {
@@ -26,13 +26,14 @@ export {bracketMatching} from '@codemirror/matchbrackets';
26
26
  export {Range, RangeSet, RangeSetBuilder} from '@codemirror/rangeset';
27
27
  export {selectNextOccurrence} from '@codemirror/search';
28
28
  export {
29
- Annotation, AnnotationType, Compartment, EditorSelection,
30
- EditorState, EditorStateConfig, Extension, Facet, Prec, SelectionRange,
31
- StateEffect, StateEffectType, StateField, Transaction, TransactionSpec
29
+ Annotation, AnnotationType, ChangeDesc, ChangeSet, ChangeSpec, Compartment,
30
+ EditorSelection, EditorState, EditorStateConfig, Extension, Facet, Prec,
31
+ SelectionRange, StateEffect, StateEffectType, StateField, Transaction,
32
+ TransactionSpec
32
33
  } from '@codemirror/state';
33
34
  export {StreamLanguage, StreamParser, StringStream} from '@codemirror/stream-parser';
34
35
  export {Line, Text, TextIterator} from '@codemirror/text';
35
- export {showTooltip, Tooltip, tooltips, TooltipView} from '@codemirror/tooltip';
36
+ export {hoverTooltip, showTooltip, Tooltip, tooltips, TooltipView} from '@codemirror/tooltip';
36
37
  export {
37
38
  Command, Decoration, DecorationSet, drawSelection, EditorView,
38
39
  highlightSpecialChars, KeyBinding, keymap, MatchDecorator, placeholder,
@@ -42,6 +43,7 @@ export {
42
43
  NodeProp, NodeSet, NodeType, Parser, SyntaxNode, Tree, TreeCursor
43
44
  } from '@lezer/common';
44
45
  export {LRParser} from '@lezer/lr';
46
+ export {StyleModule} from 'style-mod';
45
47
 
46
48
  export async function clojure() {
47
49
  return StreamLanguage.define((await import('@codemirror/legacy-modes/mode/clojure')).clojure);