chrome-devtools-frontend 1.0.946920 → 1.0.947377

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 (117) hide show
  1. package/.eslintrc.js +1 -0
  2. package/config/gni/all_devtools_files.gni +0 -7
  3. package/config/gni/devtools_grd_files.gni +1 -3
  4. package/front_end/.eslintrc.js +5 -1
  5. package/front_end/core/host/InspectorFrontendHost.ts +0 -3
  6. package/front_end/core/root/Runtime.ts +0 -4
  7. package/front_end/core/sdk/AccessibilityModel.ts +0 -2
  8. package/front_end/core/sdk/CSSProperty.ts +0 -2
  9. package/front_end/core/sdk/CSSRule.ts +0 -2
  10. package/front_end/core/sdk/Cookie.ts +1 -5
  11. package/front_end/core/sdk/EmulationModel.ts +0 -2
  12. package/front_end/core/sdk/HeapProfilerModel.ts +0 -2
  13. package/front_end/core/sdk/NetworkManager.ts +0 -3
  14. package/front_end/core/sdk/Resource.ts +0 -3
  15. package/front_end/core/sdk/ResourceTreeModel.ts +0 -3
  16. package/front_end/core/sdk/ServiceWorkerManager.ts +0 -2
  17. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -1
  18. package/front_end/entrypoints/inspector/{inspector.js → inspector.ts} +0 -3
  19. package/front_end/entrypoints/worker_app/{worker_app.js → worker_app.ts} +5 -2
  20. package/front_end/generated/InspectorBackendCommands.js +5 -1
  21. package/front_end/generated/protocol.d.ts +12 -0
  22. package/front_end/models/bindings/CompilerScriptMapping.ts +0 -1
  23. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -11
  24. package/front_end/models/bindings/SASSSourceMapping.ts +0 -1
  25. package/front_end/models/emulation/DeviceModeModel.ts +0 -2
  26. package/front_end/models/issues_manager/CorsIssue.ts +8 -0
  27. package/front_end/panels/animation/AnimationTimeline.ts +0 -2
  28. package/front_end/panels/animation/AnimationUI.ts +0 -2
  29. package/front_end/panels/application/BackForwardCacheStrings.ts +1 -0
  30. package/front_end/panels/css_overview/CSSOverviewModel.ts +0 -2
  31. package/front_end/panels/css_overview/CSSOverviewPanel.ts +0 -7
  32. package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +0 -2
  33. package/front_end/panels/issues/CorsIssueDetailsView.ts +6 -2
  34. package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -3
  35. package/front_end/panels/search/SearchView.ts +24 -4
  36. package/front_end/panels/sources/CSSPlugin.ts +3 -0
  37. package/front_end/panels/sources/CoveragePlugin.ts +2 -0
  38. package/front_end/panels/sources/DebuggerPlugin.ts +28 -4
  39. package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +3 -0
  40. package/front_end/panels/sources/ProfilePlugin.ts +3 -0
  41. package/front_end/panels/sources/UISourceCodeFrame.ts +11 -2
  42. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  43. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
  44. package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
  45. package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
  46. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
  47. package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
  48. package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
  49. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
  50. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
  51. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
  52. package/front_end/third_party/codemirror.next/package.json +1 -0
  53. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +168 -164
  54. package/front_end/third_party/lighthouse/locales/ar-XB.json +0 -3
  55. package/front_end/third_party/lighthouse/locales/ar.json +0 -3
  56. package/front_end/third_party/lighthouse/locales/bg.json +17 -20
  57. package/front_end/third_party/lighthouse/locales/ca.json +0 -3
  58. package/front_end/third_party/lighthouse/locales/cs.json +0 -3
  59. package/front_end/third_party/lighthouse/locales/da.json +16 -19
  60. package/front_end/third_party/lighthouse/locales/de.json +0 -3
  61. package/front_end/third_party/lighthouse/locales/el.json +0 -3
  62. package/front_end/third_party/lighthouse/locales/en-GB.json +19 -22
  63. package/front_end/third_party/lighthouse/locales/en-US.json +33 -3
  64. package/front_end/third_party/lighthouse/locales/en-XA.json +0 -3
  65. package/front_end/third_party/lighthouse/locales/en-XL.json +33 -3
  66. package/front_end/third_party/lighthouse/locales/es-419.json +17 -20
  67. package/front_end/third_party/lighthouse/locales/es.json +0 -3
  68. package/front_end/third_party/lighthouse/locales/fi.json +16 -19
  69. package/front_end/third_party/lighthouse/locales/fil.json +33 -36
  70. package/front_end/third_party/lighthouse/locales/fr.json +16 -19
  71. package/front_end/third_party/lighthouse/locales/he.json +16 -19
  72. package/front_end/third_party/lighthouse/locales/hi.json +0 -3
  73. package/front_end/third_party/lighthouse/locales/hr.json +16 -19
  74. package/front_end/third_party/lighthouse/locales/hu.json +16 -19
  75. package/front_end/third_party/lighthouse/locales/id.json +16 -19
  76. package/front_end/third_party/lighthouse/locales/it.json +37 -40
  77. package/front_end/third_party/lighthouse/locales/ja.json +16 -19
  78. package/front_end/third_party/lighthouse/locales/ko.json +16 -19
  79. package/front_end/third_party/lighthouse/locales/lt.json +17 -20
  80. package/front_end/third_party/lighthouse/locales/lv.json +0 -3
  81. package/front_end/third_party/lighthouse/locales/nl.json +16 -19
  82. package/front_end/third_party/lighthouse/locales/no.json +17 -20
  83. package/front_end/third_party/lighthouse/locales/pl.json +16 -19
  84. package/front_end/third_party/lighthouse/locales/pt-PT.json +37 -40
  85. package/front_end/third_party/lighthouse/locales/pt.json +16 -19
  86. package/front_end/third_party/lighthouse/locales/ro.json +0 -3
  87. package/front_end/third_party/lighthouse/locales/ru.json +16 -19
  88. package/front_end/third_party/lighthouse/locales/sk.json +0 -3
  89. package/front_end/third_party/lighthouse/locales/sl.json +0 -3
  90. package/front_end/third_party/lighthouse/locales/sr-Latn.json +16 -19
  91. package/front_end/third_party/lighthouse/locales/sr.json +16 -19
  92. package/front_end/third_party/lighthouse/locales/sv.json +17 -20
  93. package/front_end/third_party/lighthouse/locales/ta.json +0 -3
  94. package/front_end/third_party/lighthouse/locales/te.json +0 -3
  95. package/front_end/third_party/lighthouse/locales/th.json +0 -3
  96. package/front_end/third_party/lighthouse/locales/tr.json +0 -3
  97. package/front_end/third_party/lighthouse/locales/uk.json +17 -20
  98. package/front_end/third_party/lighthouse/locales/vi.json +0 -3
  99. package/front_end/third_party/lighthouse/locales/zh-HK.json +0 -3
  100. package/front_end/third_party/lighthouse/locales/zh-TW.json +0 -3
  101. package/front_end/third_party/lighthouse/locales/zh.json +0 -3
  102. package/front_end/third_party/lighthouse/report/bundle.d.ts +63 -61
  103. package/front_end/third_party/lighthouse/report/bundle.js +36 -7
  104. package/front_end/third_party/lighthouse/report-assets/report-generator.js +205 -192
  105. package/front_end/ui/components/text_editor/config.ts +5 -4
  106. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +40 -32
  107. package/front_end/ui/legacy/themeColors.css +1 -1
  108. package/package.json +1 -1
  109. package/scripts/check_gn.js +1 -1
  110. package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -4
  111. package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +4 -0
  112. package/front_end/entrypoints/inspector/inspector.json +0 -4
  113. package/front_end/entrypoints/worker_app/worker_app.json +0 -3
  114. package/front_end/panels/lighthouse/module.json +0 -6
  115. package/front_end/third_party/lighthouse/report-assets/report.d.ts +0 -1
  116. package/front_end/third_party/lighthouse/report-assets/report.js +0 -233
  117. package/front_end/third_party/lighthouse/report-assets/standalone-template.html +0 -38
package/.eslintrc.js CHANGED
@@ -106,6 +106,7 @@ module.exports = {
106
106
 
107
107
  // no-implicit-globals will prevent accidental globals
108
108
  'no-implicit-globals': [0],
109
+ 'no-unused-private-class-members': 2,
109
110
 
110
111
  // forbids interfaces starting with an I prefix.
111
112
  '@typescript-eslint/naming-convention':
@@ -7,10 +7,8 @@ import("../../scripts/build/ninja/vars.gni")
7
7
  all_devtools_files = [
8
8
  "front_end/entrypoints/shell/shell.js",
9
9
  "front_end/entrypoints/devtools_app/devtools_app.js",
10
- "front_end/entrypoints/inspector/inspector.js",
11
10
  "front_end/entrypoints/js_app/js_app.js",
12
11
  "front_end/entrypoints/ndb_app/ndb_app.js",
13
- "front_end/entrypoints/worker_app/worker_app.js",
14
12
  "front_end/legacy_test_runner/accessibility_test_runner/accessibility_test_runner.js",
15
13
  "front_end/legacy_test_runner/application_test_runner/application_test_runner.js",
16
14
  "front_end/legacy_test_runner/bindings_test_runner/bindings_test_runner.js",
@@ -21,7 +19,6 @@ all_devtools_files = [
21
19
  "front_end/legacy_test_runner/application_test_runner/ServiceWorkersTestRunner.js",
22
20
  "front_end/legacy_test_runner/application_test_runner/StorageTestRunner.js",
23
21
  "front_end/legacy_test_runner/lighthouse_test_runner/lighthouse_test_runner.js",
24
- "front_end/panels/lighthouse/module.json",
25
22
  "front_end/legacy_test_runner/axe_core_test_runner/axe_core_test_runner.js",
26
23
  "front_end/third_party/axe-core/axe.js",
27
24
  "front_end/legacy_test_runner/bindings_test_runner/AutomappingTestRunner.js",
@@ -44,8 +41,6 @@ all_devtools_files = [
44
41
  "front_end/legacy_test_runner/extensions_test_runner/ExtensionsNetworkTestRunner.js",
45
42
  "front_end/legacy_test_runner/extensions_test_runner/ExtensionsTestRunner.js",
46
43
  "front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js",
47
- "front_end/entrypoints/inspector/inspector.js",
48
- "front_end/entrypoints/inspector/inspector.json",
49
44
  "front_end/legacy_test_runner/layers_test_runner/layers_test_runner.js",
50
45
  "front_end/entrypoints/ndb_app/ndb_app.json",
51
46
  "front_end/legacy_test_runner/network_test_runner/network_test_runner.js",
@@ -118,8 +113,6 @@ all_devtools_files = [
118
113
  "front_end/legacy_test_runner/sources_test_runner/LiveEditTestRunner.js",
119
114
  "front_end/legacy_test_runner/sources_test_runner/SearchTestRunner.js",
120
115
  "front_end/legacy_test_runner/sources_test_runner/SourcesTestRunner.js",
121
- "front_end/third_party/lighthouse/report-assets/report.js",
122
- "front_end/third_party/lighthouse/report-assets/standalone-template.html",
123
116
  ]
124
117
 
125
118
  lighthouse_locale_files = [
@@ -227,7 +227,6 @@ grd_files_release_sources = [
227
227
  "front_end/entrypoints/startup/startup.js",
228
228
  "front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js",
229
229
  "front_end/entrypoints/wasmparser_worker/wasmparser_worker.js",
230
- "front_end/entrypoints/worker_app/WorkerMain.js",
231
230
  "front_end/entrypoints/worker_app/worker_app.js",
232
231
  "front_end/inspector.html",
233
232
  "front_end/integration_test_runner.html",
@@ -376,7 +375,6 @@ grd_files_release_sources = [
376
375
  "front_end/panels/lighthouse/lighthouse-legacy.js",
377
376
  "front_end/panels/lighthouse/lighthouse-meta.js",
378
377
  "front_end/panels/lighthouse/lighthouse.js",
379
- "front_end/panels/lighthouse/lighthouse_module.js",
380
378
  "front_end/panels/media/media-meta.js",
381
379
  "front_end/panels/media/media.js",
382
380
  "front_end/panels/mobile_throttling/mobile_throttling-legacy.js",
@@ -655,6 +653,7 @@ grd_files_debug_sources = [
655
653
  "front_end/entrypoints/node_app/nodeConnectionsPanel.css.js",
656
654
  "front_end/entrypoints/startup/RuntimeInstantiator.js",
657
655
  "front_end/entrypoints/wasmparser_worker/WasmParserWorker.js",
656
+ "front_end/entrypoints/worker_app/WorkerMain.js",
658
657
  "front_end/generated/ARIAProperties.js",
659
658
  "front_end/generated/InspectorBackendCommands.js",
660
659
  "front_end/generated/SupportedCSSProperties.js",
@@ -1268,7 +1267,6 @@ grd_files_debug_sources = [
1268
1267
  "front_end/third_party/i18n/localized-string-set.js",
1269
1268
  "front_end/third_party/intl-messageformat/package/intl-messageformat.esm.js",
1270
1269
  "front_end/third_party/lighthouse/report-assets/report-generator.js",
1271
- "front_end/third_party/lighthouse/report-assets/report.js",
1272
1270
  "front_end/third_party/lighthouse/report/bundle.js",
1273
1271
  "front_end/third_party/lit-html/directive.js",
1274
1272
  "front_end/third_party/lit-html/directives.js",
@@ -9,7 +9,11 @@ rulesDirPlugin.RULES_DIR = path.join(__dirname, '..', 'scripts', 'eslint_rules',
9
9
  module.exports = {
10
10
  'rules': {
11
11
  // L10n rules are only relevant in 'front_end'.
12
- 'rulesdir/l10n_filename_matches': 2,
12
+ 'rulesdir/l10n_filename_matches': [
13
+ 2, {
14
+ rootFrontendDirectory: __dirname,
15
+ }
16
+ ],
13
17
  'rulesdir/l10n_i18nString_call_only_with_uistrings': 2,
14
18
  'rulesdir/l10n_no_i18nString_calls_module_instantiation': 2,
15
19
  'rulesdir/l10n_no_locked_or_placeholder_only_phrase': 2,
@@ -55,7 +55,6 @@ const MAX_RECORDED_HISTOGRAMS_SIZE = 100;
55
55
  export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
56
56
  readonly #urlsBeingSaved: Map<string, string[]>;
57
57
  events!: Common.EventTarget.EventTarget<EventTypes>;
58
- #windowVisible?: boolean;
59
58
 
60
59
  recordedEnumeratedHistograms: {actionName: EnumeratedHistogram, actionCode: number}[] = [];
61
60
  recordedPerformanceHistograms: {histogramName: string, duration: number}[] = [];
@@ -89,11 +88,9 @@ export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
89
88
  }
90
89
 
91
90
  bringToFront(): void {
92
- this.#windowVisible = true;
93
91
  }
94
92
 
95
93
  closeWindow(): void {
96
- this.#windowVisible = false;
97
94
  }
98
95
 
99
96
  setIsDocked(isDocked: boolean, callback: () => void): void {
@@ -68,13 +68,9 @@ export class Runtime {
68
68
  modulesMap: {
69
69
  [x: string]: Module,
70
70
  };
71
- readonly #descriptorsMap: {
72
- [x: string]: ModuleDescriptor,
73
- };
74
71
  private constructor(descriptors: ModuleDescriptor[]) {
75
72
  this.#modules = [];
76
73
  this.modulesMap = {};
77
- this.#descriptorsMap = {};
78
74
 
79
75
  for (const descriptor of descriptors) {
80
76
  this.registerModule(descriptor);
@@ -27,7 +27,6 @@ export interface CoreOrProtocolAxProperty {
27
27
 
28
28
  export class AccessibilityNode {
29
29
  readonly #accessibilityModelInternal: AccessibilityModel;
30
- readonly #agent: ProtocolProxyApi.AccessibilityApi;
31
30
  readonly #idInternal: Protocol.Accessibility.AXNodeId;
32
31
  readonly #backendDOMNodeIdInternal: Protocol.DOM.BackendNodeId|null;
33
32
  readonly #deferredDOMNodeInternal: DeferredDOMNode|null;
@@ -44,7 +43,6 @@ export class AccessibilityNode {
44
43
 
45
44
  constructor(accessibilityModel: AccessibilityModel, payload: Protocol.Accessibility.AXNode) {
46
45
  this.#accessibilityModelInternal = accessibilityModel;
47
- this.#agent = accessibilityModel.getAgent();
48
46
 
49
47
  this.#idInternal = payload.nodeId;
50
48
  accessibilityModel.setAXNodeForAXId(this.#idInternal, this);
@@ -27,7 +27,6 @@ export class CSSProperty {
27
27
  #active: boolean;
28
28
  #nameRangeInternal: TextUtils.TextRange.TextRange|null;
29
29
  #valueRangeInternal: TextUtils.TextRange.TextRange|null;
30
- readonly #invalidProperty: string|null;
31
30
  #invalidString?: Common.UIString.LocalizedString;
32
31
 
33
32
  constructor(
@@ -46,7 +45,6 @@ export class CSSProperty {
46
45
  this.#active = true;
47
46
  this.#nameRangeInternal = null;
48
47
  this.#valueRangeInternal = null;
49
- this.#invalidProperty = null;
50
48
  }
51
49
 
52
50
  static parsePayload(ownerStyle: CSSStyleDeclaration, index: number, payload: Protocol.CSS.CSSProperty): CSSProperty {
@@ -203,11 +203,9 @@ export class CSSStyleRule extends CSSRule {
203
203
  }
204
204
 
205
205
  export class CSSKeyframesRule {
206
- readonly #cssModel: CSSModel;
207
206
  readonly #animationName: CSSValue;
208
207
  readonly #keyframesInternal: CSSKeyframeRule[];
209
208
  constructor(cssModel: CSSModel, payload: Protocol.CSS.CSSKeyframesRule) {
210
- this.#cssModel = cssModel;
211
209
  this.#animationName = new CSSValue(payload.animationName);
212
210
  this.#keyframesInternal = payload.keyframes.map(keyframeRule => new CSSKeyframeRule(cssModel, keyframeRule));
213
211
  }
@@ -269,14 +269,10 @@ export enum Attributes {
269
269
  * included to make it clear which site under Application>Cookies should be opened when revealing a `CookieReference`.
270
270
  */
271
271
  export class CookieReference {
272
- readonly #name: string;
273
272
  readonly #domainInternal: string;
274
- readonly #path: string;
275
273
  readonly #contextUrlInternal: string|undefined;
276
- constructor(name: string, domain: string, path: string, contextUrl: string|undefined) {
277
- this.#name = name;
274
+ constructor(_name: string, domain: string, _path: string, contextUrl: string|undefined) {
278
275
  this.#domainInternal = domain;
279
- this.#path = path;
280
276
  this.#contextUrlInternal = contextUrl;
281
277
  }
282
278
 
@@ -15,7 +15,6 @@ import {SDKModel} from './SDKModel.js';
15
15
 
16
16
  export class EmulationModel extends SDKModel<void> {
17
17
  readonly #emulationAgent: ProtocolProxyApi.EmulationApi;
18
- readonly #pageAgent: ProtocolProxyApi.PageApi;
19
18
  readonly #deviceOrientationAgent: ProtocolProxyApi.DeviceOrientationApi;
20
19
  #cssModel: CSSModel|null;
21
20
  readonly #overlayModelInternal: OverlayModel|null;
@@ -31,7 +30,6 @@ export class EmulationModel extends SDKModel<void> {
31
30
  constructor(target: Target) {
32
31
  super(target);
33
32
  this.#emulationAgent = target.emulationAgent();
34
- this.#pageAgent = target.pageAgent();
35
33
  this.#deviceOrientationAgent = target.deviceOrientationAgent();
36
34
  this.#cssModel = target.model(CSSModel);
37
35
  this.#overlayModelInternal = target.model(OverlayModel);
@@ -15,7 +15,6 @@ import {SDKModel} from './SDKModel.js';
15
15
  export class HeapProfilerModel extends SDKModel<EventTypes> {
16
16
  #enabled: boolean;
17
17
  readonly #heapProfilerAgent: ProtocolProxyApi.HeapProfilerApi;
18
- readonly #memoryAgent: ProtocolProxyApi.MemoryApi;
19
18
  readonly #runtimeModelInternal: RuntimeModel;
20
19
  #samplingProfilerDepth: number;
21
20
 
@@ -24,7 +23,6 @@ export class HeapProfilerModel extends SDKModel<EventTypes> {
24
23
  target.registerHeapProfilerDispatcher(new HeapProfilerDispatcher(this));
25
24
  this.#enabled = false;
26
25
  this.#heapProfilerAgent = target.heapProfilerAgent();
27
- this.#memoryAgent = target.memoryAgent();
28
26
  this.#runtimeModelInternal = (target.model(RuntimeModel) as RuntimeModel);
29
27
  this.#samplingProfilerDepth = 0;
30
28
  }
@@ -1575,7 +1575,6 @@ class ExtraInfoBuilder {
1575
1575
  #requestExtraInfos: (ExtraRequestInfo|null)[];
1576
1576
  #responseExtraInfos: (ExtraResponseInfo|null)[];
1577
1577
  #finishedInternal: boolean;
1578
- #hasExtraInfo: boolean;
1579
1578
  #webBundleInfo: WebBundleInfo|null;
1580
1579
  #webBundleInnerRequestInfo: WebBundleInnerRequestInfo|null;
1581
1580
 
@@ -1584,7 +1583,6 @@ class ExtraInfoBuilder {
1584
1583
  this.#requestExtraInfos = [];
1585
1584
  this.#responseExtraInfos = [];
1586
1585
  this.#finishedInternal = false;
1587
- this.#hasExtraInfo = false;
1588
1586
  this.#webBundleInfo = null;
1589
1587
  this.#webBundleInnerRequestInfo = null;
1590
1588
  }
@@ -1595,7 +1593,6 @@ class ExtraInfoBuilder {
1595
1593
  }
1596
1594
 
1597
1595
  addRequestExtraInfo(info: ExtraRequestInfo): void {
1598
- this.#hasExtraInfo = true;
1599
1596
  this.#requestExtraInfos.push(info);
1600
1597
  this.sync(this.#requestExtraInfos.length - 1);
1601
1598
  }
@@ -52,7 +52,6 @@ export class Resource implements TextUtils.ContentProvider.ContentProvider {
52
52
  #lastModifiedInternal: Date|null;
53
53
  readonly #contentSizeInternal: number|null;
54
54
  #contentInternal!: string|null;
55
- #contentLoadError!: string|null;
56
55
  #contentEncodedInternal!: boolean;
57
56
  readonly #pendingContentCallbacks: ((arg0: Object|null) => void)[];
58
57
  #parsedURLInternal?: Common.ParsedURL.ParsedURL;
@@ -245,12 +244,10 @@ export class Resource implements TextUtils.ContentProvider.ContentProvider {
245
244
  {frameId: this.frameId as Protocol.Page.FrameId, url: this.url});
246
245
  const protocolError = response.getError();
247
246
  if (protocolError) {
248
- this.#contentLoadError = protocolError;
249
247
  this.#contentInternal = null;
250
248
  loadResult = {content: null, error: protocolError, isEncoded: false};
251
249
  } else {
252
250
  this.#contentInternal = response.content;
253
- this.#contentLoadError = null;
254
251
  loadResult = {content: response.content, isEncoded: response.base64Encoded};
255
252
  }
256
253
  this.#contentEncodedInternal = response.base64Encoded;
@@ -604,7 +604,6 @@ export class ResourceTreeFrame {
604
604
  #urlInternal: string;
605
605
  #domainAndRegistryInternal: string;
606
606
  #securityOriginInternal: string|null;
607
- #mimeType: string|null;
608
607
  #unreachableUrlInternal: string;
609
608
  #adFrameStatusInternal?: Protocol.Page.AdFrameStatus;
610
609
  #secureContextType: Protocol.Page.SecureContextType|null;
@@ -632,7 +631,6 @@ export class ResourceTreeFrame {
632
631
  this.#urlInternal = (payload && payload.url) || '';
633
632
  this.#domainAndRegistryInternal = (payload && payload.domainAndRegistry) || '';
634
633
  this.#securityOriginInternal = payload && payload.securityOrigin;
635
- this.#mimeType = payload && payload.mimeType;
636
634
  this.#unreachableUrlInternal = (payload && payload.unreachableUrl) || '';
637
635
  this.#adFrameStatusInternal = payload?.adFrameStatus;
638
636
  this.#secureContextType = payload && payload.secureContextType;
@@ -685,7 +683,6 @@ export class ResourceTreeFrame {
685
683
  this.#urlInternal = framePayload.url;
686
684
  this.#domainAndRegistryInternal = framePayload.domainAndRegistry;
687
685
  this.#securityOriginInternal = framePayload.securityOrigin;
688
- this.#mimeType = framePayload.mimeType;
689
686
  this.#unreachableUrlInternal = framePayload.unreachableUrl || '';
690
687
  this.#adFrameStatusInternal = framePayload?.adFrameStatus;
691
688
  this.#secureContextType = framePayload.secureContextType;
@@ -98,7 +98,6 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
98
98
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
99
99
 
100
100
  export class ServiceWorkerManager extends SDKModel<EventTypes> {
101
- readonly #lastAnonymousTargetId: number;
102
101
  readonly #agent: ProtocolProxyApi.ServiceWorkerApi;
103
102
  readonly #registrationsInternal: Map<string, ServiceWorkerRegistration>;
104
103
  #enabled: boolean;
@@ -111,7 +110,6 @@ export class ServiceWorkerManager extends SDKModel<EventTypes> {
111
110
  constructor(target: Target) {
112
111
  super(target);
113
112
  target.registerServiceWorkerDispatcher(new ServiceWorkerDispatcher(this));
114
- this.#lastAnonymousTargetId = 0;
115
113
  this.#agent = target.serviceWorkerAgent();
116
114
  this.#registrationsInternal = new Map();
117
115
  this.#enabled = false;
@@ -1,5 +1,4 @@
1
1
  {
2
2
  "modules" : [
3
- { "name": "panels/lighthouse" }
4
3
  ]
5
4
  }
@@ -3,6 +3,3 @@
3
3
  // found in the LICENSE file.
4
4
  import '../devtools_app/devtools_app.js';
5
5
  import '../../panels/screencast/screencast-meta.js';
6
- import * as Startup from '../startup/startup.js';
7
-
8
- Startup.RuntimeInstantiator.startApplication('inspector');
@@ -14,8 +14,11 @@ import '../../panels/application/application-meta.js';
14
14
  import '../../panels/timeline/timeline-meta.js';
15
15
  import './WorkerMain.js';
16
16
 
17
+ import * as Root from '../../core/root/root.js';
17
18
  import * as Main from '../main/main.js';
18
- import * as Startup from '../startup/startup.js';
19
19
 
20
+ const runtimeInstance = Root.Runtime.Runtime.instance({forceNew: true, moduleDescriptors: []});
21
+ // @ts-ignore Exposed for legacy layout tests
22
+ self.runtime = runtimeInstance;
20
23
  new Main.MainImpl.MainImpl();
21
- Startup.RuntimeInstantiator.startApplication('worker_app');
24
+ Root.Runtime.appStartedPromiseCallback();
@@ -1542,6 +1542,8 @@ export function registerCommands(inspectorBackend) {
1542
1542
  PreflightInvalidAllowCredentials: 'PreflightInvalidAllowCredentials',
1543
1543
  PreflightMissingAllowExternal: 'PreflightMissingAllowExternal',
1544
1544
  PreflightInvalidAllowExternal: 'PreflightInvalidAllowExternal',
1545
+ PreflightMissingAllowPrivateNetwork: 'PreflightMissingAllowPrivateNetwork',
1546
+ PreflightInvalidAllowPrivateNetwork: 'PreflightInvalidAllowPrivateNetwork',
1545
1547
  InvalidAllowMethodsPreflightResponse: 'InvalidAllowMethodsPreflightResponse',
1546
1548
  InvalidAllowHeadersPreflightResponse: 'InvalidAllowHeadersPreflightResponse',
1547
1549
  MethodDisallowedByPreflightResponse: 'MethodDisallowedByPreflightResponse',
@@ -2203,6 +2205,7 @@ export function registerCommands(inspectorBackend) {
2203
2205
  ContentWebUSB: 'ContentWebUSB',
2204
2206
  ContentMediaSession: 'ContentMediaSession',
2205
2207
  ContentMediaSessionService: 'ContentMediaSessionService',
2208
+ ContentScreenReader: 'ContentScreenReader',
2206
2209
  EmbedderPopupBlockerTabHelper: 'EmbedderPopupBlockerTabHelper',
2207
2210
  EmbedderSafeBrowsingTriggeredPopupBlocker: 'EmbedderSafeBrowsingTriggeredPopupBlocker',
2208
2211
  EmbedderSafeBrowsingThreatDetails: 'EmbedderSafeBrowsingThreatDetails',
@@ -2686,7 +2689,8 @@ export function registerCommands(inspectorBackend) {
2686
2689
  [
2687
2690
  {'name': 'disposeOnDetach', 'type': 'boolean', 'optional': true},
2688
2691
  {'name': 'proxyServer', 'type': 'string', 'optional': true},
2689
- {'name': 'proxyBypassList', 'type': 'string', 'optional': true}
2692
+ {'name': 'proxyBypassList', 'type': 'string', 'optional': true},
2693
+ {'name': 'originsWithUniversalNetworkAccess', 'type': 'object', 'optional': true}
2690
2694
  ],
2691
2695
  ['browserContextId']);
2692
2696
  inspectorBackend.registerCommand('Target.getBrowserContexts', [], ['browserContextIds']);
@@ -7174,6 +7174,8 @@ declare namespace Protocol {
7174
7174
  PreflightInvalidAllowCredentials = 'PreflightInvalidAllowCredentials',
7175
7175
  PreflightMissingAllowExternal = 'PreflightMissingAllowExternal',
7176
7176
  PreflightInvalidAllowExternal = 'PreflightInvalidAllowExternal',
7177
+ PreflightMissingAllowPrivateNetwork = 'PreflightMissingAllowPrivateNetwork',
7178
+ PreflightInvalidAllowPrivateNetwork = 'PreflightInvalidAllowPrivateNetwork',
7177
7179
  InvalidAllowMethodsPreflightResponse = 'InvalidAllowMethodsPreflightResponse',
7178
7180
  InvalidAllowHeadersPreflightResponse = 'InvalidAllowHeadersPreflightResponse',
7179
7181
  MethodDisallowedByPreflightResponse = 'MethodDisallowedByPreflightResponse',
@@ -10442,6 +10444,10 @@ declare namespace Protocol {
10442
10444
  * The fantasy font-family.
10443
10445
  */
10444
10446
  fantasy?: string;
10447
+ /**
10448
+ * The pictograph font-family.
10449
+ */
10450
+ pictograph?: string;
10445
10451
  }
10446
10452
 
10447
10453
  /**
@@ -10649,6 +10655,7 @@ declare namespace Protocol {
10649
10655
  ContentWebUSB = 'ContentWebUSB',
10650
10656
  ContentMediaSession = 'ContentMediaSession',
10651
10657
  ContentMediaSessionService = 'ContentMediaSessionService',
10658
+ ContentScreenReader = 'ContentScreenReader',
10652
10659
  EmbedderPopupBlockerTabHelper = 'EmbedderPopupBlockerTabHelper',
10653
10660
  EmbedderSafeBrowsingTriggeredPopupBlocker = 'EmbedderSafeBrowsingTriggeredPopupBlocker',
10654
10661
  EmbedderSafeBrowsingThreatDetails = 'EmbedderSafeBrowsingThreatDetails',
@@ -12892,6 +12899,11 @@ declare namespace Protocol {
12892
12899
  * Proxy bypass list, similar to the one passed to --proxy-bypass-list
12893
12900
  */
12894
12901
  proxyBypassList?: string;
12902
+ /**
12903
+ * An optional list of origins to grant unlimited cross-origin access to.
12904
+ * Parts of the URL other than those constituting origin are ignored.
12905
+ */
12906
+ originsWithUniversalNetworkAccess?: string[];
12895
12907
  }
12896
12908
 
12897
12909
  export interface CreateBrowserContextResponse extends ProtocolResponseWithError {
@@ -329,7 +329,6 @@ class Binding {
329
329
  readonly #project: ContentProviderBasedProject;
330
330
  readonly #url: string;
331
331
  referringSourceMaps: SDK.SourceMap.SourceMap[];
332
- readonly #activeSourceMap?: SDK.SourceMap.SourceMap|null;
333
332
  uiSourceCode: Workspace.UISourceCode.UISourceCode|null;
334
333
 
335
334
  constructor(project: ContentProviderBasedProject, url: string) {
@@ -614,15 +614,12 @@ class SourceScopeRemoteObject extends SDK.RemoteObject.RemoteObjectImpl {
614
614
  variables: Chrome.DevTools.Variable[];
615
615
  #callFrame: SDK.DebuggerModel.CallFrame;
616
616
  #plugin: DebuggerLanguagePlugin;
617
- readonly #location: Chrome.DevTools.RawLocation;
618
617
 
619
- constructor(
620
- callFrame: SDK.DebuggerModel.CallFrame, plugin: DebuggerLanguagePlugin, location: Chrome.DevTools.RawLocation) {
618
+ constructor(callFrame: SDK.DebuggerModel.CallFrame, plugin: DebuggerLanguagePlugin) {
621
619
  super(callFrame.debuggerModel.runtimeModel(), undefined, 'object', undefined, null);
622
620
  this.variables = [];
623
621
  this.#callFrame = callFrame;
624
622
  this.#plugin = plugin;
625
- this.#location = location;
626
623
  }
627
624
 
628
625
  async doGetProperties(ownProperties: boolean, accessorPropertiesOnly: boolean, _generatePreview: boolean):
@@ -691,18 +688,16 @@ export class SourceScope implements SDK.DebuggerModel.ScopeChainEntry {
691
688
  readonly #typeNameInternal: string;
692
689
  readonly #iconInternal: string|undefined;
693
690
  readonly #objectInternal: SourceScopeRemoteObject;
694
- readonly #nameInternal: string;
695
691
  readonly #startLocationInternal: SDK.DebuggerModel.Location|null;
696
692
  readonly #endLocationInternal: SDK.DebuggerModel.Location|null;
697
693
  constructor(
698
694
  callFrame: SDK.DebuggerModel.CallFrame, type: string, typeName: string, icon: string|undefined,
699
- plugin: DebuggerLanguagePlugin, location: Chrome.DevTools.RawLocation) {
695
+ plugin: DebuggerLanguagePlugin) {
700
696
  this.#callFrameInternal = callFrame;
701
697
  this.#typeInternal = type;
702
698
  this.#typeNameInternal = typeName;
703
699
  this.#iconInternal = icon;
704
- this.#objectInternal = new SourceScopeRemoteObject(callFrame, plugin, location);
705
- this.#nameInternal = type;
700
+ this.#objectInternal = new SourceScopeRemoteObject(callFrame, plugin);
706
701
  this.#startLocationInternal = null;
707
702
  this.#endLocationInternal = null;
708
703
  }
@@ -1154,7 +1149,7 @@ export class DebuggerLanguagePluginManager implements
1154
1149
  let scope = scopes.get(variable.scope);
1155
1150
  if (!scope) {
1156
1151
  const {type, typeName, icon} = await plugin.getScopeInfo(variable.scope);
1157
- scope = new SourceScope(callFrame, type, typeName, icon, plugin, location);
1152
+ scope = new SourceScope(callFrame, type, typeName, icon, plugin);
1158
1153
  scopes.set(variable.scope, scope);
1159
1154
  }
1160
1155
  scope.object().variables.push(variable);
@@ -1292,11 +1287,9 @@ export class DebuggerLanguagePluginManager implements
1292
1287
  }
1293
1288
 
1294
1289
  class ModelData {
1295
- readonly #debuggerModel: SDK.DebuggerModel.DebuggerModel;
1296
1290
  project: ContentProviderBasedProject;
1297
1291
  readonly uiSourceCodeToScripts: Map<Workspace.UISourceCode.UISourceCode, SDK.Script.Script[]>;
1298
1292
  constructor(debuggerModel: SDK.DebuggerModel.DebuggerModel, workspace: Workspace.Workspace.WorkspaceImpl) {
1299
- this.#debuggerModel = debuggerModel;
1300
1293
  this.project = new ContentProviderBasedProject(
1301
1294
  workspace, 'language_plugins::' + debuggerModel.target().id(), Workspace.Workspace.projectTypes.Network, '',
1302
1295
  false /* isServiceProject */);
@@ -165,7 +165,6 @@ class Binding {
165
165
  readonly #project: ContentProviderBasedProject;
166
166
  readonly #url: string;
167
167
  referringSourceMaps: SDK.SourceMap.TextSourceMap[];
168
- readonly #activeSourceMap?: SDK.SourceMap.TextSourceMap|null;
169
168
  uiSourceCode: Workspace.UISourceCode.UISourceCode|null;
170
169
 
171
170
  constructor(project: ContentProviderBasedProject, url: string) {
@@ -99,7 +99,6 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
99
99
  #touchMobile: boolean;
100
100
  #emulationModel: SDK.EmulationModel.EmulationModel|null;
101
101
  #onModelAvailable: (() => void)|null;
102
- #emulatedPageSize?: UI.Geometry.Size;
103
102
  #outlineRectInternal?: Rect;
104
103
 
105
104
  private constructor() {
@@ -622,7 +621,6 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
622
621
 
623
622
  let pageWidth: 0|number = screenSize.width - insets.left - insets.right;
624
623
  let pageHeight: 0|number = screenSize.height - insets.top - insets.bottom;
625
- this.#emulatedPageSize = new UI.Geometry.Size(pageWidth, pageHeight);
626
624
 
627
625
  const positionX = insets.left;
628
626
  const positionY = insets.top;
@@ -43,6 +43,8 @@ export enum IssueCode {
43
43
  NoCorsRedirectModeNotFollow = 'CorsIssue::NoCorsRedirectModeNotFollow',
44
44
  InvalidPrivateNetworkAccess = 'CorsIssue::InvalidPrivateNetworkAccess',
45
45
  UnexpectedPrivateNetworkAccess = 'CorsIssue::UnexpectedPrivateNetworkAccess',
46
+ PreflightMissingAllowPrivateNetwork = 'CorsIssue::PreflightMissingAllowPrivateNetwork',
47
+ PreflightInvalidAllowPrivateNetwork = 'CorsIssue::PreflightInvalidAllowPrivateNetwork',
46
48
  }
47
49
 
48
50
  function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
@@ -93,6 +95,10 @@ function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
93
95
  return IssueCode.InvalidPrivateNetworkAccess;
94
96
  case Protocol.Network.CorsError.UnexpectedPrivateNetworkAccess:
95
97
  return IssueCode.UnexpectedPrivateNetworkAccess;
98
+ case Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork:
99
+ return IssueCode.PreflightMissingAllowPrivateNetwork;
100
+ case Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork:
101
+ return IssueCode.PreflightInvalidAllowPrivateNetwork;
96
102
  }
97
103
  }
98
104
 
@@ -225,6 +231,8 @@ export class CorsIssue extends Issue<IssueCode> {
225
231
  case IssueCode.InvalidResponse:
226
232
  case IssueCode.InvalidPrivateNetworkAccess:
227
233
  case IssueCode.UnexpectedPrivateNetworkAccess:
234
+ case IssueCode.PreflightMissingAllowPrivateNetwork:
235
+ case IssueCode.PreflightInvalidAllowPrivateNetwork:
228
236
  return null;
229
237
  }
230
238
  }
@@ -107,7 +107,6 @@ export class AnimationTimeline extends UI.Widget.VBox implements SDK.TargetManag
107
107
  #uiAnimations: AnimationUI[];
108
108
  #groupBuffer: AnimationGroup[];
109
109
  readonly #previewMap: Map<AnimationGroup, AnimationGroupPreviewUI>;
110
- readonly #symbol: symbol;
111
110
  readonly #animationsMap: Map<string, AnimationImpl>;
112
111
  #timelineScrubberLine?: HTMLElement;
113
112
  #pauseButton?: UI.Toolbar.ToolbarToggle;
@@ -143,7 +142,6 @@ export class AnimationTimeline extends UI.Widget.VBox implements SDK.TargetManag
143
142
  this.#uiAnimations = [];
144
143
  this.#groupBuffer = [];
145
144
  this.#previewMap = new Map();
146
- this.#symbol = Symbol('animationTimeline');
147
145
  this.#animationsMap = new Map();
148
146
  SDK.TargetManager.TargetManager.instance().addModelListener(
149
147
  SDK.DOMModel.DOMModel, SDK.DOMModel.Events.NodeRemoved, this.nodeRemoved, this);
@@ -42,7 +42,6 @@ type CachedElement = {
42
42
  export class AnimationUI {
43
43
  #animationInternal: AnimationImpl;
44
44
  #timeline: AnimationTimeline;
45
- readonly #parentElement: Element;
46
45
  #keyframes?: KeyframeStyle[];
47
46
  #nameElement: HTMLElement;
48
47
  readonly #svg: Element;
@@ -62,7 +61,6 @@ export class AnimationUI {
62
61
  constructor(animation: AnimationImpl, timeline: AnimationTimeline, parentElement: Element) {
63
62
  this.#animationInternal = animation;
64
63
  this.#timeline = timeline;
65
- this.#parentElement = parentElement;
66
64
 
67
65
  const keyframesRule = this.#animationInternal.source().keyframesRule();
68
66
  if (keyframesRule) {
@@ -541,6 +541,7 @@ export const NotRestoredReasonDescription = {
541
541
  'ContentMediaSession': {name: i18nLazyString(UIStrings.contentMediaSession)},
542
542
  'ContentMediaSessionService': {name: i18nLazyString(UIStrings.contentMediaSessionService)},
543
543
  'ContentMediaPlay': {name: i18nLazyString(UIStrings.contentMediaPlay)},
544
+ 'ContentScreenReader': {name: i18n.i18n.lockedLazyString('ContentScreenReader')},
544
545
  'EmbedderPopupBlockerTabHelper': {name: i18n.i18n.lockedLazyString('EmbedderPopupBlockerTabHelper')},
545
546
  'EmbedderSafeBrowsingTriggeredPopupBlocker':
546
547
  {name: i18n.i18n.lockedLazyString('EmbedderSafeBrowsingTriggeredPopupBlocker')},
@@ -44,7 +44,6 @@ export interface GlobalStyleStats {
44
44
  export class CSSOverviewModel extends SDK.SDKModel.SDKModel<void> {
45
45
  readonly #runtimeAgent: ProtocolProxyApi.RuntimeApi;
46
46
  readonly #cssAgent: ProtocolProxyApi.CSSApi;
47
- readonly #domAgent: ProtocolProxyApi.DOMApi;
48
47
  readonly #domSnapshotAgent: ProtocolProxyApi.DOMSnapshotApi;
49
48
  readonly #overlayAgent: ProtocolProxyApi.OverlayApi;
50
49
 
@@ -53,7 +52,6 @@ export class CSSOverviewModel extends SDK.SDKModel.SDKModel<void> {
53
52
 
54
53
  this.#runtimeAgent = target.runtimeAgent();
55
54
  this.#cssAgent = target.cssAgent();
56
- this.#domAgent = target.domAgent();
57
55
  this.#domSnapshotAgent = target.domsnapshotAgent();
58
56
  this.#overlayAgent = target.overlayAgent();
59
57
  }
@@ -36,7 +36,6 @@ export class CSSOverviewPanel extends UI.Panel.Panel implements SDK.TargetManage
36
36
  #mediaQueries!: Map<string, Protocol.CSS.CSSMedia[]>;
37
37
  #unusedDeclarations!: Map<string, UnusedDeclaration[]>;
38
38
  #elementCount!: number;
39
- #cancelled?: boolean;
40
39
  #globalStyleStats!: GlobalStyleStats;
41
40
  #textColorContrastIssues!: Map<string, ContrastIssue[]>;
42
41
 
@@ -58,7 +57,6 @@ export class CSSOverviewPanel extends UI.Panel.Panel implements SDK.TargetManage
58
57
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.CaptureCssOverviewClicked);
59
58
  this.startOverview();
60
59
  }, this);
61
- this.#controller.addEventListener(Events.RequestOverviewCancel, this.cancelOverview, this);
62
60
  this.#controller.addEventListener(Events.OverviewCompleted, this.overviewCompleted, this);
63
61
  this.#controller.addEventListener(Events.Reset, this.reset, this);
64
62
  this.#controller.addEventListener(Events.RequestNodeHighlight, this.requestNodeHighlight, this);
@@ -102,7 +100,6 @@ export class CSSOverviewPanel extends UI.Panel.Panel implements SDK.TargetManage
102
100
  this.#mediaQueries = new Map();
103
101
  this.#unusedDeclarations = new Map();
104
102
  this.#elementCount = 0;
105
- this.#cancelled = false;
106
103
  this.#globalStyleStats = {
107
104
  styleRules: 0,
108
105
  inlineStyles: 0,
@@ -223,10 +220,6 @@ export class CSSOverviewPanel extends UI.Panel.Panel implements SDK.TargetManage
223
220
  return item[0].value;
224
221
  }
225
222
 
226
- private cancelOverview(): void {
227
- this.#cancelled = true;
228
- }
229
-
230
223
  private overviewCompleted(): void {
231
224
  this.renderOverviewCompletedView();
232
225
  }
@@ -19,13 +19,11 @@ const UIStrings = {
19
19
  const str_ = i18n.i18n.registerUIStrings('panels/css_overview/CSSOverviewProcessingView.ts', UIStrings);
20
20
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
21
21
  export class CSSOverviewProcessingView extends UI.Widget.Widget {
22
- readonly #formatter: Intl.NumberFormat;
23
22
  readonly #controller: OverviewController;
24
23
  fragment?: UI.Fragment.Fragment;
25
24
  constructor(controller: OverviewController) {
26
25
  super();
27
26
 
28
- this.#formatter = new Intl.NumberFormat('en-US');
29
27
  this.#controller = controller;
30
28
  this.render();
31
29
  }