chrome-devtools-frontend 1.0.946920 → 1.0.948445

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 (201) hide show
  1. package/.eslintrc.js +1 -0
  2. package/config/gni/all_devtools_files.gni +1 -13
  3. package/config/gni/devtools_grd_files.gni +6 -9
  4. package/config/gni/devtools_image_files.gni +1 -0
  5. package/front_end/.eslintrc.js +6 -1
  6. package/front_end/Images/src/circled_backslash_icon.svg +3 -0
  7. package/front_end/core/host/InspectorFrontendHost.ts +0 -3
  8. package/front_end/core/host/UserMetrics.ts +1 -1
  9. package/front_end/core/i18n/locales/en-US.json +17 -14
  10. package/front_end/core/i18n/locales/en-XL.json +17 -14
  11. package/front_end/core/platform/platform.ts +0 -2
  12. package/front_end/core/platform/string-utilities.ts +14 -1
  13. package/front_end/core/platform/utilities.ts +0 -29
  14. package/front_end/core/root/Runtime.ts +4 -211
  15. package/front_end/core/sdk/AccessibilityModel.ts +0 -2
  16. package/front_end/core/sdk/CSSProperty.ts +0 -2
  17. package/front_end/core/sdk/CSSRule.ts +0 -2
  18. package/front_end/core/sdk/Cookie.ts +0 -25
  19. package/front_end/core/sdk/EmulationModel.ts +0 -2
  20. package/front_end/core/sdk/HeapProfilerModel.ts +0 -2
  21. package/front_end/core/sdk/NetworkManager.ts +0 -3
  22. package/front_end/core/sdk/Resource.ts +0 -3
  23. package/front_end/core/sdk/ResourceTreeModel.ts +0 -3
  24. package/front_end/core/sdk/ServiceWorkerManager.ts +0 -2
  25. package/front_end/core/sdk/sdk-legacy.ts +0 -3
  26. package/front_end/entrypoints/devtools_app/{devtools_app-meta-files.ts → devtools_app.ts} +9 -2
  27. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +2 -1
  28. package/front_end/entrypoints/inspector/{inspector.js → inspector.ts} +0 -3
  29. package/front_end/entrypoints/js_app/{JsMain.ts → js_app.ts} +5 -1
  30. package/front_end/entrypoints/main/MainImpl.ts +0 -1
  31. package/front_end/entrypoints/ndb_app/{ndb_app.js → ndb_app.ts} +0 -2
  32. package/front_end/entrypoints/node_app/node_app.ts +1 -3
  33. package/front_end/entrypoints/shell/{shell.js → shell.ts} +0 -2
  34. package/front_end/entrypoints/worker_app/{worker_app.js → worker_app.ts} +3 -2
  35. package/front_end/generated/InspectorBackendCommands.js +5 -1
  36. package/front_end/generated/protocol.d.ts +12 -0
  37. package/front_end/legacy/legacy-defs.d.ts +0 -4
  38. package/front_end/legacy_test_runner/test_runner/TestRunner.js +35 -59
  39. package/front_end/models/bindings/CompilerScriptMapping.ts +0 -1
  40. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -11
  41. package/front_end/models/bindings/SASSSourceMapping.ts +0 -1
  42. package/front_end/models/emulation/DeviceModeModel.ts +0 -2
  43. package/front_end/models/issues_manager/CorsIssue.ts +17 -9
  44. package/front_end/models/issues_manager/descriptions/{corsInsecurePrivateNetworkPreflight.md → corsPreflightAllowPrivateNetworkError.md} +1 -1
  45. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +3 -1
  46. package/front_end/panels/animation/AnimationTimeline.ts +0 -2
  47. package/front_end/panels/animation/AnimationUI.ts +0 -2
  48. package/front_end/panels/application/BackForwardCacheStrings.ts +2 -5
  49. package/front_end/panels/application/BackForwardCacheView.ts +150 -58
  50. package/front_end/panels/application/ResourcesPanel.ts +0 -42
  51. package/front_end/panels/application/application-legacy.ts +0 -3
  52. package/front_end/panels/application/application-meta.ts +0 -13
  53. package/front_end/panels/application/backForwardCacheView.css +44 -6
  54. package/front_end/panels/application/components/FrameDetailsView.ts +3 -3
  55. package/front_end/panels/application/components/OriginTrialTreeView.ts +3 -3
  56. package/front_end/panels/application/components/StackTrace.ts +1 -1
  57. package/front_end/panels/coverage/CoverageView.ts +1 -1
  58. package/front_end/panels/css_overview/CSSOverviewModel.ts +0 -2
  59. package/front_end/panels/css_overview/CSSOverviewPanel.ts +0 -7
  60. package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +0 -2
  61. package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -0
  62. package/front_end/panels/css_overview/cssOverviewCompletedView.css +1 -1
  63. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +2 -1
  64. package/front_end/panels/elements/ElementsPanel.ts +9 -1
  65. package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
  66. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
  67. package/front_end/panels/issues/CorsIssueDetailsView.ts +18 -2
  68. package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -3
  69. package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -0
  70. package/front_end/panels/profiler/CPUProfileFlameChart.ts +3 -1
  71. package/front_end/panels/profiler/ProfileDataGrid.ts +2 -1
  72. package/front_end/panels/search/SearchView.ts +24 -4
  73. package/front_end/panels/settings/components/SyncSection.ts +2 -2
  74. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +46 -46
  75. package/front_end/panels/sources/CSSPlugin.ts +3 -0
  76. package/front_end/panels/sources/CoveragePlugin.ts +2 -0
  77. package/front_end/panels/sources/DebuggerPlugin.ts +28 -4
  78. package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +3 -0
  79. package/front_end/panels/sources/ProfilePlugin.ts +3 -0
  80. package/front_end/panels/sources/UISourceCodeFrame.ts +11 -2
  81. package/front_end/panels/timeline/TimelineTreeView.ts +2 -1
  82. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  83. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
  84. package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
  85. package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
  86. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
  87. package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
  88. package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
  89. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
  90. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
  91. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
  92. package/front_end/third_party/codemirror.next/package.json +1 -0
  93. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +168 -164
  94. package/front_end/third_party/lighthouse/locales/ar-XB.json +0 -3
  95. package/front_end/third_party/lighthouse/locales/ar.json +0 -3
  96. package/front_end/third_party/lighthouse/locales/bg.json +17 -20
  97. package/front_end/third_party/lighthouse/locales/ca.json +0 -3
  98. package/front_end/third_party/lighthouse/locales/cs.json +0 -3
  99. package/front_end/third_party/lighthouse/locales/da.json +16 -19
  100. package/front_end/third_party/lighthouse/locales/de.json +0 -3
  101. package/front_end/third_party/lighthouse/locales/el.json +0 -3
  102. package/front_end/third_party/lighthouse/locales/en-GB.json +19 -22
  103. package/front_end/third_party/lighthouse/locales/en-US.json +33 -3
  104. package/front_end/third_party/lighthouse/locales/en-XA.json +0 -3
  105. package/front_end/third_party/lighthouse/locales/en-XL.json +33 -3
  106. package/front_end/third_party/lighthouse/locales/es-419.json +17 -20
  107. package/front_end/third_party/lighthouse/locales/es.json +0 -3
  108. package/front_end/third_party/lighthouse/locales/fi.json +16 -19
  109. package/front_end/third_party/lighthouse/locales/fil.json +33 -36
  110. package/front_end/third_party/lighthouse/locales/fr.json +16 -19
  111. package/front_end/third_party/lighthouse/locales/he.json +16 -19
  112. package/front_end/third_party/lighthouse/locales/hi.json +0 -3
  113. package/front_end/third_party/lighthouse/locales/hr.json +16 -19
  114. package/front_end/third_party/lighthouse/locales/hu.json +16 -19
  115. package/front_end/third_party/lighthouse/locales/id.json +16 -19
  116. package/front_end/third_party/lighthouse/locales/it.json +37 -40
  117. package/front_end/third_party/lighthouse/locales/ja.json +16 -19
  118. package/front_end/third_party/lighthouse/locales/ko.json +16 -19
  119. package/front_end/third_party/lighthouse/locales/lt.json +17 -20
  120. package/front_end/third_party/lighthouse/locales/lv.json +0 -3
  121. package/front_end/third_party/lighthouse/locales/nl.json +16 -19
  122. package/front_end/third_party/lighthouse/locales/no.json +17 -20
  123. package/front_end/third_party/lighthouse/locales/pl.json +16 -19
  124. package/front_end/third_party/lighthouse/locales/pt-PT.json +37 -40
  125. package/front_end/third_party/lighthouse/locales/pt.json +16 -19
  126. package/front_end/third_party/lighthouse/locales/ro.json +0 -3
  127. package/front_end/third_party/lighthouse/locales/ru.json +16 -19
  128. package/front_end/third_party/lighthouse/locales/sk.json +0 -3
  129. package/front_end/third_party/lighthouse/locales/sl.json +0 -3
  130. package/front_end/third_party/lighthouse/locales/sr-Latn.json +16 -19
  131. package/front_end/third_party/lighthouse/locales/sr.json +16 -19
  132. package/front_end/third_party/lighthouse/locales/sv.json +17 -20
  133. package/front_end/third_party/lighthouse/locales/ta.json +0 -3
  134. package/front_end/third_party/lighthouse/locales/te.json +0 -3
  135. package/front_end/third_party/lighthouse/locales/th.json +0 -3
  136. package/front_end/third_party/lighthouse/locales/tr.json +0 -3
  137. package/front_end/third_party/lighthouse/locales/uk.json +17 -20
  138. package/front_end/third_party/lighthouse/locales/vi.json +0 -3
  139. package/front_end/third_party/lighthouse/locales/zh-HK.json +0 -3
  140. package/front_end/third_party/lighthouse/locales/zh-TW.json +0 -3
  141. package/front_end/third_party/lighthouse/locales/zh.json +0 -3
  142. package/front_end/third_party/lighthouse/report/bundle.d.ts +63 -61
  143. package/front_end/third_party/lighthouse/report/bundle.js +36 -7
  144. package/front_end/third_party/lighthouse/report-assets/report-generator.js +205 -192
  145. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  146. package/front_end/ui/components/helpers/component-server-setup.ts +1 -12
  147. package/front_end/ui/components/helpers/helpers.ts +0 -2
  148. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  149. package/front_end/ui/components/issue_counter/IssueCounter.ts +2 -2
  150. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +3 -3
  151. package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
  152. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +98 -0
  153. package/front_end/ui/components/panel_feedback/panel_feedback.ts +1 -0
  154. package/front_end/ui/components/panel_feedback/previewToggle.css +24 -0
  155. package/front_end/ui/components/report_view/ReportView.ts +22 -0
  156. package/front_end/ui/components/report_view/reportSection.css +20 -0
  157. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
  158. package/front_end/ui/components/settings/SettingCheckbox.ts +2 -2
  159. package/front_end/ui/components/text_editor/config.ts +9 -7
  160. package/front_end/ui/components/text_editor/javascript.ts +8 -4
  161. package/front_end/ui/components/text_prompt/TextPrompt.ts +2 -2
  162. package/front_end/ui/legacy/GlassPane.ts +1 -1
  163. package/front_end/ui/legacy/SearchableView.ts +2 -1
  164. package/front_end/ui/legacy/Treeoutline.ts +1 -1
  165. package/front_end/ui/legacy/Widget.ts +1 -1
  166. package/front_end/ui/legacy/XWidget.ts +0 -5
  167. package/front_end/ui/legacy/components/inline_editor/CSSVarSwatch.ts +2 -2
  168. package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +1 -1
  169. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +40 -32
  170. package/front_end/ui/legacy/themeColors.css +1 -1
  171. package/front_end/ui/legacy/utils/append-style.ts +2 -13
  172. package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +7 -5
  173. package/package.json +2 -4
  174. package/scripts/build/build_inspector_overlay.py +15 -1
  175. package/scripts/build/rjsmin.py +84 -115
  176. package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -4
  177. package/scripts/eslint_rules/lib/lit_html_no_attribute_quotes.js +101 -0
  178. package/scripts/eslint_rules/lib/no_only_eslint_tests.js +53 -0
  179. package/scripts/eslint_rules/tests/.eslintrc.js +14 -0
  180. package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +4 -0
  181. package/scripts/eslint_rules/tests/lit_html_no_attribute_quotes_test.js +45 -0
  182. package/scripts/eslint_rules/tests/no_only_eslint_tests_test.js +94 -0
  183. package/front_end/entrypoints/devtools_app/devtools_app.js +0 -11
  184. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -5
  185. package/front_end/entrypoints/inspector/inspector.json +0 -4
  186. package/front_end/entrypoints/js_app/js_app.js +0 -12
  187. package/front_end/entrypoints/js_app/js_app.json +0 -3
  188. package/front_end/entrypoints/ndb_app/ndb_app.json +0 -4
  189. package/front_end/entrypoints/startup/RuntimeInstantiator.ts +0 -95
  190. package/front_end/entrypoints/startup/startup.ts +0 -9
  191. package/front_end/entrypoints/worker_app/worker_app.json +0 -3
  192. package/front_end/panels/lighthouse/module.json +0 -6
  193. package/front_end/third_party/lighthouse/report-assets/report.d.ts +0 -1
  194. package/front_end/third_party/lighthouse/report-assets/report.js +0 -233
  195. package/front_end/third_party/lighthouse/report-assets/standalone-template.html +0 -38
  196. package/front_end/ui/components/helpers/get-stylesheet.ts +0 -45
  197. package/scripts/build/build_release_applications.py +0 -216
  198. package/scripts/build/modular_build.py +0 -184
  199. package/scripts/check_gn.js +0 -119
  200. package/scripts/json_validator/module.schema.json +0 -19
  201. package/scripts/json_validator/validate_module_json.js +0 -44
@@ -1,9 +1,6 @@
1
1
  // Copyright 2020 The Chromium Authors. All rights reserved.
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
- interface StringConstructor {
5
- sprintf(format: string, ...var_arg: any): string;
6
- }
7
4
 
8
5
  interface Window {
9
6
  UI: {themeSupport: unknown}
@@ -124,7 +121,6 @@ interface Node {
124
121
 
125
122
  declare function isEnterOrSpaceKey(event: Event): boolean;
126
123
  declare function isEscKey(event: Event): boolean;
127
- declare function createPlainTextSearchRegex(query: string, flags?: string): RegExp;
128
124
  declare function onInvokeElement(element: Element, callback: (event: Event) => void): void;
129
125
 
130
126
  interface ServicePort {
@@ -23,6 +23,10 @@ self.Platform = self.Platform || {};
23
23
  self.Platform.StringUtilities = Platform.StringUtilities;
24
24
  self.Platform.MapUtilities = Platform.MapUtilities;
25
25
  self.Platform.ArrayUtilities = Platform.ArrayUtilities;
26
+ self.createPlainTextSearchRegex = Platform.StringUtilities.createPlainTextSearchRegex;
27
+ String.sprintf = Platform.StringUtilities.sprintf;
28
+ String.regexSpecialCharacters = Platform.StringUtilities.regexSpecialCharacters;
29
+ String.caseInsensetiveComparator = Platform.StringUtilities.caseInsensetiveComparator;
26
30
 
27
31
  /**
28
32
  * @return {boolean}
@@ -229,23 +233,36 @@ export function addSnifferPromise(receiver, methodName) {
229
233
  });
230
234
  }
231
235
 
232
- /** @type {function():void} */
233
- let _resolveOnFinishInits;
234
-
235
- /**
236
- * @param {string} module
237
- * @return {!Promise<undefined>}
238
- */
239
- export async function loadModule(module) {
240
- const promise = new Promise(resolve => {
241
- _resolveOnFinishInits = resolve;
242
- });
243
- await self.runtime.loadModulePromise(module);
244
- if (!_pendingInits) {
245
- return;
246
- }
247
- return promise;
248
- }
236
+ const mappingForLayoutTests = new Map([
237
+ ['panels/animation', 'animation'],
238
+ ['panels/browser_debugger', 'browser_debugger'],
239
+ ['panels/changes', 'changes'],
240
+ ['panels/console', 'console'],
241
+ ['panels/elements', 'elements'],
242
+ ['panels/emulation', 'emulation'],
243
+ ['panels/mobile_throttling', 'mobile_throttling'],
244
+ ['panels/network', 'network'],
245
+ ['panels/profiler', 'profiler'],
246
+ ['panels/application', 'resources'],
247
+ ['panels/search', 'search'],
248
+ ['panels/sources', 'sources'],
249
+ ['panels/snippets', 'snippets'],
250
+ ['panels/settings', 'settings'],
251
+ ['panels/timeline', 'timeline'],
252
+ ['panels/web_audio', 'web_audio'],
253
+ ['models/persistence', 'persistence'],
254
+ ['models/workspace_diff', 'workspace_diff'],
255
+ ['entrypoints/main', 'main'],
256
+ ['third_party/diff', 'diff'],
257
+ ['ui/legacy/components/inline_editor', 'inline_editor'],
258
+ ['ui/legacy/components/data_grid', 'data_grid'],
259
+ ['ui/legacy/components/perf_ui', 'perf_ui'],
260
+ ['ui/legacy/components/source_frame', 'source_frame'],
261
+ ['ui/legacy/components/color_picker', 'color_picker'],
262
+ ['ui/legacy/components/cookie_table', 'cookie_table'],
263
+ ['ui/legacy/components/quick_open', 'quick_open'],
264
+ ['ui/legacy/components/utils', 'components'],
265
+ ]);
249
266
 
250
267
  /**
251
268
  * @param {string} module
@@ -253,7 +270,7 @@ export async function loadModule(module) {
253
270
  */
254
271
  export async function loadLegacyModule(module) {
255
272
  let containingFolder = module;
256
- for (const [remappedFolder, originalFolder] of Root.Runtime.mappingForLayoutTests.entries()) {
273
+ for (const [remappedFolder, originalFolder] of mappingForLayoutTests.entries()) {
257
274
  if (originalFolder === module) {
258
275
  containingFolder = remappedFolder;
259
276
  }
@@ -667,9 +684,6 @@ export function addIframe(path, options = {}) {
667
684
  `);
668
685
  }
669
686
 
670
- /** @type {number} */
671
- let _pendingInits = 0;
672
-
673
687
  /**
674
688
  * The old test framework executed certain snippets in the inspected page
675
689
  * context as part of loading a test helper file.
@@ -685,12 +699,7 @@ let _pendingInits = 0;
685
699
  * @param {string} code
686
700
  */
687
701
  export async function deprecatedInitAsync(code) {
688
- _pendingInits++;
689
702
  await TestRunner.RuntimeAgent.invoke_evaluate({expression: code, objectGroup: 'console'});
690
- _pendingInits--;
691
- if (!_pendingInits && _resolveOnFinishInits !== undefined) {
692
- _resolveOnFinishInits();
693
- }
694
703
  }
695
704
 
696
705
  /**
@@ -1290,36 +1299,6 @@ export class MockSetting {
1290
1299
  }
1291
1300
  }
1292
1301
 
1293
- /**
1294
- * @return {!Array<!Root.Runtime.Module>}
1295
- */
1296
- export function loadedModules() {
1297
- return self.runtime.modules.filter(module => module.loadedForTest)
1298
- .filter(module => module.name() !== 'help')
1299
- .filter(module => module.name().indexOf('test_runner') === -1);
1300
- }
1301
-
1302
- /**
1303
- * @param {!Array<!Root.Runtime.Module>} relativeTo
1304
- * @return {!Array<!Root.Runtime.Module>}
1305
- */
1306
- export function dumpLoadedModules(relativeTo) {
1307
- const previous = new Set(relativeTo || []);
1308
- function moduleSorter(left, right) {
1309
- return Platform.StringUtilities.naturalOrderComparator(left.descriptor.name, right.descriptor.name);
1310
- }
1311
-
1312
- addResult('Loaded modules:');
1313
- const sortedLoadedModules = loadedModules().sort(moduleSorter);
1314
- for (const module of sortedLoadedModules) {
1315
- if (previous.has(module)) {
1316
- continue;
1317
- }
1318
- addResult(' ' + module.descriptor.name);
1319
- }
1320
- return sortedLoadedModules;
1321
- }
1322
-
1323
1302
  /**
1324
1303
  * @param {string} urlSuffix
1325
1304
  * @param {!Workspace.Workspace.projectTypes=} projectType
@@ -1511,13 +1490,10 @@ TestRunner.override = override;
1511
1490
  TestRunner.clearSpecificInfoFromStackFrames = clearSpecificInfoFromStackFrames;
1512
1491
  TestRunner.hideInspectorView = hideInspectorView;
1513
1492
  TestRunner.mainFrame = mainFrame;
1514
- TestRunner.loadedModules = loadedModules;
1515
- TestRunner.dumpLoadedModules = dumpLoadedModules;
1516
1493
  TestRunner.waitForUISourceCode = waitForUISourceCode;
1517
1494
  TestRunner.waitForUISourceCodeRemoved = waitForUISourceCodeRemoved;
1518
1495
  TestRunner.url = url;
1519
1496
  TestRunner.dumpSyntaxHighlight = dumpSyntaxHighlight;
1520
- TestRunner.loadModule = loadModule;
1521
1497
  TestRunner.loadLegacyModule = loadLegacyModule;
1522
1498
  TestRunner.loadTestModule = loadTestModule;
1523
1499
  TestRunner.evaluateInPageRemoteObject = evaluateInPageRemoteObject;
@@ -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;
@@ -13,7 +13,7 @@ const UIStrings = {
13
13
  /**
14
14
  *@description Label for the link for CORS private network issues
15
15
  */
16
- corsForPrivateNetworksRfc: 'CORS for private networks (RFC1918)',
16
+ corsPrivateNetworkAccess: 'Private Network Access',
17
17
  /**
18
18
  *@description Label for the link for CORS network issues
19
19
  */
@@ -26,7 +26,6 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
26
26
  // eslint-disable-next-line rulesdir/const_enum
27
27
  export enum IssueCode {
28
28
  InsecurePrivateNetwork = 'CorsIssue::InsecurePrivateNetwork',
29
- InsecurePrivateNetworkPreflight = 'CorsIssue::InsecurePrivateNetworkPreflight',
30
29
  InvalidHeaderValues = 'CorsIssue::InvalidHeaders',
31
30
  WildcardOriginNotAllowed = 'CorsIssue::WildcardOriginWithCredentials',
32
31
  PreflightResponseInvalid = 'CorsIssue::PreflightResponseInvalid',
@@ -37,12 +36,15 @@ export enum IssueCode {
37
36
  RedirectContainsCredentials = 'CorsIssue::RedirectContainsCredentials',
38
37
  DisallowedByMode = 'CorsIssue::DisallowedByMode',
39
38
  CorsDisabledScheme = 'CorsIssue::CorsDisabledScheme',
39
+ // TODO(https://crbug.com/1263483): Remove this once it's removed from CDP.
40
40
  PreflightMissingAllowExternal = 'CorsIssue::PreflightMissingAllowExternal',
41
+ // TODO(https://crbug.com/1263483): Remove this once it's removed from CDP.
41
42
  PreflightInvalidAllowExternal = 'CorsIssue::PreflightInvalidAllowExternal',
42
43
  InvalidResponse = 'CorsIssue::InvalidResponse',
43
44
  NoCorsRedirectModeNotFollow = 'CorsIssue::NoCorsRedirectModeNotFollow',
44
45
  InvalidPrivateNetworkAccess = 'CorsIssue::InvalidPrivateNetworkAccess',
45
46
  UnexpectedPrivateNetworkAccess = 'CorsIssue::UnexpectedPrivateNetworkAccess',
47
+ PreflightAllowPrivateNetworkError = 'CorsIssue::PreflightAllowPrivateNetworkError',
46
48
  }
47
49
 
48
50
  function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
@@ -85,14 +87,16 @@ function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
85
87
  case Protocol.Network.CorsError.InvalidResponse:
86
88
  return IssueCode.InvalidResponse;
87
89
  case Protocol.Network.CorsError.InsecurePrivateNetwork:
88
- return details.clientSecurityState?.initiatorIsSecureContext ? IssueCode.InsecurePrivateNetworkPreflight :
89
- IssueCode.InsecurePrivateNetwork;
90
+ return IssueCode.InsecurePrivateNetwork;
90
91
  case Protocol.Network.CorsError.NoCorsRedirectModeNotFollow:
91
92
  return IssueCode.NoCorsRedirectModeNotFollow;
92
93
  case Protocol.Network.CorsError.InvalidPrivateNetworkAccess:
93
94
  return IssueCode.InvalidPrivateNetworkAccess;
94
95
  case Protocol.Network.CorsError.UnexpectedPrivateNetworkAccess:
95
96
  return IssueCode.UnexpectedPrivateNetworkAccess;
97
+ case Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork:
98
+ case Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork:
99
+ return IssueCode.PreflightAllowPrivateNetworkError;
96
100
  }
97
101
  }
98
102
 
@@ -121,15 +125,15 @@ export class CorsIssue extends Issue<IssueCode> {
121
125
  file: 'corsInsecurePrivateNetwork.md',
122
126
  links: [{
123
127
  link: 'https://developer.chrome.com/blog/private-network-access-update',
124
- linkTitle: i18nString(UIStrings.corsForPrivateNetworksRfc),
128
+ linkTitle: i18nString(UIStrings.corsPrivateNetworkAccess),
125
129
  }],
126
130
  };
127
- case IssueCode.InsecurePrivateNetworkPreflight:
131
+ case IssueCode.PreflightAllowPrivateNetworkError:
128
132
  return {
129
- file: 'corsInsecurePrivateNetworkPreflight.md',
133
+ file: 'corsPreflightAllowPrivateNetworkError.md',
130
134
  links: [{
131
135
  link: 'https://developer.chrome.com/blog/private-network-access-update',
132
- linkTitle: i18nString(UIStrings.corsForPrivateNetworksRfc),
136
+ linkTitle: i18nString(UIStrings.corsPrivateNetworkAccess),
133
137
  }],
134
138
  };
135
139
  case IssueCode.InvalidHeaderValues:
@@ -235,7 +239,11 @@ export class CorsIssue extends Issue<IssueCode> {
235
239
 
236
240
  getKind(): IssueKind {
237
241
  if (this.issueDetails.isWarning &&
238
- this.issueDetails.corsErrorStatus.corsError === Protocol.Network.CorsError.InsecurePrivateNetwork) {
242
+ (this.issueDetails.corsErrorStatus.corsError === Protocol.Network.CorsError.InsecurePrivateNetwork ||
243
+ this.issueDetails.corsErrorStatus.corsError ===
244
+ Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork ||
245
+ this.issueDetails.corsErrorStatus.corsError ===
246
+ Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork)) {
239
247
  return IssueKind.BreakingChange;
240
248
  }
241
249
  return IssueKind.PageError;
@@ -3,7 +3,7 @@
3
3
  A site requested a resource from a network that it could only access because of its users' privileged network position.
4
4
  These requests expose devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage.
5
5
 
6
- To mitigate these risks, a future version of Chrome will require non-public subresources to opt-into being accessed with a preflight request.
6
+ To mitigate these risks, Chrome will require non-public subresources to opt-into being accessed with a preflight request and will start blocking them in Chrome 101 (April 2022).
7
7
 
8
8
  To fix this issue, ensure that response to the [preflight request](issueCorsPreflightRequest) for the private network resource has the `Access-Control-Allow-Private-Network` header set to `true`.
9
9
 
@@ -107,7 +107,9 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
107
107
  if (!accessibilityModel) {
108
108
  return;
109
109
  }
110
- accessibilityModel.clear();
110
+ if (!Root.Runtime.experiments.isEnabled('fullAccessibilityTree')) {
111
+ accessibilityModel.clear();
112
+ }
111
113
  await accessibilityModel.requestPartialAXTree(node);
112
114
  this.accessibilityNodeCallback(accessibilityModel.axNodeForDOMNode(node));
113
115
  }
@@ -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) {
@@ -154,10 +154,6 @@ const UIStrings = {
154
154
  * @description Description text for not restored reason BackForwardCacheDisabledForDelegate.
155
155
  */
156
156
  backForwardCacheDisabledForDelegate: 'Back/forward cache is not supported by delegate.',
157
- /**
158
- * @description Description text for not restored reason OptInUnloadHeaderNotPresent.
159
- */
160
- optInUnloadHeaderNotPresent: 'The page has unload handler without the back/forward cache opt-in header.',
161
157
  /**
162
158
  * @description Description text for not restored reason UnloadHandlerExistsInMainFrame.
163
159
  */
@@ -466,7 +462,7 @@ export const NotRestoredReasonDescription = {
466
462
  'UserAgentOverrideDiffers': {name: i18nLazyString(UIStrings.userAgentOverrideDiffers)},
467
463
  'ForegroundCacheLimit': {name: i18nLazyString(UIStrings.foregroundCacheLimit)},
468
464
  'BackForwardCacheDisabledForDelegate': {name: i18nLazyString(UIStrings.backForwardCacheDisabledForDelegate)},
469
- 'OptInUnloadHeaderNotPresent': {name: i18nLazyString(UIStrings.optInUnloadHeaderNotPresent)},
465
+ 'OptInUnloadHeaderNotPresent': {name: i18nLazyString(UIStrings.unloadHandlerExistsInMainFrame)},
470
466
  'UnloadHandlerExistsInMainFrame': {name: i18nLazyString(UIStrings.unloadHandlerExistsInMainFrame)},
471
467
  'UnloadHandlerExistsInSubFrame': {name: i18nLazyString(UIStrings.unloadHandlerExistsInSubFrame)},
472
468
  'ServiceWorkerUnregistration': {name: i18nLazyString(UIStrings.serviceWorkerUnregistration)},
@@ -541,6 +537,7 @@ export const NotRestoredReasonDescription = {
541
537
  'ContentMediaSession': {name: i18nLazyString(UIStrings.contentMediaSession)},
542
538
  'ContentMediaSessionService': {name: i18nLazyString(UIStrings.contentMediaSessionService)},
543
539
  'ContentMediaPlay': {name: i18nLazyString(UIStrings.contentMediaPlay)},
540
+ 'ContentScreenReader': {name: i18n.i18n.lockedLazyString('ContentScreenReader')},
544
541
  'EmbedderPopupBlockerTabHelper': {name: i18n.i18n.lockedLazyString('EmbedderPopupBlockerTabHelper')},
545
542
  'EmbedderSafeBrowsingTriggeredPopupBlocker':
546
543
  {name: i18n.i18n.lockedLazyString('EmbedderSafeBrowsingTriggeredPopupBlocker')},