chrome-devtools-frontend 1.0.943017 → 1.0.944427

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 (224) hide show
  1. package/config/gni/all_devtools_files.gni +0 -9
  2. package/config/gni/devtools_grd_files.gni +6 -1
  3. package/front_end/core/host/UserMetrics.ts +0 -1
  4. package/front_end/core/i18n/locales/af.json +455 -44
  5. package/front_end/core/i18n/locales/am.json +455 -44
  6. package/front_end/core/i18n/locales/ar.json +455 -44
  7. package/front_end/core/i18n/locales/as.json +455 -44
  8. package/front_end/core/i18n/locales/az.json +455 -44
  9. package/front_end/core/i18n/locales/be.json +456 -45
  10. package/front_end/core/i18n/locales/bg.json +455 -44
  11. package/front_end/core/i18n/locales/bn.json +455 -44
  12. package/front_end/core/i18n/locales/bs.json +455 -44
  13. package/front_end/core/i18n/locales/ca.json +457 -46
  14. package/front_end/core/i18n/locales/cs.json +458 -47
  15. package/front_end/core/i18n/locales/cy.json +455 -44
  16. package/front_end/core/i18n/locales/da.json +455 -44
  17. package/front_end/core/i18n/locales/de.json +455 -44
  18. package/front_end/core/i18n/locales/el.json +455 -44
  19. package/front_end/core/i18n/locales/en-GB.json +449 -38
  20. package/front_end/core/i18n/locales/en-US.json +7 -19
  21. package/front_end/core/i18n/locales/en-XL.json +7 -19
  22. package/front_end/core/i18n/locales/es-419.json +455 -44
  23. package/front_end/core/i18n/locales/es.json +455 -44
  24. package/front_end/core/i18n/locales/et.json +455 -44
  25. package/front_end/core/i18n/locales/eu.json +462 -51
  26. package/front_end/core/i18n/locales/fa.json +455 -44
  27. package/front_end/core/i18n/locales/fi.json +455 -44
  28. package/front_end/core/i18n/locales/fil.json +454 -43
  29. package/front_end/core/i18n/locales/fr-CA.json +455 -44
  30. package/front_end/core/i18n/locales/fr.json +456 -45
  31. package/front_end/core/i18n/locales/gl.json +455 -44
  32. package/front_end/core/i18n/locales/gu.json +456 -45
  33. package/front_end/core/i18n/locales/he.json +455 -44
  34. package/front_end/core/i18n/locales/hi.json +455 -44
  35. package/front_end/core/i18n/locales/hr.json +455 -44
  36. package/front_end/core/i18n/locales/hu.json +455 -44
  37. package/front_end/core/i18n/locales/hy.json +455 -44
  38. package/front_end/core/i18n/locales/id.json +455 -44
  39. package/front_end/core/i18n/locales/is.json +455 -44
  40. package/front_end/core/i18n/locales/it.json +502 -91
  41. package/front_end/core/i18n/locales/ja.json +456 -45
  42. package/front_end/core/i18n/locales/ka.json +455 -44
  43. package/front_end/core/i18n/locales/kk.json +456 -45
  44. package/front_end/core/i18n/locales/km.json +455 -44
  45. package/front_end/core/i18n/locales/kn.json +455 -44
  46. package/front_end/core/i18n/locales/ko.json +455 -44
  47. package/front_end/core/i18n/locales/ky.json +456 -45
  48. package/front_end/core/i18n/locales/lo.json +454 -43
  49. package/front_end/core/i18n/locales/lt.json +455 -44
  50. package/front_end/core/i18n/locales/lv.json +458 -47
  51. package/front_end/core/i18n/locales/mk.json +455 -44
  52. package/front_end/core/i18n/locales/ml.json +461 -50
  53. package/front_end/core/i18n/locales/mn.json +455 -44
  54. package/front_end/core/i18n/locales/mr.json +455 -44
  55. package/front_end/core/i18n/locales/ms.json +455 -44
  56. package/front_end/core/i18n/locales/my.json +456 -45
  57. package/front_end/core/i18n/locales/ne.json +456 -45
  58. package/front_end/core/i18n/locales/nl.json +532 -121
  59. package/front_end/core/i18n/locales/no.json +455 -44
  60. package/front_end/core/i18n/locales/or.json +455 -44
  61. package/front_end/core/i18n/locales/pa.json +455 -44
  62. package/front_end/core/i18n/locales/pl.json +455 -44
  63. package/front_end/core/i18n/locales/pt-PT.json +504 -93
  64. package/front_end/core/i18n/locales/pt.json +454 -43
  65. package/front_end/core/i18n/locales/ro.json +455 -44
  66. package/front_end/core/i18n/locales/ru.json +455 -44
  67. package/front_end/core/i18n/locales/si.json +455 -44
  68. package/front_end/core/i18n/locales/sk.json +456 -45
  69. package/front_end/core/i18n/locales/sl.json +455 -44
  70. package/front_end/core/i18n/locales/sq.json +455 -44
  71. package/front_end/core/i18n/locales/sr-Latn.json +455 -44
  72. package/front_end/core/i18n/locales/sr.json +455 -44
  73. package/front_end/core/i18n/locales/sv.json +456 -45
  74. package/front_end/core/i18n/locales/sw.json +455 -44
  75. package/front_end/core/i18n/locales/ta.json +456 -45
  76. package/front_end/core/i18n/locales/te.json +454 -43
  77. package/front_end/core/i18n/locales/th.json +455 -44
  78. package/front_end/core/i18n/locales/tr.json +455 -44
  79. package/front_end/core/i18n/locales/uk.json +455 -44
  80. package/front_end/core/i18n/locales/ur.json +455 -44
  81. package/front_end/core/i18n/locales/uz.json +455 -44
  82. package/front_end/core/i18n/locales/vi.json +455 -44
  83. package/front_end/core/i18n/locales/zh-HK.json +459 -48
  84. package/front_end/core/i18n/locales/zh-TW.json +457 -46
  85. package/front_end/core/i18n/locales/zh.json +460 -49
  86. package/front_end/core/i18n/locales/zu.json +455 -44
  87. package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
  88. package/front_end/core/sdk/AccessibilityModel.ts +99 -78
  89. package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -0
  90. package/front_end/core/sdk/ConsoleModel.ts +1 -5
  91. package/front_end/core/sdk/NetworkManager.ts +3 -0
  92. package/front_end/core/sdk/OverlayModel.ts +0 -9
  93. package/front_end/core/sdk/Script.ts +0 -4
  94. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +13 -12
  95. package/front_end/core/sdk/sdk-meta.ts +0 -26
  96. package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +1 -1
  97. package/front_end/entrypoints/devtools_app/devtools_app.js +1 -1
  98. package/front_end/entrypoints/devtools_app/devtools_app.json +1 -2
  99. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -1
  100. package/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.ts +1 -1
  101. package/front_end/entrypoints/inspector/inspector.js +1 -1
  102. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +0 -13
  103. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +2 -3
  104. package/front_end/entrypoints/js_app/js_app.js +1 -1
  105. package/front_end/entrypoints/main/MainImpl.ts +2 -4
  106. package/front_end/entrypoints/main/main-meta.ts +1 -2
  107. package/front_end/entrypoints/ndb_app/ndb_app.js +1 -1
  108. package/front_end/entrypoints/node_app/node_app-meta.ts +0 -2
  109. package/front_end/entrypoints/node_app/node_app.js +1 -1
  110. package/front_end/entrypoints/node_main/node_main-meta.ts +0 -1
  111. package/front_end/entrypoints/shell/shell.json +1 -2
  112. package/front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.ts +1 -1
  113. package/front_end/entrypoints/worker_app/worker_app.js +1 -1
  114. package/front_end/generated/InspectorBackendCommands.js +3 -1
  115. package/front_end/generated/protocol-mapping.d.ts +1 -0
  116. package/front_end/generated/protocol-proxy-api.d.ts +2 -0
  117. package/front_end/generated/protocol.d.ts +40 -0
  118. package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +5 -1
  119. package/front_end/models/bindings/DefaultScriptMapping.ts +1 -9
  120. package/front_end/models/bindings/ResourceScriptMapping.ts +3 -11
  121. package/front_end/models/formatter/SourceFormatter.ts +0 -15
  122. package/front_end/models/persistence/persistence-meta.ts +0 -1
  123. package/front_end/models/timeline_model/TimelineJSProfile.ts +3 -16
  124. package/front_end/models/timeline_model/TimelineModel.ts +0 -1
  125. package/front_end/panels/accessibility/accessibility-meta.ts +0 -1
  126. package/front_end/panels/animation/animation-meta.ts +0 -1
  127. package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -1
  128. package/front_end/panels/application/BackForwardCacheView.ts +26 -26
  129. package/front_end/panels/application/application-meta.ts +0 -1
  130. package/front_end/panels/application/components/stackTraceRow.css +8 -0
  131. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +1 -2
  132. package/front_end/panels/changes/changes-meta.ts +0 -1
  133. package/front_end/panels/console/ConsolePinPane.ts +3 -6
  134. package/front_end/panels/console/ConsolePrompt.ts +121 -171
  135. package/front_end/panels/console/ConsoleView.ts +1 -1
  136. package/front_end/panels/console/ConsoleViewMessage.ts +8 -1
  137. package/front_end/panels/console/console-meta.ts +0 -1
  138. package/front_end/panels/console/consoleView.css +1 -1
  139. package/front_end/panels/console_counters/console_counters-meta.ts +0 -1
  140. package/front_end/panels/coverage/coverage-meta.ts +0 -1
  141. package/front_end/panels/css_overview/cssOverviewCompletedView.css +2 -2
  142. package/front_end/panels/css_overview/css_overview-meta.ts +0 -1
  143. package/front_end/panels/developer_resources/developer_resources-meta.ts +0 -1
  144. package/front_end/panels/elements/AccessibilityTreeUtils.ts +98 -67
  145. package/front_end/panels/elements/AccessibilityTreeView.ts +76 -125
  146. package/front_end/panels/elements/ElementsPanel.ts +6 -7
  147. package/front_end/panels/elements/ElementsTreeElement.ts +1 -0
  148. package/front_end/panels/elements/StyleEditorWidget.ts +13 -2
  149. package/front_end/panels/elements/StylePropertyHighlighter.ts +29 -19
  150. package/front_end/panels/elements/StylePropertyTreeElement.ts +7 -4
  151. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  152. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +27 -3
  153. package/front_end/panels/elements/elements-meta.ts +0 -1
  154. package/front_end/panels/emulation/emulation-meta.ts +0 -1
  155. package/front_end/panels/help/help-meta.ts +0 -1
  156. package/front_end/panels/input/input-meta.ts +0 -1
  157. package/front_end/panels/issues/issues-meta.ts +0 -1
  158. package/front_end/panels/js_profiler/js_profiler-meta.ts +0 -1
  159. package/front_end/panels/layers/layers-meta.ts +0 -4
  160. package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -1
  161. package/front_end/panels/media/media-meta.ts +0 -1
  162. package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +0 -1
  163. package/front_end/panels/network/NetworkDataGridNode.ts +5 -1
  164. package/front_end/panels/network/network-meta.ts +1 -2
  165. package/front_end/panels/performance_monitor/performance_monitor-meta.ts +0 -1
  166. package/front_end/panels/profiler/profiler-meta.ts +0 -1
  167. package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +0 -1
  168. package/front_end/panels/screencast/screencast-meta.ts +0 -1
  169. package/front_end/panels/security/security-meta.ts +0 -1
  170. package/front_end/panels/sensors/sensors-meta.ts +0 -1
  171. package/front_end/panels/settings/emulation/emulation-meta.ts +0 -1
  172. package/front_end/panels/settings/settings-meta.ts +0 -1
  173. package/front_end/panels/sources/BreakpointEditDialog.ts +1 -0
  174. package/front_end/panels/sources/Plugin.ts +0 -3
  175. package/front_end/panels/sources/UISourceCodeFrame.ts +23 -49
  176. package/front_end/panels/sources/sources-meta.ts +1 -2
  177. package/front_end/panels/timeline/TimelineController.ts +0 -3
  178. package/front_end/panels/timeline/timeline-meta.ts +2 -4
  179. package/front_end/panels/web_audio/web_audio-meta.ts +0 -1
  180. package/front_end/panels/webauthn/webauthn-meta.ts +0 -1
  181. package/front_end/third_party/codemirror.next/bundle.ts +3 -2
  182. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  183. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +32 -1
  184. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  185. package/front_end/third_party/codemirror.next/package.json +3 -3
  186. package/front_end/ui/components/docs/component_docs.ts +14 -0
  187. package/front_end/ui/components/docs/create_breadcrumbs.ts +1 -1
  188. package/front_end/ui/components/docs/toggle_dark_mode.ts +1 -0
  189. package/front_end/ui/components/docs/toggle_fonts.ts +2 -0
  190. package/front_end/ui/components/helpers/get-stylesheet.ts +0 -1
  191. package/front_end/ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -2
  192. package/front_end/ui/components/text_editor/config.ts +34 -14
  193. package/front_end/ui/components/text_editor/javascript.ts +14 -9
  194. package/front_end/ui/components/text_editor/theme.ts +29 -4
  195. package/front_end/ui/components/tree_outline/TreeOutline.ts +71 -8
  196. package/front_end/ui/components/tree_outline/TreeOutlineUtils.ts +8 -6
  197. package/front_end/ui/legacy/Dialog.ts +8 -3
  198. package/front_end/ui/legacy/SoftContextMenu.ts +1 -1
  199. package/front_end/ui/legacy/Treeoutline.ts +1 -1
  200. package/front_end/ui/legacy/UIUtils.ts +1 -1
  201. package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +1 -2
  202. package/front_end/ui/legacy/components/inline_editor/cssAngle.css +4 -0
  203. package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +2 -2
  204. package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -1
  205. package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +0 -1
  206. package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +2 -3
  207. package/front_end/ui/legacy/components/source_frame/FontView.ts +3 -1
  208. package/front_end/ui/legacy/components/source_frame/ImageView.ts +3 -1
  209. package/front_end/ui/legacy/components/source_frame/JSONView.ts +3 -1
  210. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +2 -1
  211. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +6 -4
  212. package/front_end/ui/legacy/components/source_frame/XMLView.ts +5 -2
  213. package/front_end/ui/legacy/components/utils/Linkifier.ts +49 -79
  214. package/front_end/ui/legacy/themeColors.css +2 -0
  215. package/inspector_overlay/css_grid_label_helpers.ts +1 -1
  216. package/inspector_overlay/highlight_common.ts +1 -1
  217. package/inspector_overlay/tool_highlight.ts +1 -1
  218. package/package.json +1 -1
  219. package/scripts/check_gn.js +0 -35
  220. package/scripts/eslint_rules/lib/es_modules_import.js +15 -24
  221. package/scripts/eslint_rules/tests/es_modules_import_test.js +8 -16
  222. package/front_end/panels/layers/module.json +0 -4
  223. package/front_end/ui/legacy/components/source_frame/messagesPopover.css +0 -32
  224. package/front_end/ui/legacy/components/source_frame/module.json +0 -11
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as i18n from '../../../core/i18n/i18n.js';
6
6
  import * as Platform from '../../../core/platform/platform.js';
7
+ import * as Protocol from '../../../generated/protocol.js';
7
8
 
8
9
  import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
9
10
  import * as Coordinator from '../../../ui/components/render_coordinator/render_coordinator.js';
@@ -31,10 +32,23 @@ function truncateTextIfNeeded(text: string): string {
31
32
  return text;
32
33
  }
33
34
 
35
+ function isPrintable(valueType: Protocol.Accessibility.AXValueType): boolean {
36
+ switch (valueType) {
37
+ case Protocol.Accessibility.AXValueType.Boolean:
38
+ case Protocol.Accessibility.AXValueType.BooleanOrUndefined:
39
+ case Protocol.Accessibility.AXValueType.String:
40
+ case Protocol.Accessibility.AXValueType.Number:
41
+ return true;
42
+ default:
43
+ return false;
44
+ }
45
+ }
46
+
34
47
  export interface AccessibilityTreeNodeData {
35
48
  ignored: boolean;
36
49
  name: string;
37
50
  role: string;
51
+ properties: Protocol.Accessibility.AXProperty[];
38
52
  }
39
53
 
40
54
  export class AccessibilityTreeNode extends HTMLElement {
@@ -44,11 +58,13 @@ export class AccessibilityTreeNode extends HTMLElement {
44
58
  private ignored = true;
45
59
  private name = '';
46
60
  private role = '';
61
+ private properties: Protocol.Accessibility.AXProperty[] = [];
47
62
 
48
63
  set data(data: AccessibilityTreeNodeData) {
49
64
  this.ignored = data.ignored;
50
65
  this.name = data.name;
51
66
  this.role = data.role;
67
+ this.properties = data.properties;
52
68
  this.render();
53
69
  }
54
70
 
@@ -57,12 +73,20 @@ export class AccessibilityTreeNode extends HTMLElement {
57
73
  }
58
74
 
59
75
  private async render(): Promise<void> {
76
+ const role = LitHtml.html`<span class='role-value'>${truncateTextIfNeeded(this.role)}</span>`;
77
+ const name = LitHtml.html`"<span class='attribute-value'>${this.name}</span>"`;
78
+ const properties = this.properties.map(
79
+ ({name, value}) => isPrintable(value.type) ?
80
+ LitHtml.html`&nbsp<span class='attribute-name'>${name}</span>:&nbsp<span class='attribute-value'>${
81
+ value.value}</span>` :
82
+ LitHtml.nothing);
83
+
60
84
  await Coordinator.RenderCoordinator.RenderCoordinator.instance().write('Accessibility node render', () => {
61
85
  // clang-format off
62
86
  LitHtml.render(
63
- LitHtml.html`${this.ignored?
64
- LitHtml.html`<span>${i18nString(UIStrings.ignored)}</span>`:
65
- LitHtml.html`<span class='role-value'>${truncateTextIfNeeded(this.role)}</span>&nbsp"<span class='attribute-value'>${this.name}</span>"`}`,
87
+ this.ignored ?
88
+ LitHtml.html`<span>${i18nString(UIStrings.ignored)}</span>` :
89
+ LitHtml.html`${role}&nbsp${name}${properties}`,
66
90
  this.shadow,
67
91
  {host: this});
68
92
  // clang-format on
@@ -7,7 +7,6 @@ import * as Root from '../../core/root/root.js';
7
7
  import * as SDK from '../../core/sdk/sdk.js';
8
8
  import * as UI from '../../ui/legacy/legacy.js';
9
9
 
10
- // eslint-disable-next-line rulesdir/es_modules_import
11
10
  import type * as Elements from './elements.js';
12
11
 
13
12
  import * as i18n from '../../core/i18n/i18n.js';
@@ -6,7 +6,6 @@ import * as Common from '../../core/common/common.js';
6
6
  import * as Root from '../../core/root/root.js';
7
7
  import * as UI from '../../ui/legacy/legacy.js';
8
8
 
9
- // eslint-disable-next-line rulesdir/es_modules_import
10
9
  import type * as Emulation from './emulation.js';
11
10
 
12
11
  import * as i18n from '../../core/i18n/i18n.js';
@@ -6,7 +6,6 @@ import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
7
  import * as UI from '../../ui/legacy/legacy.js';
8
8
 
9
- // eslint-disable-next-line rulesdir/es_modules_import
10
9
  import type * as Help from './help.js';
11
10
 
12
11
  const UIStrings = {
@@ -6,7 +6,6 @@ import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as Root from '../../core/root/root.js';
7
7
  import * as UI from '../../ui/legacy/legacy.js';
8
8
 
9
- // eslint-disable-next-line rulesdir/es_modules_import
10
9
  import type * as Input from './input.js';
11
10
 
12
11
  const UIStrings = {
@@ -7,7 +7,6 @@ import * as Root from '../../core/root/root.js';
7
7
  import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
8
8
  import * as UI from '../../ui/legacy/legacy.js';
9
9
 
10
- // eslint-disable-next-line rulesdir/es_modules_import
11
10
  import type * as Issues from './issues.js';
12
11
 
13
12
  import * as i18n from '../../core/i18n/i18n.js';
@@ -5,7 +5,6 @@
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as UI from '../../ui/legacy/legacy.js';
7
7
 
8
- // eslint-disable-next-line rulesdir/es_modules_import
9
8
  import type * as Profiler from '../profiler/profiler.js';
10
9
 
11
10
  const UIStrings = {
@@ -3,10 +3,8 @@
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
- // eslint-disable-next-line rulesdir/es_modules_import
10
8
  import type * as Layers from './layers.js';
11
9
 
12
10
  const UIStrings = {
@@ -26,8 +24,6 @@ let loadedLayersModule: (typeof Layers|undefined);
26
24
 
27
25
  async function loadLayersModule(): Promise<typeof Layers> {
28
26
  if (!loadedLayersModule) {
29
- // Side-effect import resources in module.json
30
- await Root.Runtime.Runtime.instance().loadModulePromise('panels/layers');
31
27
  loadedLayersModule = await import('./layers.js');
32
28
  }
33
29
  return loadedLayersModule;
@@ -6,7 +6,6 @@ import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as Root from '../../core/root/root.js';
7
7
  import * as UI from '../../ui/legacy/legacy.js';
8
8
 
9
- // eslint-disable-next-line rulesdir/es_modules_import
10
9
  import type * as Lighthouse from './lighthouse.js';
11
10
 
12
11
  const UIStrings = {
@@ -5,7 +5,6 @@
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as UI from '../../ui/legacy/legacy.js';
7
7
 
8
- // eslint-disable-next-line rulesdir/es_modules_import
9
8
  import type * as Media from './media.js';
10
9
 
11
10
  const UIStrings = {
@@ -6,7 +6,6 @@ import * as Common from '../../core/common/common.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
7
  import * as UI from '../../ui/legacy/legacy.js';
8
8
 
9
- // eslint-disable-next-line rulesdir/es_modules_import
10
9
  import type * as MobileThrottling from './mobile_throttling.js';
11
10
 
12
11
  const UIStrings = {
@@ -246,6 +246,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
246
246
  // TODO(crbug.com/1167717): Make this a const enum again
247
247
  // eslint-disable-next-line rulesdir/const_enum
248
248
  export enum Events {
249
+ // RequestSelected might fire twice for the same "activation"
249
250
  RequestSelected = 'RequestSelected',
250
251
  RequestActivated = 'RequestActivated',
251
252
  }
@@ -1007,7 +1008,10 @@ export class NetworkRequestNode extends NetworkNode {
1007
1008
  cell.style.setProperty('padding-left', leftPadding);
1008
1009
  this.nameCell = cell;
1009
1010
  cell.addEventListener('dblclick', this.openInNewTab.bind(this), false);
1010
- cell.addEventListener('click', () => {
1011
+ cell.addEventListener('mousedown', () => {
1012
+ // When the request panel isn't visible yet, firing the RequestActivated event
1013
+ // doesn't make it visible if no request is selected. So we'll select it first.
1014
+ this.select();
1011
1015
  this.parentView().dispatchEventToListeners(Events.RequestActivated, {showPanel: true});
1012
1016
  });
1013
1017
  let iconElement;
@@ -3,15 +3,14 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
+ import * as i18n from '../../core/i18n/i18n.js';
6
7
  import * as SDK from '../../core/sdk/sdk.js';
7
8
  import * as Workspace from '../../models/workspace/workspace.js';
8
9
  import * as NetworkForward from '../../panels/network/forward/forward.js';
9
10
  import * as UI from '../../ui/legacy/legacy.js';
10
11
 
11
- // eslint-disable-next-line rulesdir/es_modules_import
12
12
  import type * as Network from './network.js';
13
13
 
14
- import * as i18n from '../../core/i18n/i18n.js';
15
14
  const UIStrings = {
16
15
  /**
17
16
  *@description Command for showing the 'Network' tool
@@ -5,7 +5,6 @@
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as UI from '../../ui/legacy/legacy.js';
7
7
 
8
- // eslint-disable-next-line rulesdir/es_modules_import
9
8
  import type * as PerformanceMonitor from './performance_monitor.js';
10
9
 
11
10
  const UIStrings = {
@@ -8,7 +8,6 @@ import * as Root from '../../core/root/root.js';
8
8
  import * as SDK from '../../core/sdk/sdk.js';
9
9
  import * as UI from '../../ui/legacy/legacy.js';
10
10
 
11
- // eslint-disable-next-line rulesdir/es_modules_import
12
11
  import type * as Profiler from './profiler.js';
13
12
 
14
13
  let loadedProfilerModule: (typeof Profiler|undefined);
@@ -6,7 +6,6 @@ import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as Root from '../../core/root/root.js';
7
7
  import * as UI from '../../ui/legacy/legacy.js';
8
8
 
9
- // eslint-disable-next-line rulesdir/es_modules_import
10
9
  import type * as ProtocolMonitor from './protocol_monitor.js';
11
10
 
12
11
  const UIStrings = {
@@ -5,7 +5,6 @@
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as UI from '../../ui/legacy/legacy.js';
7
7
 
8
- // eslint-disable-next-line rulesdir/es_modules_import
9
8
  import type * as Screencast from './screencast.js';
10
9
 
11
10
  let loadedScreencastModule: (typeof Screencast|undefined);
@@ -5,7 +5,6 @@
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as UI from '../../ui/legacy/legacy.js';
7
7
 
8
- // eslint-disable-next-line rulesdir/es_modules_import
9
8
  import type * as Security from './security.js';
10
9
 
11
10
  const UIStrings = {
@@ -5,7 +5,6 @@
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as UI from '../../ui/legacy/legacy.js';
7
7
 
8
- // eslint-disable-next-line rulesdir/es_modules_import
9
8
  import type * as Sensors from './sensors.js';
10
9
 
11
10
  import * as i18n from '../../core/i18n/i18n.js';
@@ -5,7 +5,6 @@
5
5
  import * as i18n from '../../../core/i18n/i18n.js';
6
6
  import * as UI from '../../../ui/legacy/legacy.js';
7
7
 
8
- // eslint-disable-next-line rulesdir/es_modules_import
9
8
  import type * as Emulation from './emulation.js';
10
9
 
11
10
  const UIStrings = {
@@ -8,7 +8,6 @@ import * as i18n from '../../core/i18n/i18n.js';
8
8
  import * as Root from '../../core/root/root.js';
9
9
  import * as UI from '../../ui/legacy/legacy.js';
10
10
 
11
- // eslint-disable-next-line rulesdir/es_modules_import
12
11
  import type * as Settings from './settings.js';
13
12
 
14
13
  const UIStrings = {
@@ -71,6 +71,7 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
71
71
  const editorConfig = [
72
72
  CodeMirror.javascript.javascriptLanguage,
73
73
  TextEditor.Config.baseConfiguration(oldCondition || ''),
74
+ TextEditor.Config.closeBrackets,
74
75
  TextEditor.Config.autocompletion,
75
76
  CodeMirror.EditorView.lineWrapping,
76
77
  TextEditor.Config.showCompletionHint,
@@ -18,9 +18,6 @@ export class Plugin {
18
18
  return false;
19
19
  }
20
20
 
21
- wasShown(): void {
22
- }
23
-
24
21
  willHide(): void {
25
22
  }
26
23
 
@@ -70,13 +70,11 @@ export class UISourceCodeFrame extends
70
70
  SourceFrame.SourceFrame.SourceFrameImpl) {
71
71
  private uiSourceCodeInternal: Workspace.UISourceCode.UISourceCode;
72
72
  private muteSourceCodeEvents: boolean;
73
- private isSettingContent: boolean;
74
73
  private persistenceBinding: Persistence.Persistence.PersistenceBinding|null;
75
74
  private uiSourceCodeEventListeners: Common.EventTarget.EventDescriptor[];
76
75
  private messageAndDecorationListeners: Common.EventTarget.EventDescriptor[];
77
76
  private readonly boundOnBindingChanged: () => void;
78
77
  private plugins: Plugin[] = [];
79
- private pluginsLoaded = false;
80
78
  private readonly errorPopoverHelper: UI.PopoverHelper.PopoverHelper;
81
79
 
82
80
  constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode) {
@@ -84,7 +82,6 @@ export class UISourceCodeFrame extends
84
82
  this.uiSourceCodeInternal = uiSourceCode;
85
83
 
86
84
  this.muteSourceCodeEvents = false;
87
- this.isSettingContent = false;
88
85
 
89
86
  this.persistenceBinding = Persistence.Persistence.PersistenceImpl.instance().binding(uiSourceCode);
90
87
 
@@ -162,27 +159,24 @@ export class UISourceCodeFrame extends
162
159
  }
163
160
 
164
161
  setUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
165
- this.unloadUISourceCode();
166
- this.uiSourceCodeInternal = uiSourceCode;
167
- if (uiSourceCode.contentLoaded()) {
162
+ const loaded = uiSourceCode.contentLoaded() ? Promise.resolve() : uiSourceCode.requestContent();
163
+ const startUISourceCode = this.uiSourceCodeInternal;
164
+ loaded.then(() => {
165
+ if (this.uiSourceCodeInternal !== startUISourceCode) {
166
+ return;
167
+ }
168
+ this.unloadUISourceCode();
169
+ this.uiSourceCodeInternal = uiSourceCode;
168
170
  if (uiSourceCode.workingCopy() !== this.textEditor.state.doc.toString()) {
169
- this.innerSetContent(uiSourceCode.workingCopy());
171
+ this.setContent(uiSourceCode.workingCopy());
172
+ } else {
173
+ this.reloadPlugins();
170
174
  }
171
- } else {
172
- uiSourceCode.requestContent().then(() => {
173
- if (this.uiSourceCodeInternal !== uiSourceCode) {
174
- return;
175
- }
176
- if (uiSourceCode.workingCopy() !== this.textEditor.state.doc.toString()) {
177
- this.innerSetContent(uiSourceCode.workingCopy());
178
- }
179
- });
180
- }
181
- this.initializeUISourceCode();
175
+ this.initializeUISourceCode();
176
+ }, console.error);
182
177
  }
183
178
 
184
179
  private unloadUISourceCode(): void {
185
- this.disposePlugins();
186
180
  Common.EventTarget.removeEventListeners(this.messageAndDecorationListeners);
187
181
  Common.EventTarget.removeEventListeners(this.uiSourceCodeEventListeners);
188
182
  this.uiSourceCodeInternal.removeWorkingCopyGetter();
@@ -212,9 +206,6 @@ export class UISourceCodeFrame extends
212
206
  wasShown(): void {
213
207
  super.wasShown();
214
208
  this.setEditable(this.canEditSourceInternal());
215
- for (const plugin of this.plugins) {
216
- plugin.wasShown();
217
- }
218
209
  }
219
210
 
220
211
  willHide(): void {
@@ -277,16 +268,12 @@ export class UISourceCodeFrame extends
277
268
 
278
269
  async setContent(content: string): Promise<void> {
279
270
  this.disposePlugins();
280
- this.ensurePluginsLoaded();
271
+ this.loadPlugins();
281
272
  await super.setContent(content);
282
- Common.EventTarget.fireEvent('source-file-loaded', this.uiSourceCodeInternal.displayName(true));
283
- }
284
-
285
- protected editorInitialized(): void {
286
- super.editorInitialized();
287
273
  for (const plugin of this.plugins) {
288
274
  plugin.editorInitialized(this.textEditor);
289
275
  }
276
+ Common.EventTarget.fireEvent('source-file-loaded', this.uiSourceCodeInternal.displayName(true));
290
277
  }
291
278
 
292
279
  private allMessages(): Set<Workspace.UISourceCode.Message> {
@@ -302,9 +289,6 @@ export class UISourceCodeFrame extends
302
289
  const wasPretty = this.pretty;
303
290
  super.onTextChanged();
304
291
  this.errorPopoverHelper.hidePopover();
305
- if (this.isSettingContent) {
306
- return;
307
- }
308
292
  SourcesPanel.instance().updateLastModificationTime();
309
293
  this.muteSourceCodeEvents = true;
310
294
  if (this.isClean()) {
@@ -323,12 +307,12 @@ export class UISourceCodeFrame extends
323
307
  if (this.muteSourceCodeEvents) {
324
308
  return;
325
309
  }
326
- this.innerSetContent(this.uiSourceCodeInternal.workingCopy());
310
+ this.maybeSetContent(this.uiSourceCodeInternal.workingCopy());
327
311
  }
328
312
 
329
313
  private onWorkingCopyCommitted(): void {
330
314
  if (!this.muteSourceCodeEvents) {
331
- this.innerSetContent(this.uiSourceCode().workingCopy());
315
+ this.maybeSetContent(this.uiSourceCode().workingCopy());
332
316
  }
333
317
  this.contentCommitted();
334
318
  this.updateStyle();
@@ -336,7 +320,7 @@ export class UISourceCodeFrame extends
336
320
 
337
321
  private reloadPlugins(): void {
338
322
  this.disposePlugins();
339
- this.ensurePluginsLoaded();
323
+ this.loadPlugins();
340
324
  const editor = this.textEditor;
341
325
  editor.dispatch({effects: pluginCompartment.reconfigure(this.plugins.map(plugin => plugin.editorExtension()))});
342
326
  for (const plugin of this.plugins) {
@@ -348,12 +332,7 @@ export class UISourceCodeFrame extends
348
332
  this.updateLanguageMode('').then(() => this.reloadPlugins(), console.error);
349
333
  }
350
334
 
351
- private ensurePluginsLoaded(): void {
352
- if (this.pluginsLoaded) {
353
- return;
354
- }
355
- this.pluginsLoaded = true;
356
-
335
+ private loadPlugins(): void {
357
336
  const binding = Persistence.Persistence.PersistenceImpl.instance().binding(this.uiSourceCodeInternal);
358
337
  const pluginUISourceCode = binding ? binding.network : this.uiSourceCodeInternal;
359
338
 
@@ -364,9 +343,6 @@ export class UISourceCodeFrame extends
364
343
  }
365
344
 
366
345
  this.dispatchEventToListeners(Events.ToolbarItemsChanged);
367
- for (const plugin of this.plugins) {
368
- plugin.wasShown();
369
- }
370
346
  }
371
347
 
372
348
  private disposePlugins(): void {
@@ -374,7 +350,6 @@ export class UISourceCodeFrame extends
374
350
  plugin.dispose();
375
351
  }
376
352
  this.plugins = [];
377
- this.pluginsLoaded = false;
378
353
  }
379
354
 
380
355
  private onBindingChanged(): void {
@@ -385,19 +360,17 @@ export class UISourceCodeFrame extends
385
360
  this.unloadUISourceCode();
386
361
  this.persistenceBinding = binding;
387
362
  this.initializeUISourceCode();
363
+ this.reloadPlugins();
388
364
  }
389
365
 
390
366
  private updateStyle(): void {
391
367
  this.setEditable(this.canEditSourceInternal());
392
368
  }
393
369
 
394
- private innerSetContent(content: string): void {
395
- this.isSettingContent = true;
396
- const oldContent = this.textEditor.state.doc.toString();
397
- if (oldContent !== content) {
370
+ private maybeSetContent(content: string): void {
371
+ if (this.textEditor.state.doc.toString() !== content) {
398
372
  this.setContent(content);
399
373
  }
400
- this.isSettingContent = false;
401
374
  }
402
375
 
403
376
  protected populateTextAreaContextMenu(
@@ -422,6 +395,7 @@ export class UISourceCodeFrame extends
422
395
 
423
396
  dispose(): void {
424
397
  this.errorPopoverHelper.dispose();
398
+ this.disposePlugins();
425
399
  this.unloadUISourceCode();
426
400
  this.textEditor.editor.destroy();
427
401
  this.detach();
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
+ import * as i18n from '../../core/i18n/i18n.js';
6
7
  import * as Root from '../../core/root/root.js';
7
8
  import * as SDK from '../../core/sdk/sdk.js';
8
9
  import * as Workspace from '../../models/workspace/workspace.js';
@@ -10,10 +11,8 @@ import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
10
11
  import * as QuickOpen from '../../ui/legacy/components/quick_open/quick_open.js';
11
12
  import * as UI from '../../ui/legacy/legacy.js';
12
13
 
13
- // eslint-disable-next-line rulesdir/es_modules_import
14
14
  import type * as Sources from './sources.js';
15
15
 
16
- import * as i18n from '../../core/i18n/i18n.js';
17
16
  const UIStrings = {
18
17
  /**
19
18
  *@description Command for showing the 'Sources' tool
@@ -93,9 +93,6 @@ export class TimelineController implements SDK.TargetManager.SDKModelObserver<SD
93
93
  ];
94
94
  categoriesArray.push(TimelineModel.TimelineModel.TimelineModelImpl.Category.LatencyInfo);
95
95
 
96
- if (Root.Runtime.experiments.isEnabled('timelineV8RuntimeCallStats') && options.enableJSSampling) {
97
- categoriesArray.push(disabledByDefault('v8.runtime_stats_sampling'));
98
- }
99
96
  if (!Root.Runtime.Runtime.queryParam('timelineTracingJSProfileDisabled') && options.enableJSSampling) {
100
97
  categoriesArray.push(disabledByDefault('v8.cpu_profiler'));
101
98
  }
@@ -4,13 +4,11 @@
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as UI from '../../ui/legacy/legacy.js';
7
+ import type * as Profiler from '../profiler/profiler.js';
8
+ import * as i18n from '../../core/i18n/i18n.js';
7
9
 
8
- // eslint-disable-next-line rulesdir/es_modules_import
9
10
  import type * as Timeline from './timeline.js';
10
11
 
11
- import type * as Profiler from '../profiler/profiler.js';
12
-
13
- import * as i18n from '../../core/i18n/i18n.js';
14
12
  const UIStrings = {
15
13
  /**
16
14
  *@description Text for the performance of something
@@ -5,7 +5,6 @@
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as UI from '../../ui/legacy/legacy.js';
7
7
 
8
- // eslint-disable-next-line rulesdir/es_modules_import
9
8
  import type * as WebAudio from './web_audio.js';
10
9
 
11
10
  const UIStrings = {
@@ -6,7 +6,6 @@ import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as Root from '../../core/root/root.js';
7
7
  import * as UI from '../../ui/legacy/legacy.js';
8
8
 
9
- // eslint-disable-next-line rulesdir/es_modules_import
10
9
  import type * as Webauthn from './webauthn.js';
11
10
 
12
11
  const UIStrings = {
@@ -7,8 +7,9 @@
7
7
  import {StreamLanguage} from '@codemirror/stream-parser';
8
8
 
9
9
  export {
10
- acceptCompletion, autocompletion, completeAnyWord, Completion, CompletionContext,
11
- CompletionResult, CompletionSource, currentCompletions, ifNotIn
10
+ acceptCompletion, autocompletion, closeCompletion, completeAnyWord,
11
+ Completion, CompletionContext, CompletionResult, CompletionSource, currentCompletions,
12
+ ifNotIn, selectedCompletion, startCompletion,
12
13
  } from '@codemirror/autocomplete';
13
14
  export {closeBrackets, closeBracketsKeymap} from '@codemirror/closebrackets';
14
15
  export {