chrome-devtools-frontend 1.0.940255 → 1.0.942095

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 (133) hide show
  1. package/config/gni/all_devtools_files.gni +0 -13
  2. package/config/gni/devtools_grd_files.gni +13 -13
  3. package/config/gni/devtools_image_files.gni +1 -2
  4. package/front_end/.eslintrc.js +1 -0
  5. package/front_end/Images/src/feedback_button_icon.svg +3 -0
  6. package/front_end/Tests.js +15 -0
  7. package/front_end/core/common/Color.ts +5 -0
  8. package/front_end/core/i18n/locales/en-US.json +39 -30
  9. package/front_end/core/i18n/locales/en-XL.json +39 -30
  10. package/front_end/core/sdk/DOMDebuggerModel.ts +18 -1
  11. package/front_end/core/sdk/sdk-meta.ts +17 -3
  12. package/front_end/entrypoints/devtools_app/devtools_app.json +1 -7
  13. package/front_end/entrypoints/main/MainImpl.ts +26 -0
  14. package/front_end/entrypoints/shell/shell.js +0 -11
  15. package/front_end/entrypoints/shell/shell.json +0 -1
  16. package/front_end/entrypoints/worker_app/worker_app.json +0 -4
  17. package/front_end/generated/InspectorBackendCommands.js +1 -0
  18. package/front_end/generated/protocol.d.ts +2 -0
  19. package/front_end/global_typings/global_defs.d.ts +5 -0
  20. package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +14 -2
  21. package/front_end/legacy_test_runner/legacy_test_runner.ts +10 -1
  22. package/front_end/legacy_test_runner/test_runner/TestRunner.js +9 -0
  23. package/front_end/models/formatter/SourceFormatter.ts +0 -10
  24. package/front_end/models/workspace/UISourceCode.ts +9 -42
  25. package/front_end/panels/animation/AnimationTimeline.ts +3 -3
  26. package/front_end/panels/application/ApplicationPanelSidebar.ts +3 -3
  27. package/front_end/panels/application/application-meta.ts +0 -3
  28. package/front_end/panels/console/ConsolePinPane.ts +21 -26
  29. package/front_end/panels/coverage/CoverageDecorationManager.ts +4 -5
  30. package/front_end/panels/coverage/CoverageView.ts +2 -105
  31. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +11 -56
  32. package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -8
  33. package/front_end/panels/elements/ElementsTreeElement.ts +4 -9
  34. package/front_end/panels/elements/components/adornerSettingsPane.css +0 -4
  35. package/front_end/panels/emulation/emulation-meta.ts +2 -2
  36. package/front_end/panels/issues/IssueKindView.ts +22 -4
  37. package/front_end/panels/issues/issues-meta.ts +0 -2
  38. package/front_end/panels/layers/module.json +0 -1
  39. package/front_end/panels/lighthouse/lighthouseStartView.css +4 -0
  40. package/front_end/panels/media/media-meta.ts +0 -3
  41. package/front_end/panels/network/NetworkLogView.ts +3 -0
  42. package/front_end/panels/network/ResourceWebSocketFrameView.ts +2 -1
  43. package/front_end/panels/network/network-meta.ts +0 -3
  44. package/front_end/panels/profiler/module.json +1 -2
  45. package/front_end/panels/security/security-meta.ts +0 -3
  46. package/front_end/panels/sources/BreakpointEditDialog.ts +16 -30
  47. package/front_end/panels/sources/CSSPlugin.ts +310 -331
  48. package/front_end/panels/sources/CallStackSidebarPane.ts +28 -34
  49. package/front_end/panels/sources/CoveragePlugin.ts +121 -6
  50. package/front_end/panels/sources/DebuggerPlugin.ts +1166 -1243
  51. package/front_end/panels/sources/EditingLocationHistoryManager.ts +71 -101
  52. package/front_end/panels/sources/GoToLineQuickOpen.ts +4 -3
  53. package/front_end/panels/sources/InplaceFormatterEditorAction.ts +3 -3
  54. package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +26 -23
  55. package/front_end/panels/sources/Plugin.ts +20 -4
  56. package/front_end/panels/sources/ProfilePlugin.ts +185 -0
  57. package/front_end/panels/sources/ScriptFormatterEditorAction.ts +3 -3
  58. package/front_end/panels/sources/ScriptOriginPlugin.ts +0 -10
  59. package/front_end/panels/sources/SnippetsPlugin.ts +1 -10
  60. package/front_end/panels/sources/SourcesPanel.ts +15 -10
  61. package/front_end/panels/sources/SourcesView.ts +10 -8
  62. package/front_end/panels/sources/TabbedEditorContainer.ts +31 -27
  63. package/front_end/panels/sources/UISourceCodeFrame.ts +335 -470
  64. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
  65. package/front_end/panels/sources/sources-legacy.ts +0 -6
  66. package/front_end/panels/sources/sources.ts +0 -2
  67. package/front_end/panels/timeline/module.json +0 -2
  68. package/front_end/third_party/codemirror.next/bundle.ts +9 -13
  69. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  70. package/front_end/third_party/codemirror.next/chunk/javascript.js +2 -2
  71. package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -6
  72. package/front_end/third_party/codemirror.next/chunk/php.js +2 -6
  73. package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
  74. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
  75. package/front_end/third_party/codemirror.next/chunk/xml.js +2 -2
  76. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +279 -198
  77. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  78. package/front_end/third_party/codemirror.next/package.json +13 -11
  79. package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +60 -68
  80. package/front_end/ui/components/data_grid/dataGrid.css +12 -10
  81. package/front_end/ui/components/docs/css_overview/start_view.html +25 -0
  82. package/front_end/ui/components/docs/css_overview/start_view.ts +14 -0
  83. package/front_end/ui/components/docs/panel_feedback/basic.html +25 -0
  84. package/front_end/ui/components/docs/panel_feedback/basic.ts +20 -0
  85. package/front_end/ui/components/docs/panel_feedback/button.html +25 -0
  86. package/front_end/ui/components/docs/panel_feedback/button.ts +18 -0
  87. package/front_end/ui/components/helpers/get-stylesheet.ts +1 -0
  88. package/front_end/ui/components/panel_feedback/FeedbackButton.ts +67 -0
  89. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +100 -0
  90. package/front_end/ui/components/panel_feedback/panelFeedback.css +76 -0
  91. package/front_end/ui/components/panel_feedback/panel_feedback.ts +6 -0
  92. package/front_end/ui/components/report_view/reportValue.css +1 -0
  93. package/front_end/ui/components/text_editor/TextEditor.ts +79 -36
  94. package/front_end/ui/components/text_editor/config.ts +42 -26
  95. package/front_end/ui/components/text_editor/javascript.ts +2 -3
  96. package/front_end/ui/components/text_editor/position.ts +17 -0
  97. package/front_end/ui/components/text_editor/text_editor.ts +1 -0
  98. package/front_end/ui/components/text_editor/theme.ts +5 -1
  99. package/front_end/ui/legacy/Infobar.ts +2 -6
  100. package/front_end/ui/legacy/ShortcutRegistry.ts +11 -7
  101. package/front_end/ui/legacy/Widget.ts +1 -1
  102. package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +2 -1
  103. package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +3 -1
  104. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -1
  105. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +35 -131
  106. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +2 -1
  107. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +3 -1
  108. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -1
  109. package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +3 -6
  110. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +18 -14
  111. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +502 -252
  112. package/front_end/ui/legacy/components/source_frame/source_frame-legacy.ts +0 -11
  113. package/front_end/ui/legacy/components/source_frame/source_frame.ts +0 -2
  114. package/front_end/ui/legacy/components/text_editor/cmdevtools.css +3 -1
  115. package/front_end/ui/legacy/radioButton.css +1 -13
  116. package/front_end/ui/legacy/softContextMenu.css +1 -0
  117. package/front_end/ui/legacy/themeColors.css +36 -0
  118. package/front_end/ui/legacy/utils/append-style.ts +9 -4
  119. package/package.json +1 -1
  120. package/scripts/build/generate_css_js_files.js +23 -9
  121. package/scripts/build/ninja/generate_css.gni +10 -1
  122. package/scripts/eslint_rules/lib/check_css_import.js +2 -2
  123. package/scripts/eslint_rules/tests/check_css_import_test.js +12 -0
  124. package/front_end/Images/radioDot-dark-theme.png +0 -0
  125. package/front_end/Images/radioDot.png +0 -0
  126. package/front_end/panels/application/module.json +0 -7
  127. package/front_end/panels/issues/module.json +0 -6
  128. package/front_end/panels/layer_viewer/module.json +0 -6
  129. package/front_end/panels/media/module.json +0 -6
  130. package/front_end/panels/network/module.json +0 -6
  131. package/front_end/panels/security/module.json +0 -5
  132. package/front_end/ui/legacy/components/perf_ui/module.json +0 -13
  133. package/front_end/ui/legacy/components/source_frame/SourcesTextEditor.ts +0 -1030
@@ -5,8 +5,7 @@
5
5
  import * as i18n from '../../../core/i18n/i18n.js';
6
6
  import * as Buttons from '../../../ui/components/buttons/buttons.js';
7
7
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
8
- import * as IconButton from '../../../ui/components/icon_button/icon_button.js';
9
- import * as Legacy from '../../../ui/legacy/legacy.js';
8
+ import * as PanelFeedback from '../../../ui/components/panel_feedback/panel_feedback.js';
10
9
  import * as LitHtml from '../../../ui/lit-html/lit-html.js';
11
10
 
12
11
  import cssOverviewStartViewStyles from './cssOverviewStartView.css.js';
@@ -34,30 +33,9 @@ const UIStrings = {
34
33
  */
35
34
  locateAffectedElements: 'Locate the affected elements in the Elements panel',
36
35
  /**
37
- *@description Title of the "Preview feature" reminder box
38
- */
39
- previewFeature: 'Preview feature',
40
- /**
41
- *@description Sentence to convey the feature is being actively worked on and we are looking for feedback
42
- *@example {https://goo.gle/css-overview-feedback} PH1
43
- */
44
- activelyWorkingAndLookingForS: 'Our team is actively working on this feature and we are looking for your {PH1}!',
45
- /**
46
- *@description Link text of the inline anchor to navigate to a feedback page
47
- */
48
- feedbackInline: 'feedback',
49
- /**
50
- *@description Title of the section to the quick start video and documentation to CSS Overview panel
51
- */
52
- videoAndDocumentation: 'Video and documentation',
53
- /**
54
36
  *@description Title of the link to the quick start video and documentation to CSS Overview panel
55
37
  */
56
38
  quickStartWithCSSOverview: 'Quick start: get started with the new CSS Overview panel',
57
- /**
58
- *@description Link text of the standalone button to navigate to a feedback page
59
- */
60
- feedbackStandalone: 'Feedback',
61
39
  };
62
40
  const str_ = i18n.i18n.registerUIStrings('panels/css_overview/components/CSSOverviewStartView.ts', UIStrings);
63
41
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -77,13 +55,6 @@ export class OverviewStartRequestedEvent extends Event {
77
55
  export class CSSOverviewStartView extends HTMLElement {
78
56
  static readonly litTagName = LitHtml.literal`devtools-css-overview-start-view`;
79
57
  readonly #shadow = this.attachShadow({mode: 'open'});
80
- #feedbackLink: HTMLElement;
81
-
82
- constructor() {
83
- super();
84
- this.#feedbackLink =
85
- Legacy.XLink.XLink.create(FEEDBACK_LINK, i18nString(UIStrings.feedbackInline), 'devtools-link');
86
- }
87
58
 
88
59
  connectedCallback(): void {
89
60
  this.#shadow.adoptedStyleSheets = [cssOverviewStartViewStyles];
@@ -121,32 +92,16 @@ export class CSSOverviewStartView extends HTMLElement {
121
92
  ${i18nString(UIStrings.captureOverview)}
122
93
  </${Buttons.Button.Button.litTagName}>
123
94
  </div>
124
- <section class="preview-feature">
125
- <h1 class="preview-header">
126
- <${IconButton.Icon.Icon.litTagName} class="preview-icon" .data=${{
127
- iconName: 'ic_preview_feature',
128
- width: '24px',
129
- height: '24px',
130
- color: 'var(--color-primary)',
131
- } as IconButton.Icon.IconData}></${IconButton.Icon.Icon.litTagName}>
132
- ${i18nString(UIStrings.previewFeature)}
133
- </h1>
134
- <div class="feedback-prompt">${i18n.i18n.getFormatLocalizedString(str_, UIStrings.activelyWorkingAndLookingForS, {PH1: this.#feedbackLink})}</div>
135
- <div class="resources">
136
- <div class="thumbnail-wrapper">
137
- <${IconButton.Icon.Icon.litTagName} .data=${{
138
- iconName: 'preview_feature_video_thumbnail',
139
- width: '144px',
140
- height: '92px',
141
- } as IconButton.Icon.IconData}></${IconButton.Icon.Icon.litTagName}>
142
- </div>
143
- <div>
144
- <h1 class="video-doc-header">${i18nString(UIStrings.videoAndDocumentation)}</h1>
145
- <x-link class="devtools-link" href=${DOC_LINK}>${i18nString(UIStrings.quickStartWithCSSOverview)}</x-link>
146
- </div>
147
- </div>
148
- </section>
149
- <x-link class="feedback-standalone" href=${FEEDBACK_LINK}>${i18nString(UIStrings.feedbackStandalone)}</x-link>
95
+ <${PanelFeedback.PanelFeedback.PanelFeedback.litTagName} .data=${{
96
+ feedbackUrl: FEEDBACK_LINK,
97
+ quickStartUrl: DOC_LINK,
98
+ quickStartLinkText: i18nString(UIStrings.quickStartWithCSSOverview),
99
+ } as PanelFeedback.PanelFeedback.PanelFeedbackData}>
100
+ </${PanelFeedback.PanelFeedback.PanelFeedback.litTagName}>
101
+ <${PanelFeedback.FeedbackButton.FeedbackButton.litTagName} .data=${{
102
+ feedbackUrl: FEEDBACK_LINK,
103
+ } as PanelFeedback.FeedbackButton.FeedbackButtonData}>
104
+ </${PanelFeedback.FeedbackButton.FeedbackButton.litTagName}>
150
105
  </div>
151
106
  `, this.#shadow, {
152
107
  host: this,
@@ -120,15 +120,8 @@ h1 {
120
120
  margin-bottom: 2px;
121
121
  }
122
122
 
123
- .feedback-standalone {
124
- width: fit-content;
125
- padding: 0.5em;
123
+ devtools-feedback-button {
126
124
  align-self: flex-end;
127
- color: var(--color-primary);
128
- border: 1px solid var(--color-details-hairline);
129
- border-radius: 2px;
130
- text-decoration: none;
131
- font-weight: bold;
132
125
  }
133
126
 
134
127
  .resources .devtools-link {
@@ -38,10 +38,10 @@ import * as i18n from '../../core/i18n/i18n.js';
38
38
  import * as Platform from '../../core/platform/platform.js';
39
39
  import * as SDK from '../../core/sdk/sdk.js';
40
40
  import * as TextUtils from '../../models/text_utils/text_utils.js';
41
+ import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
41
42
  import * as Adorners from '../../ui/components/adorners/adorners.js';
42
43
  import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
43
-
44
- import type * as TextEditor from '../../ui/components/text_editor/text_editor.js';
44
+ import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
45
45
  import * as Components from '../../ui/legacy/components/utils/utils.js';
46
46
  import * as UI from '../../ui/legacy/legacy.js';
47
47
  import * as Emulation from '../emulation/emulation.js';
@@ -679,8 +679,6 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
679
679
  const isEditable = this.hasEditableNode();
680
680
  // clang-format off
681
681
  if (isEditable && !this.editing) {
682
- // Eagerly load CodeMirror to avoid a delay when opening the "Edit as HTML" editor when the user actually clicks on it
683
- import('../../ui/components/text_editor/text_editor.js');
684
682
  contextMenu.editSection().appendItem(i18nString(UIStrings.editAsHtml), this.editAsHTML.bind(this));
685
683
  }
686
684
  // clang-format on
@@ -1026,9 +1024,6 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
1026
1024
  }
1027
1025
  });
1028
1026
 
1029
- const TextEditor = await import('../../ui/components/text_editor/text_editor.js');
1030
- const CodeMirror = await import('../../third_party/codemirror.next/codemirror.next.js');
1031
- const {html} = await CodeMirror.html();
1032
1027
  const editor = new TextEditor.TextEditor.TextEditor(CodeMirror.EditorState.create({
1033
1028
  doc: initialValue,
1034
1029
  extensions: [
@@ -1050,8 +1045,8 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
1050
1045
  ]),
1051
1046
  TextEditor.Config.baseConfiguration(initialValue),
1052
1047
  TextEditor.Config.autocompletion,
1053
- html(),
1054
- TextEditor.Config.domWordWrap,
1048
+ CodeMirror.html.html(),
1049
+ TextEditor.Config.domWordWrap.instance(),
1055
1050
  CodeMirror.EditorView.theme({
1056
1051
  '&.cm-editor': {maxHeight: '300px'},
1057
1052
  '.cm-scroller': {overflowY: 'auto'},
@@ -65,7 +65,3 @@
65
65
  .close::after {
66
66
  transform: rotate(-45deg);
67
67
  }
68
-
69
- :host-context(.-theme-with-dark-background) input[type="checkbox"] {
70
- filter: invert(80%);
71
- }
@@ -47,11 +47,11 @@ const UIStrings = {
47
47
  /**
48
48
  *@description Command that shows measuring rulers next to the emulated device.
49
49
  */
50
- showRulers: 'Show rulers',
50
+ showRulers: 'Show rulers in the Device Mode toolbar',
51
51
  /**
52
52
  *@description Command that hides measuring rulers next to the emulated device.
53
53
  */
54
- hideRulers: 'Hide rulers',
54
+ hideRulers: 'Hide rulers in the Device Mode toolbar',
55
55
  /**
56
56
  *@description Command that shows a frame (like a picture frame) around the emulated device.
57
57
  */
@@ -14,10 +14,17 @@ import * as Components from './components/components.js';
14
14
 
15
15
  const UIStrings = {
16
16
  /**
17
- * @description Menu entry for hiding all current issues belonging to a particular kind.
18
- * @example {Page Errors} PH1
17
+ * @description Menu entry for hiding all current Page Errors.
19
18
  */
20
- hideAllCurrent: 'Hide all current {PH1}',
19
+ hideAllCurrentPageErrors: 'Hide all current Page Errors',
20
+ /**
21
+ * @description Menu entry for hiding all current Breaking Changes.
22
+ */
23
+ hideAllCurrentBreakingChanges: 'Hide all current Breaking Changes',
24
+ /**
25
+ * @description Menu entry for hiding all current Page Errors.
26
+ */
27
+ hideAllCurrentImprovements: 'Hide all current Improvements',
21
28
  };
22
29
  const str_ = i18n.i18n.registerUIStrings('panels/issues/IssueKindView.ts', UIStrings);
23
30
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -70,6 +77,17 @@ export class IssueKindView extends UI.TreeOutline.TreeElement {
70
77
  return this.kind;
71
78
  }
72
79
 
80
+ getHideAllCurrentKindString(): Common.UIString.LocalizedString {
81
+ switch (this.kind) {
82
+ case IssuesManager.Issue.IssueKind.PageError:
83
+ return i18nString(UIStrings.hideAllCurrentPageErrors);
84
+ case IssuesManager.Issue.IssueKind.Improvement:
85
+ return i18nString(UIStrings.hideAllCurrentImprovements);
86
+ case IssuesManager.Issue.IssueKind.BreakingChange:
87
+ return i18nString(UIStrings.hideAllCurrentBreakingChanges);
88
+ }
89
+ }
90
+
73
91
  private appendHeader(): void {
74
92
  const header = document.createElement('div');
75
93
  header.classList.add('header');
@@ -93,7 +111,7 @@ export class IssueKindView extends UI.TreeOutline.TreeElement {
93
111
  const hideAvailableIssuesBtn = new Components.HideIssuesMenu.HideIssuesMenu();
94
112
  hideAvailableIssuesBtn.classList.add('hide-available-issues');
95
113
  hideAvailableIssuesBtn.data = {
96
- menuItemLabel: i18nString(UIStrings.hideAllCurrent, {PH1: IssuesManager.Issue.getIssueKindName(this.kind)}),
114
+ menuItemLabel: this.getHideAllCurrentKindString(),
97
115
  menuItemAction: (): void => {
98
116
  const setting = IssuesManager.IssuesManager.getHideIssueByCodeSetting();
99
117
  const values = setting.get();
@@ -35,8 +35,6 @@ let loadedIssuesModule: (typeof Issues|undefined);
35
35
 
36
36
  async function loadIssuesModule(): Promise<typeof Issues> {
37
37
  if (!loadedIssuesModule) {
38
- // Side-effect import resources in module.json
39
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/issues');
40
38
  loadedIssuesModule = await import('./issues.js');
41
39
  }
42
40
  return loadedIssuesModule;
@@ -1,5 +1,4 @@
1
1
  {
2
2
  "dependencies": [
3
- "panels/layer_viewer"
4
3
  ]
5
4
  }
@@ -74,6 +74,10 @@ input[type="radio"]:focus {
74
74
  outline-width: 2px;
75
75
  }
76
76
 
77
+ :host-context(.-theme-with-dark-background) input[type="radio"] {
78
+ accent-color: var(--color-checkbox-accent-color);
79
+ }
80
+
77
81
  .lighthouse-radio-text {
78
82
  margin-left: 3px;
79
83
  }
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
- import * as Root from '../../core/root/root.js';
7
6
  import * as UI from '../../ui/legacy/legacy.js';
8
7
 
9
8
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -30,8 +29,6 @@ let loadedMediaModule: (typeof Media|undefined);
30
29
 
31
30
  async function loadMediaModule(): Promise<typeof Media> {
32
31
  if (!loadedMediaModule) {
33
- // Side-effect import resources in module.json
34
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/media');
35
32
  loadedMediaModule = await import('./media.js');
36
33
  }
37
34
  return loadedMediaModule;
@@ -1548,6 +1548,8 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
1548
1548
  footerSection.appendItem(i18nString(UIStrings.copyAllAsCurlCmd), this.copyAllCurlCommand.bind(this, 'win'));
1549
1549
  footerSection.appendItem(i18nString(UIStrings.copyAllAsCurlBash), this.copyAllCurlCommand.bind(this, 'unix'));
1550
1550
  } else {
1551
+ footerSection.appendItem(
1552
+ i18nString(UIStrings.copyAsPowershell), this.copyPowerShellCommand.bind(this, request), disableIfBlob);
1551
1553
  footerSection.appendItem(
1552
1554
  i18nString(UIStrings.copyAsFetch), this.copyFetchCall.bind(this, request, FetchStyle.Browser),
1553
1555
  disableIfBlob);
@@ -1556,6 +1558,7 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
1556
1558
  disableIfBlob);
1557
1559
  footerSection.appendItem(
1558
1560
  i18nString(UIStrings.copyAsCurl), this.copyCurlCommand.bind(this, request, 'unix'), disableIfBlob);
1561
+ footerSection.appendItem(i18nString(UIStrings.copyAllAsPowershell), this.copyAllPowerShellCommand.bind(this));
1559
1562
  footerSection.appendItem(
1560
1563
  i18nString(UIStrings.copyAllAsFetch), this.copyAllFetchCall.bind(this, FetchStyle.Browser));
1561
1564
  footerSection.appendItem(
@@ -331,7 +331,8 @@ export class ResourceWebSocketFrameView extends UI.Widget.VBox {
331
331
 
332
332
  this.splitWidget.setSidebarWidget(new SourceFrame.ResourceSourceFrame.ResourceSourceFrame(
333
333
  TextUtils.StaticContentProvider.StaticContentProvider.fromString(
334
- this.request.url(), Common.ResourceType.resourceTypes.WebSocket, content)));
334
+ this.request.url(), Common.ResourceType.resourceTypes.WebSocket, content),
335
+ ''));
335
336
  }
336
337
 
337
338
  private onFrameDeselected(): void {
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
- import * as Root from '../../core/root/root.js';
7
6
  import * as SDK from '../../core/sdk/sdk.js';
8
7
  import * as Workspace from '../../models/workspace/workspace.js';
9
8
  import * as NetworkForward from '../../panels/network/forward/forward.js';
@@ -117,8 +116,6 @@ let loadedNetworkModule: (typeof Network|undefined);
117
116
 
118
117
  async function loadNetworkModule(): Promise<typeof Network> {
119
118
  if (!loadedNetworkModule) {
120
- // Side-effect import resources in module.json
121
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/network');
122
119
  loadedNetworkModule = await import('./network.js');
123
120
  }
124
121
  return loadedNetworkModule;
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "dependencies": [
3
- "ui/legacy",
4
- "ui/legacy/components/perf_ui"
3
+ "ui/legacy"
5
4
  ]
6
5
  }
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
- import * as Root from '../../core/root/root.js';
7
6
  import * as UI from '../../ui/legacy/legacy.js';
8
7
 
9
8
  // eslint-disable-next-line rulesdir/es_modules_import
@@ -26,8 +25,6 @@ let loadedSecurityModule: (typeof Security|undefined);
26
25
 
27
26
  async function loadSecurityModule(): Promise<typeof Security> {
28
27
  if (!loadedSecurityModule) {
29
- // Side-effect import resources in module.json
30
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/security');
31
28
  loadedSecurityModule = await import('./security.js');
32
29
  }
33
30
  return loadedSecurityModule;
@@ -3,8 +3,8 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
- import type * as TextEditor from '../../ui/components/text_editor/text_editor.js';
7
- import type * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
6
+ import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
7
+ import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
8
8
  import * as UI from '../../ui/legacy/legacy.js';
9
9
 
10
10
  import breakpointEditDialogStyles from './breakpointEditDialog.css.js';
@@ -60,37 +60,23 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
60
60
  private readonly typeSelector: UI.Toolbar.ToolbarComboBox;
61
61
  private placeholderCompartment: CodeMirror.Compartment;
62
62
 
63
- static async create(
63
+ constructor(
64
64
  editorLineNumber: number,
65
65
  oldCondition: string,
66
66
  preferLogpoint: boolean,
67
67
  onFinish: (arg0: {committed: boolean, condition: string}) => Promise<void>,
68
- ): Promise<BreakpointEditDialog> {
69
- const TextEditor = await import('../../ui/components/text_editor/text_editor.js');
70
- const CodeMirror = await import('../../third_party/codemirror.next/codemirror.next.js');
68
+ ) {
69
+ super(true);
70
+
71
71
  const editorConfig = [
72
- (await CodeMirror.javascript()).javascriptLanguage,
72
+ CodeMirror.javascript.javascriptLanguage,
73
73
  TextEditor.Config.baseConfiguration(oldCondition || ''),
74
74
  TextEditor.Config.autocompletion,
75
75
  CodeMirror.EditorView.lineWrapping,
76
76
  TextEditor.Config.showCompletionHint,
77
- await TextEditor.JavaScript.completion(),
77
+ TextEditor.JavaScript.completion(),
78
78
  TextEditor.JavaScript.argumentHints(),
79
79
  ];
80
- return new BreakpointEditDialog(
81
- editorLineNumber, oldCondition, preferLogpoint, onFinish, TextEditor, CodeMirror, editorConfig);
82
- }
83
-
84
- constructor(
85
- editorLineNumber: number,
86
- oldCondition: string,
87
- preferLogpoint: boolean,
88
- onFinish: (arg0: {committed: boolean, condition: string}) => Promise<void>,
89
- modTextEditor: typeof TextEditor,
90
- readonly modCodeMirror: typeof CodeMirror,
91
- editorConfig: CodeMirror.Extension,
92
- ) {
93
- super(true);
94
80
 
95
81
  this.onFinish = onFinish;
96
82
  this.finished = false;
@@ -119,7 +105,7 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
119
105
 
120
106
  const content = oldCondition || '';
121
107
  const finishIfComplete = (view: CodeMirror.EditorView): boolean => {
122
- if (modTextEditor.JavaScript.isExpressionComplete(view.state)) {
108
+ if (TextEditor.JavaScript.isExpressionComplete(view.state)) {
123
109
  this.finishEditing(true, this.editor.state.doc.toString());
124
110
  return true;
125
111
  }
@@ -135,8 +121,8 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
135
121
  run: finishIfComplete,
136
122
  },
137
123
  {
138
- ...modCodeMirror.standardKeymap.find(binding => binding.key === 'Enter') as CodeMirror.KeyBinding,
139
124
  key: 'Shift-Enter',
125
+ run: CodeMirror.insertNewlineAndIndent,
140
126
  },
141
127
  {
142
128
  key: 'Escape',
@@ -147,17 +133,17 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
147
133
  },
148
134
  ];
149
135
 
150
- this.placeholderCompartment = new modCodeMirror.Compartment();
136
+ this.placeholderCompartment = new CodeMirror.Compartment();
151
137
 
152
138
  const editorWrapper = this.contentElement.appendChild(document.createElement('div'));
153
139
  editorWrapper.classList.add('condition-editor');
154
140
 
155
- this.editor = new modTextEditor.TextEditor.TextEditor(modCodeMirror.EditorState.create({
141
+ this.editor = new TextEditor.TextEditor.TextEditor(CodeMirror.EditorState.create({
156
142
  doc: content,
157
143
  selection: {anchor: 0, head: content.length},
158
144
  extensions: [
159
145
  this.placeholderCompartment.of(this.getPlaceholder()),
160
- modCodeMirror.keymap.of(keymap),
146
+ CodeMirror.keymap.of(keymap),
161
147
  editorConfig,
162
148
  ],
163
149
  }));
@@ -185,7 +171,7 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
185
171
  if (type === BreakpointType.Breakpoint) {
186
172
  this.finishEditing(true, '');
187
173
  } else {
188
- this.editor.editor.dispatch({effects: this.placeholderCompartment.reconfigure(this.getPlaceholder())});
174
+ this.editor.dispatch({effects: this.placeholderCompartment.reconfigure(this.getPlaceholder())});
189
175
  this.updateTooltip();
190
176
  }
191
177
  }
@@ -198,10 +184,10 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
198
184
  private getPlaceholder(): CodeMirror.Extension {
199
185
  const type = this.breakpointType;
200
186
  if (type === BreakpointType.Conditional) {
201
- return this.modCodeMirror.placeholder(i18nString(UIStrings.expressionToCheckBeforePausingEg));
187
+ return CodeMirror.placeholder(i18nString(UIStrings.expressionToCheckBeforePausingEg));
202
188
  }
203
189
  if (type === BreakpointType.Logpoint) {
204
- return this.modCodeMirror.placeholder(i18nString(UIStrings.logMessageEgXIsX));
190
+ return CodeMirror.placeholder(i18nString(UIStrings.logMessageEgXIsX));
205
191
  }
206
192
  return [];
207
193
  }