chrome-devtools-frontend 1.0.1006344 → 1.0.1007778
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 +5 -0
- package/config/gni/devtools_image_files.gni +2 -0
- package/extension-api/ExtensionAPI.d.ts +10 -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 +57 -3
- package/front_end/core/i18n/locales/en-XL.json +57 -3
- 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/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +1 -4
- 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/legacy_test_runner/lighthouse_test_runner/lighthouse_test_runner.js +16 -0
- package/front_end/models/extensions/ExtensionAPI.ts +95 -12
- package/front_end/models/extensions/ExtensionEndpoint.ts +69 -0
- package/front_end/models/extensions/ExtensionServer.ts +21 -0
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +46 -78
- package/front_end/models/extensions/RecorderExtensionEndpoint.ts +43 -0
- package/front_end/models/extensions/RecorderPluginManager.ts +30 -0
- package/front_end/models/extensions/extensions.ts +2 -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/AppManifestView.ts +2 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +16 -0
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +15 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +25 -10
- package/front_end/panels/lighthouse/LighthouseStartView.ts +32 -6
- 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 +36 -3
- package/front_end/panels/network/components/RequestHeadersView.ts +176 -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
@@ -0,0 +1,43 @@
|
|
1
|
+
// Copyright 2022 The Chromium Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
import {PrivateAPI} from './ExtensionAPI.js';
|
6
|
+
import {ExtensionEndpoint} from './ExtensionEndpoint.js';
|
7
|
+
import {RecorderPluginManager} from './RecorderPluginManager.js';
|
8
|
+
|
9
|
+
export class RecorderExtensionEndpoint extends ExtensionEndpoint {
|
10
|
+
private readonly name: string;
|
11
|
+
|
12
|
+
constructor(name: string, port: MessagePort) {
|
13
|
+
super(port);
|
14
|
+
this.name = name;
|
15
|
+
}
|
16
|
+
|
17
|
+
getName(): string {
|
18
|
+
return this.name;
|
19
|
+
}
|
20
|
+
|
21
|
+
protected handleEvent({event}: {event: string}): void {
|
22
|
+
switch (event) {
|
23
|
+
case PrivateAPI.RecorderExtensionPluginEvents.UnregisteredRecorderExtensionPlugin: {
|
24
|
+
this.disconnect();
|
25
|
+
RecorderPluginManager.instance().removePlugin(this);
|
26
|
+
break;
|
27
|
+
}
|
28
|
+
default:
|
29
|
+
throw new Error(`Unrecognized Recorder extension endpoint event: ${event}`);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* In practice, `recording` is a UserFlow[1], but we avoid defining this type on the
|
35
|
+
* API in order to prevent dependencies between Chrome and puppeteer. Extensions
|
36
|
+
* are responsible for working out potential compatibility issues.
|
37
|
+
*
|
38
|
+
* [1]: https://github.com/puppeteer/replay/blob/main/src/Schema.ts#L245
|
39
|
+
*/
|
40
|
+
stringify(recording: Object): Promise<string> {
|
41
|
+
return this.sendRequest(PrivateAPI.RecorderExtensionPluginCommands.Stringify, {recording});
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// Copyright 2022 The Chromium Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
import type {RecorderExtensionEndpoint} from './RecorderExtensionEndpoint.js';
|
6
|
+
|
7
|
+
let instance: RecorderPluginManager|null = null;
|
8
|
+
|
9
|
+
export class RecorderPluginManager {
|
10
|
+
#plugins: Set<RecorderExtensionEndpoint> = new Set();
|
11
|
+
|
12
|
+
static instance(): RecorderPluginManager {
|
13
|
+
if (!instance) {
|
14
|
+
instance = new RecorderPluginManager();
|
15
|
+
}
|
16
|
+
return instance;
|
17
|
+
}
|
18
|
+
|
19
|
+
addPlugin(plugin: RecorderExtensionEndpoint): void {
|
20
|
+
this.#plugins.add(plugin);
|
21
|
+
}
|
22
|
+
|
23
|
+
removePlugin(plugin: RecorderExtensionEndpoint): void {
|
24
|
+
this.#plugins.delete(plugin);
|
25
|
+
}
|
26
|
+
|
27
|
+
plugins(): RecorderExtensionEndpoint[] {
|
28
|
+
return Array.from(this.#plugins.values());
|
29
|
+
}
|
30
|
+
}
|
@@ -7,6 +7,7 @@ import * as ExtensionPanel from './ExtensionPanel.js';
|
|
7
7
|
import * as ExtensionServer from './ExtensionServer.js';
|
8
8
|
import * as ExtensionTraceProvider from './ExtensionTraceProvider.js';
|
9
9
|
import * as ExtensionView from './ExtensionView.js';
|
10
|
+
import * as RecorderPluginManager from './RecorderPluginManager.js';
|
10
11
|
|
11
12
|
export {
|
12
13
|
ExtensionAPI,
|
@@ -14,4 +15,5 @@ export {
|
|
14
15
|
ExtensionServer,
|
15
16
|
ExtensionTraceProvider,
|
16
17
|
ExtensionView,
|
18
|
+
RecorderPluginManager,
|
17
19
|
};
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
6
|
import * as FormatterActions from '../../entrypoints/formatter_worker/FormatterActions.js'; // eslint-disable-line rulesdir/es_modules_import
|
7
|
+
export {DefinitionKind, type ScopeTreeNode} from '../../entrypoints/formatter_worker/FormatterActions.js';
|
7
8
|
|
8
9
|
const MAX_WORKERS = Math.min(2, navigator.hardwareConcurrency - 1);
|
9
10
|
|
@@ -140,6 +141,11 @@ export class FormatterWorkerPool {
|
|
140
141
|
.then(result => result || '');
|
141
142
|
}
|
142
143
|
|
144
|
+
javaScriptScopeTree(expression: string): Promise<FormatterActions.ScopeTreeNode|null> {
|
145
|
+
return this.runTask(FormatterActions.FormatterActions.JAVASCRIPT_SCOPE_TREE, {content: expression})
|
146
|
+
.then(result => result || null);
|
147
|
+
}
|
148
|
+
|
143
149
|
evaluatableJavaScriptSubstring(content: string): Promise<string> {
|
144
150
|
return this.runTask(FormatterActions.FormatterActions.EVALUATE_JAVASCRIPT_SUBSTRING, {content: content})
|
145
151
|
.then(text => text || '');
|
@@ -181,7 +181,7 @@ const UIStrings = {
|
|
181
181
|
*/
|
182
182
|
vendorSpecificApi: '{PH1} is vendor-specific. Please use the standard {PH2} instead.',
|
183
183
|
/**
|
184
|
-
* @description
|
184
|
+
* @description Warning displayed to developers when `window.webkitStorageInfo` is used to notify that the API is deprecated.
|
185
185
|
*/
|
186
186
|
prefixedStorageInfo:
|
187
187
|
'`window.webkitStorageInfo` is deprecated. Please use `navigator.webkitTemporaryStorage` or `navigator.webkitPersistentStorage` instead.',
|
@@ -10,8 +10,7 @@ let javaScriptMetadataInstance: JavaScriptMetadataImpl;
|
|
10
10
|
|
11
11
|
export class JavaScriptMetadataImpl implements Common.JavaScriptMetaData.JavaScriptMetaData {
|
12
12
|
private readonly uniqueFunctions: Map<string, string[][]>;
|
13
|
-
private readonly
|
14
|
-
private readonly staticMethods: Map<string, Map<string, string[][]>>;
|
13
|
+
private readonly receiverMethods: Map<string, Map<string, string[][]>>;
|
15
14
|
static instance(opts: {
|
16
15
|
forceNew: boolean|null,
|
17
16
|
} = {forceNew: null}): JavaScriptMetadataImpl {
|
@@ -24,26 +23,20 @@ export class JavaScriptMetadataImpl implements Common.JavaScriptMetaData.JavaScr
|
|
24
23
|
}
|
25
24
|
constructor() {
|
26
25
|
this.uniqueFunctions = new Map();
|
27
|
-
this.
|
28
|
-
this.staticMethods = new Map();
|
26
|
+
this.receiverMethods = new Map();
|
29
27
|
|
30
28
|
for (const nativeFunction of NativeFunctions) {
|
31
|
-
if (!nativeFunction.
|
29
|
+
if (!nativeFunction.receivers) {
|
32
30
|
this.uniqueFunctions.set(nativeFunction.name, nativeFunction.signatures);
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
} else {
|
41
|
-
let instanceMethod = this.instanceMethods.get(nativeFunction.receiver);
|
42
|
-
if (!instanceMethod) {
|
43
|
-
instanceMethod = new Map();
|
44
|
-
this.instanceMethods.set(nativeFunction.receiver, instanceMethod);
|
31
|
+
continue;
|
32
|
+
}
|
33
|
+
for (const receiver of nativeFunction.receivers) {
|
34
|
+
let method = this.receiverMethods.get(receiver);
|
35
|
+
if (!method) {
|
36
|
+
method = new Map();
|
37
|
+
this.receiverMethods.set(receiver, method);
|
45
38
|
}
|
46
|
-
|
39
|
+
method.set(nativeFunction.name, nativeFunction.signatures);
|
47
40
|
}
|
48
41
|
}
|
49
42
|
}
|
@@ -53,7 +46,7 @@ export class JavaScriptMetadataImpl implements Common.JavaScriptMetaData.JavaScr
|
|
53
46
|
}
|
54
47
|
|
55
48
|
signaturesForInstanceMethod(name: string, receiverClassName: string): string[][]|null {
|
56
|
-
const instanceMethod = this.
|
49
|
+
const instanceMethod = this.receiverMethods.get(receiverClassName);
|
57
50
|
if (!instanceMethod) {
|
58
51
|
return null;
|
59
52
|
}
|
@@ -61,7 +54,7 @@ export class JavaScriptMetadataImpl implements Common.JavaScriptMetaData.JavaScr
|
|
61
54
|
}
|
62
55
|
|
63
56
|
signaturesForStaticMethod(name: string, receiverConstructorName: string): string[][]|null {
|
64
|
-
const staticMethod = this.
|
57
|
+
const staticMethod = this.receiverMethods.get(receiverConstructorName + 'Constructor');
|
65
58
|
if (!staticMethod) {
|
66
59
|
return null;
|
67
60
|
}
|