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.
- package/config/gni/devtools_grd_files.gni +2 -0
- package/config/gni/devtools_image_files.gni +2 -0
- package/front_end/Images/src/ic_sources_authored.svg +5 -0
- package/front_end/Images/src/ic_sources_deployed.svg +5 -0
- package/front_end/core/i18n/locales/af.json +202 -43
- package/front_end/core/i18n/locales/am.json +201 -42
- package/front_end/core/i18n/locales/ar.json +201 -42
- package/front_end/core/i18n/locales/as.json +201 -42
- package/front_end/core/i18n/locales/az.json +201 -42
- package/front_end/core/i18n/locales/be.json +201 -42
- package/front_end/core/i18n/locales/bg.json +201 -42
- package/front_end/core/i18n/locales/bn.json +201 -42
- package/front_end/core/i18n/locales/bs.json +201 -42
- package/front_end/core/i18n/locales/ca.json +204 -45
- package/front_end/core/i18n/locales/cs.json +201 -42
- package/front_end/core/i18n/locales/cy.json +201 -42
- package/front_end/core/i18n/locales/da.json +201 -42
- package/front_end/core/i18n/locales/de.json +201 -42
- package/front_end/core/i18n/locales/el.json +201 -42
- package/front_end/core/i18n/locales/en-GB.json +199 -40
- package/front_end/core/i18n/locales/en-US.json +43 -1
- package/front_end/core/i18n/locales/en-XL.json +43 -1
- package/front_end/core/i18n/locales/es-419.json +201 -42
- package/front_end/core/i18n/locales/es.json +201 -42
- package/front_end/core/i18n/locales/et.json +201 -42
- package/front_end/core/i18n/locales/eu.json +202 -43
- package/front_end/core/i18n/locales/fa.json +201 -42
- package/front_end/core/i18n/locales/fi.json +201 -42
- package/front_end/core/i18n/locales/fil.json +201 -42
- package/front_end/core/i18n/locales/fr-CA.json +201 -42
- package/front_end/core/i18n/locales/fr.json +203 -44
- package/front_end/core/i18n/locales/gl.json +203 -44
- package/front_end/core/i18n/locales/gu.json +201 -42
- package/front_end/core/i18n/locales/he.json +201 -42
- package/front_end/core/i18n/locales/hi.json +201 -42
- package/front_end/core/i18n/locales/hr.json +201 -42
- package/front_end/core/i18n/locales/hu.json +201 -42
- package/front_end/core/i18n/locales/hy.json +201 -42
- package/front_end/core/i18n/locales/id.json +201 -42
- package/front_end/core/i18n/locales/is.json +201 -42
- package/front_end/core/i18n/locales/it.json +203 -44
- package/front_end/core/i18n/locales/ja.json +203 -44
- package/front_end/core/i18n/locales/ka.json +201 -42
- package/front_end/core/i18n/locales/kk.json +201 -42
- package/front_end/core/i18n/locales/km.json +201 -42
- package/front_end/core/i18n/locales/kn.json +201 -42
- package/front_end/core/i18n/locales/ko.json +201 -42
- package/front_end/core/i18n/locales/ky.json +201 -42
- package/front_end/core/i18n/locales/lo.json +201 -42
- package/front_end/core/i18n/locales/lt.json +201 -42
- package/front_end/core/i18n/locales/lv.json +201 -42
- package/front_end/core/i18n/locales/mk.json +201 -42
- package/front_end/core/i18n/locales/ml.json +201 -42
- package/front_end/core/i18n/locales/mn.json +201 -42
- package/front_end/core/i18n/locales/mr.json +201 -42
- package/front_end/core/i18n/locales/ms.json +201 -42
- package/front_end/core/i18n/locales/my.json +201 -42
- package/front_end/core/i18n/locales/ne.json +201 -42
- package/front_end/core/i18n/locales/nl.json +201 -42
- package/front_end/core/i18n/locales/no.json +201 -42
- package/front_end/core/i18n/locales/or.json +201 -42
- package/front_end/core/i18n/locales/pa.json +201 -42
- package/front_end/core/i18n/locales/pl.json +201 -42
- package/front_end/core/i18n/locales/pt-PT.json +201 -42
- package/front_end/core/i18n/locales/pt.json +201 -42
- package/front_end/core/i18n/locales/ro.json +201 -42
- package/front_end/core/i18n/locales/ru.json +203 -44
- package/front_end/core/i18n/locales/si.json +201 -42
- package/front_end/core/i18n/locales/sk.json +201 -42
- package/front_end/core/i18n/locales/sl.json +201 -42
- package/front_end/core/i18n/locales/sq.json +201 -42
- package/front_end/core/i18n/locales/sr-Latn.json +201 -42
- package/front_end/core/i18n/locales/sr.json +201 -42
- package/front_end/core/i18n/locales/sv.json +201 -42
- package/front_end/core/i18n/locales/sw.json +201 -42
- package/front_end/core/i18n/locales/ta.json +201 -42
- package/front_end/core/i18n/locales/te.json +202 -43
- package/front_end/core/i18n/locales/th.json +201 -42
- package/front_end/core/i18n/locales/tr.json +201 -42
- package/front_end/core/i18n/locales/uk.json +201 -42
- package/front_end/core/i18n/locales/ur.json +201 -42
- package/front_end/core/i18n/locales/uz.json +201 -42
- package/front_end/core/i18n/locales/vi.json +201 -42
- package/front_end/core/i18n/locales/zh-HK.json +201 -42
- package/front_end/core/i18n/locales/zh-TW.json +201 -42
- package/front_end/core/i18n/locales/zh.json +201 -42
- package/front_end/core/i18n/locales/zu.json +201 -42
- package/front_end/core/sdk/CPUThrottlingManager.ts +54 -0
- package/front_end/core/sdk/DebuggerModel.ts +12 -3
- package/front_end/core/sdk/EmulationModel.ts +7 -0
- package/front_end/core/sdk/NetworkManager.ts +6 -2
- package/front_end/devtools_compatibility.js +1 -0
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +1 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +12 -10
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +4 -0
- package/front_end/generated/InspectorBackendCommands.js +3 -0
- package/front_end/generated/protocol-mapping.d.ts +2 -0
- package/front_end/generated/protocol-proxy-api.d.ts +3 -0
- package/front_end/generated/protocol.ts +7 -0
- package/front_end/models/formatter/FormatterWorkerPool.ts +6 -0
- package/front_end/models/issues_manager/DeprecationIssue.ts +1 -1
- package/front_end/models/javascript_metadata/JavaScriptMetadata.ts +13 -20
- package/front_end/models/javascript_metadata/NativeFunctions.js +1237 -3962
- package/front_end/models/source_map_scopes/NamesResolver.ts +206 -73
- package/front_end/models/workspace/UISourceCode.ts +7 -0
- package/front_end/panels/accessibility/axBreadcrumbs.css +2 -2
- package/front_end/panels/application/components/BackForwardCacheView.ts +16 -0
- package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -5
- package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +70 -49
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +113 -4
- package/front_end/panels/network/components/RequestHeadersView.css +31 -3
- package/front_end/panels/network/components/RequestHeadersView.ts +126 -3
- package/front_end/panels/sources/NavigatorView.ts +141 -40
- package/front_end/panels/sources/SourcesPanel.ts +8 -0
- package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
- package/front_end/panels/sources/sources-meta.ts +6 -0
- package/front_end/panels/timeline/TimelinePanel.ts +27 -4
- package/front_end/panels/timeline/timelinePanel.css +8 -0
- package/front_end/ui/components/text_editor/javascript.ts +12 -14
- package/front_end/ui/legacy/Treeoutline.ts +5 -2
- package/package.json +1 -1
- package/scripts/hosted_mode/server.js +14 -1
- package/scripts/javascript_natives/helpers.js +26 -7
- package/scripts/javascript_natives/index.js +4 -3
- package/scripts/javascript_natives/tests.js +2 -2
package/package.json
CHANGED
@@ -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
|
-
|
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
|
-
|
182
|
-
|
183
|
-
|
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
|
-
|
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
|
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(
|
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
|
-
|
185
|
+
receivers: ["Array"]
|
186
186
|
},
|
187
187
|
{
|
188
188
|
name: "diffSig",
|
189
189
|
signatures: [["twoSig"]],
|
190
|
-
|
190
|
+
receivers: ["ReadonlyArray"]
|
191
191
|
}
|
192
192
|
];`;
|
193
193
|
assert.equal(output, expected);
|