chrome-devtools-frontend 1.0.1006211 → 1.0.1007307

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 (125) hide show
  1. package/config/gni/devtools_grd_files.gni +2 -0
  2. package/config/gni/devtools_image_files.gni +2 -0
  3. package/front_end/Images/src/ic_sources_authored.svg +5 -0
  4. package/front_end/Images/src/ic_sources_deployed.svg +5 -0
  5. package/front_end/core/i18n/locales/af.json +202 -43
  6. package/front_end/core/i18n/locales/am.json +201 -42
  7. package/front_end/core/i18n/locales/ar.json +201 -42
  8. package/front_end/core/i18n/locales/as.json +201 -42
  9. package/front_end/core/i18n/locales/az.json +201 -42
  10. package/front_end/core/i18n/locales/be.json +201 -42
  11. package/front_end/core/i18n/locales/bg.json +201 -42
  12. package/front_end/core/i18n/locales/bn.json +201 -42
  13. package/front_end/core/i18n/locales/bs.json +201 -42
  14. package/front_end/core/i18n/locales/ca.json +204 -45
  15. package/front_end/core/i18n/locales/cs.json +201 -42
  16. package/front_end/core/i18n/locales/cy.json +201 -42
  17. package/front_end/core/i18n/locales/da.json +201 -42
  18. package/front_end/core/i18n/locales/de.json +201 -42
  19. package/front_end/core/i18n/locales/el.json +201 -42
  20. package/front_end/core/i18n/locales/en-GB.json +199 -40
  21. package/front_end/core/i18n/locales/en-US.json +43 -1
  22. package/front_end/core/i18n/locales/en-XL.json +43 -1
  23. package/front_end/core/i18n/locales/es-419.json +201 -42
  24. package/front_end/core/i18n/locales/es.json +201 -42
  25. package/front_end/core/i18n/locales/et.json +201 -42
  26. package/front_end/core/i18n/locales/eu.json +202 -43
  27. package/front_end/core/i18n/locales/fa.json +201 -42
  28. package/front_end/core/i18n/locales/fi.json +201 -42
  29. package/front_end/core/i18n/locales/fil.json +201 -42
  30. package/front_end/core/i18n/locales/fr-CA.json +201 -42
  31. package/front_end/core/i18n/locales/fr.json +203 -44
  32. package/front_end/core/i18n/locales/gl.json +203 -44
  33. package/front_end/core/i18n/locales/gu.json +201 -42
  34. package/front_end/core/i18n/locales/he.json +201 -42
  35. package/front_end/core/i18n/locales/hi.json +201 -42
  36. package/front_end/core/i18n/locales/hr.json +201 -42
  37. package/front_end/core/i18n/locales/hu.json +201 -42
  38. package/front_end/core/i18n/locales/hy.json +201 -42
  39. package/front_end/core/i18n/locales/id.json +201 -42
  40. package/front_end/core/i18n/locales/is.json +201 -42
  41. package/front_end/core/i18n/locales/it.json +203 -44
  42. package/front_end/core/i18n/locales/ja.json +203 -44
  43. package/front_end/core/i18n/locales/ka.json +201 -42
  44. package/front_end/core/i18n/locales/kk.json +201 -42
  45. package/front_end/core/i18n/locales/km.json +201 -42
  46. package/front_end/core/i18n/locales/kn.json +201 -42
  47. package/front_end/core/i18n/locales/ko.json +201 -42
  48. package/front_end/core/i18n/locales/ky.json +201 -42
  49. package/front_end/core/i18n/locales/lo.json +201 -42
  50. package/front_end/core/i18n/locales/lt.json +201 -42
  51. package/front_end/core/i18n/locales/lv.json +201 -42
  52. package/front_end/core/i18n/locales/mk.json +201 -42
  53. package/front_end/core/i18n/locales/ml.json +201 -42
  54. package/front_end/core/i18n/locales/mn.json +201 -42
  55. package/front_end/core/i18n/locales/mr.json +201 -42
  56. package/front_end/core/i18n/locales/ms.json +201 -42
  57. package/front_end/core/i18n/locales/my.json +201 -42
  58. package/front_end/core/i18n/locales/ne.json +201 -42
  59. package/front_end/core/i18n/locales/nl.json +201 -42
  60. package/front_end/core/i18n/locales/no.json +201 -42
  61. package/front_end/core/i18n/locales/or.json +201 -42
  62. package/front_end/core/i18n/locales/pa.json +201 -42
  63. package/front_end/core/i18n/locales/pl.json +201 -42
  64. package/front_end/core/i18n/locales/pt-PT.json +201 -42
  65. package/front_end/core/i18n/locales/pt.json +201 -42
  66. package/front_end/core/i18n/locales/ro.json +201 -42
  67. package/front_end/core/i18n/locales/ru.json +203 -44
  68. package/front_end/core/i18n/locales/si.json +201 -42
  69. package/front_end/core/i18n/locales/sk.json +201 -42
  70. package/front_end/core/i18n/locales/sl.json +201 -42
  71. package/front_end/core/i18n/locales/sq.json +201 -42
  72. package/front_end/core/i18n/locales/sr-Latn.json +201 -42
  73. package/front_end/core/i18n/locales/sr.json +201 -42
  74. package/front_end/core/i18n/locales/sv.json +201 -42
  75. package/front_end/core/i18n/locales/sw.json +201 -42
  76. package/front_end/core/i18n/locales/ta.json +201 -42
  77. package/front_end/core/i18n/locales/te.json +202 -43
  78. package/front_end/core/i18n/locales/th.json +201 -42
  79. package/front_end/core/i18n/locales/tr.json +201 -42
  80. package/front_end/core/i18n/locales/uk.json +201 -42
  81. package/front_end/core/i18n/locales/ur.json +201 -42
  82. package/front_end/core/i18n/locales/uz.json +201 -42
  83. package/front_end/core/i18n/locales/vi.json +201 -42
  84. package/front_end/core/i18n/locales/zh-HK.json +201 -42
  85. package/front_end/core/i18n/locales/zh-TW.json +201 -42
  86. package/front_end/core/i18n/locales/zh.json +201 -42
  87. package/front_end/core/i18n/locales/zu.json +201 -42
  88. package/front_end/core/sdk/CPUThrottlingManager.ts +54 -0
  89. package/front_end/core/sdk/DebuggerModel.ts +12 -3
  90. package/front_end/core/sdk/EmulationModel.ts +7 -0
  91. package/front_end/core/sdk/NetworkManager.ts +6 -2
  92. package/front_end/devtools_compatibility.js +1 -0
  93. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +1 -0
  94. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +12 -10
  95. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +4 -0
  96. package/front_end/generated/InspectorBackendCommands.js +3 -0
  97. package/front_end/generated/protocol-mapping.d.ts +2 -0
  98. package/front_end/generated/protocol-proxy-api.d.ts +3 -0
  99. package/front_end/generated/protocol.ts +7 -0
  100. package/front_end/models/formatter/FormatterWorkerPool.ts +6 -0
  101. package/front_end/models/issues_manager/DeprecationIssue.ts +1 -1
  102. package/front_end/models/javascript_metadata/JavaScriptMetadata.ts +13 -20
  103. package/front_end/models/javascript_metadata/NativeFunctions.js +1237 -3962
  104. package/front_end/models/source_map_scopes/NamesResolver.ts +206 -73
  105. package/front_end/models/workspace/UISourceCode.ts +7 -0
  106. package/front_end/panels/accessibility/axBreadcrumbs.css +2 -2
  107. package/front_end/panels/application/components/BackForwardCacheView.ts +16 -0
  108. package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -5
  109. package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +70 -49
  110. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +113 -4
  111. package/front_end/panels/network/components/RequestHeadersView.css +31 -3
  112. package/front_end/panels/network/components/RequestHeadersView.ts +126 -3
  113. package/front_end/panels/sources/NavigatorView.ts +141 -40
  114. package/front_end/panels/sources/SourcesPanel.ts +8 -0
  115. package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
  116. package/front_end/panels/sources/sources-meta.ts +6 -0
  117. package/front_end/panels/timeline/TimelinePanel.ts +27 -4
  118. package/front_end/panels/timeline/timelinePanel.css +8 -0
  119. package/front_end/ui/components/text_editor/javascript.ts +12 -14
  120. package/front_end/ui/legacy/Treeoutline.ts +5 -2
  121. package/package.json +1 -1
  122. package/scripts/hosted_mode/server.js +14 -1
  123. package/scripts/javascript_natives/helpers.js +26 -7
  124. package/scripts/javascript_natives/index.js +4 -3
  125. package/scripts/javascript_natives/tests.js +2 -2
package/package.json CHANGED
@@ -55,5 +55,5 @@
55
55
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
56
56
  "watch": "vpython third_party/node/node.py --output scripts/watch_build.js"
57
57
  },
58
- "version": "1.0.1006211"
58
+ "version": "1.0.1007307"
59
59
  }
@@ -194,9 +194,22 @@ async function requestHandler(request, response) {
194
194
  response.setHeader(header, value);
195
195
  });
196
196
 
197
+ const waitBeforeHeaders = parseInt(url.searchParams?.get('waitBeforeHeaders'), 10);
198
+ if (!isNaN(waitBeforeHeaders)) {
199
+ await new Promise(resolve => setTimeout(resolve, waitBeforeHeaders));
200
+ }
197
201
  response.writeHead(statusCode);
198
202
  if (data && encoding) {
199
- response.write(data, encoding);
203
+ const waitBetweenChunks = parseInt(url.searchParams?.get('waitBetweenChunks'), 10);
204
+ const numChunks = parseInt(url.searchParams?.get('numChunks'), 10);
205
+ const chunkSize = isNaN(numChunks) ? data.length : data.length / numChunks;
206
+ for (let i = 0; i < data.length; i += chunkSize) {
207
+ if (!isNaN(waitBetweenChunks)) {
208
+ await new Promise(resolve => setTimeout(resolve, waitBetweenChunks));
209
+ }
210
+ const chunk = data.subarray ? data.subarray(i, i + chunkSize) : data.substring(i, i + chunkSize);
211
+ response.write(chunk, encoding);
212
+ }
200
213
  }
201
214
  response.end();
202
215
  }
@@ -10,9 +10,12 @@ import {fileURLToPath} from 'url';
10
10
 
11
11
  /** @type {Map<string, Map<string, string[][]>>} */
12
12
  const methods = new Map();
13
+ /** @type {Map<string, string[]>} */
14
+ const includes = new Map();
13
15
 
14
16
  export function clearState() {
15
17
  methods.clear();
18
+ includes.clear();
16
19
  }
17
20
 
18
21
  export function parseTSFunction(func, node) {
@@ -47,9 +50,22 @@ export function walkRoot(thing) {
47
50
  case 'namespace':
48
51
  walkMembers(thing);
49
52
  break;
53
+ case 'includes':
54
+ walkIncludes(thing);
55
+ break;
50
56
  }
51
57
  }
52
58
 
59
+ /**
60
+ * @param {WebIDL2.IncludesType} thing
61
+ * */
62
+ function walkIncludes(thing) {
63
+ if (includes.has(thing.includes)) {
64
+ includes.get(thing.includes).push(thing.target);
65
+ } else {
66
+ includes.set(thing.includes, [thing.target]);
67
+ }
68
+ }
53
69
  /**
54
70
  * @param {WebIDL2.InterfaceType} thing
55
71
  * */
@@ -84,9 +100,7 @@ function walkMembers(thing) {
84
100
  * @param {WebIDL2.OperationMemberType} member
85
101
  * */
86
102
  function handleOperation(member) {
87
- storeMethod(
88
- member.special === 'static' ? (parent.name + 'Constructor') : member.parent.name, member.name,
89
- member.arguments.map(argName));
103
+ storeMethod(member.parent.name, member.name, member.arguments.map(argName));
90
104
  }
91
105
 
92
106
  /**
@@ -177,13 +191,18 @@ export function postProcess(dryRun = false) {
177
191
  // All parents had the same signature so we emit an entry without receiver.
178
192
  functions.push({name, signatures: method.get('*')});
179
193
  } else {
194
+ const receiversMap = new Map();
180
195
  for (const [parent, signatures] of method) {
181
- if (parent.endsWith('Constructor')) {
182
- functions.push(
183
- {name, signatures, static: true, receiver: parent.substring(0, parent.length - 'Constructor'.length)});
196
+ const receivers = receiversMap.get(JSON.stringify(signatures)) || new Set();
197
+ if (includes.has(parent)) {
198
+ includes.get(parent).forEach(receiver => receivers.add(receiver));
184
199
  } else {
185
- functions.push({name, signatures, receiver: parent});
200
+ receivers.add(parent);
186
201
  }
202
+ receiversMap.set(JSON.stringify(signatures), receivers);
203
+ }
204
+ for (const [signatures, receivers] of receiversMap) {
205
+ functions.push({name, signatures: JSON.parse(signatures), receivers: Array.from(receivers)});
187
206
  }
188
207
  }
189
208
  }
@@ -14,9 +14,11 @@ if (process.argv.length !== 4) {
14
14
  }
15
15
 
16
16
  const chromiumSource = process.argv[2];
17
- const typescriptSource = process.argv[3] + 'node_modules/typescript/lib/lib.esnext.d.ts';
17
+ const REL_TS_LIB_PATH = '/node_modules/typescript/lib/';
18
+ const typescriptSources =
19
+ fs.readdirSync(process.argv[3] + REL_TS_LIB_PATH).map(name => process.argv[3] + REL_TS_LIB_PATH + name);
18
20
 
19
- const program = ts.createProgram([typescriptSource], {noLib: false, types: []});
21
+ const program = ts.createProgram({rootNames: typescriptSources, options: {noResolve: true, types: []}});
20
22
 
21
23
  for (const file of program.getSourceFiles()) {
22
24
  ts.forEachChild(file, node => {
@@ -30,7 +32,6 @@ for (const file of program.getSourceFiles()) {
30
32
  if (node.kind === ts.SyntaxKind.FunctionDeclaration) {
31
33
  parseTSFunction(node, {name: {text: 'Window'}});
32
34
  }
33
-
34
35
  });
35
36
  }
36
37
 
@@ -182,12 +182,12 @@ namespace console {
182
182
  {
183
183
  name: "diffSig",
184
184
  signatures: [["oneSig"]],
185
- receiver: "Array"
185
+ receivers: ["Array"]
186
186
  },
187
187
  {
188
188
  name: "diffSig",
189
189
  signatures: [["twoSig"]],
190
- receiver: "ReadonlyArray"
190
+ receivers: ["ReadonlyArray"]
191
191
  }
192
192
  ];`;
193
193
  assert.equal(output, expected);