chrome-devtools-frontend 1.0.968254 → 1.0.970302
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 +64 -0
- package/front_end/core/i18n/locales/en-US.json +18 -0
- package/front_end/core/i18n/locales/en-XL.json +18 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +1 -1
- package/front_end/core/sdk/ChildTargetManager.ts +2 -2
- package/front_end/core/sdk/Connections.ts +6 -1
- package/front_end/core/sdk/NetworkManager.ts +4 -3
- package/front_end/entrypoints/lighthouse_worker/LighthouseService.ts +84 -13
- package/front_end/models/persistence/NetworkPersistenceManager.ts +205 -41
- package/front_end/models/timeline_model/TimelineFrameModel.ts +21 -7
- package/front_end/panels/animation/animationTimeline.css +0 -3
- package/front_end/panels/application/components/ReportsGrid.ts +19 -4
- package/front_end/panels/application/components/trustTokensViewDeleteButton.css +0 -1
- package/front_end/panels/console/consolePinPane.css +0 -17
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +0 -1
- package/front_end/panels/elements/components/adornerSettingsPane.css +0 -1
- package/front_end/panels/elements/components/computedStyleTrace.css +1 -1
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +0 -1
- package/front_end/panels/elements/computedStyleWidgetTree.css +2 -2
- package/front_end/panels/elements/elementsTreeOutline.css +0 -2
- package/front_end/panels/emulation/deviceModeView.css +0 -1
- package/front_end/panels/event_listeners/eventListenersView.css +0 -1
- package/front_end/panels/issues/components/hideIssuesMenu.css +0 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +25 -1
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +37 -5
- package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -0
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +5 -5
- package/front_end/panels/media/playerListView.css +0 -1
- package/front_end/panels/network/networkLogView.css +0 -4
- package/front_end/panels/network/requestPayloadTree.css +0 -2
- package/front_end/panels/network/signedExchangeInfoTree.css +0 -1
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +0 -4
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +0 -1
- package/front_end/panels/sources/CSSPlugin.ts +2 -0
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +31 -0
- package/front_end/panels/sources/SourceMapNamesResolver.ts +15 -9
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +0 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +75 -3
- package/front_end/panels/webauthn/webauthnPane.css +0 -12
- package/front_end/services/puppeteer/PuppeteerConnection.ts +107 -0
- package/front_end/services/puppeteer/puppeteer.ts +9 -0
- package/front_end/third_party/codemirror/package/addon/fold/foldgutter.css +1 -5
- package/front_end/third_party/codemirror.next/README.chromium +10 -0
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +2 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/python.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +574 -553
- package/front_end/third_party/codemirror.next/package.json +11 -11
- package/front_end/ui/components/adorners/adorner.css +0 -4
- package/front_end/ui/components/buttons/button.css +0 -4
- package/front_end/ui/components/data_grid/dataGrid.css +0 -4
- package/front_end/ui/components/icon_button/iconButton.css +0 -1
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +4 -2
- package/front_end/ui/legacy/tabbedPane.css +0 -4
- package/front_end/ui/legacy/textButton.css +0 -1
- package/front_end/ui/legacy/toolbar.css +0 -1
- package/package.json +2 -2
- package/scripts/build/devtools_plugin.js +32 -1
- package/scripts/build/esbuild.js +1 -24
- package/scripts/build/tests/plugins_test.js +60 -1
- package/scripts/hosted_mode/server.js +5 -0
@@ -5,9 +5,9 @@
|
|
5
5
|
"dependencies": {
|
6
6
|
"@codemirror/autocomplete": "0.19.12",
|
7
7
|
"@codemirror/closebrackets": "0.19.0",
|
8
|
-
"@codemirror/commands": "0.19.
|
8
|
+
"@codemirror/commands": "0.19.8",
|
9
9
|
"@codemirror/comment": "0.19.0",
|
10
|
-
"@codemirror/fold": "0.19.
|
10
|
+
"@codemirror/fold": "0.19.3",
|
11
11
|
"@codemirror/gutter": "0.19.9",
|
12
12
|
"@codemirror/highlight": "0.19.7",
|
13
13
|
"@codemirror/history": "0.19.2",
|
@@ -15,11 +15,11 @@
|
|
15
15
|
"@codemirror/lang-css": "0.19.3",
|
16
16
|
"@codemirror/lang-html": "0.19.4",
|
17
17
|
"@codemirror/lang-java": "0.19.1",
|
18
|
-
"@codemirror/lang-javascript": "0.19.
|
18
|
+
"@codemirror/lang-javascript": "0.19.7",
|
19
19
|
"@codemirror/lang-json": "0.19.1",
|
20
|
-
"@codemirror/lang-markdown": "0.19.
|
20
|
+
"@codemirror/lang-markdown": "0.19.6",
|
21
21
|
"@codemirror/lang-php": "0.19.1",
|
22
|
-
"@codemirror/lang-python": "0.19.
|
22
|
+
"@codemirror/lang-python": "0.19.4",
|
23
23
|
"@codemirror/lang-wast": "0.19.0",
|
24
24
|
"@codemirror/lang-xml": "0.19.2",
|
25
25
|
"@codemirror/language": "0.19.7",
|
@@ -27,14 +27,14 @@
|
|
27
27
|
"@codemirror/matchbrackets": "0.19.3",
|
28
28
|
"@codemirror/panel": "0.19.1",
|
29
29
|
"@codemirror/rangeset": "0.19.6",
|
30
|
-
"@codemirror/search": "0.19.
|
30
|
+
"@codemirror/search": "0.19.6",
|
31
31
|
"@codemirror/state": "0.19.6",
|
32
|
-
"@codemirror/stream-parser": "0.19.
|
33
|
-
"@codemirror/text": "0.19.
|
34
|
-
"@codemirror/tooltip": "0.19.
|
35
|
-
"@codemirror/view": "0.19.
|
32
|
+
"@codemirror/stream-parser": "0.19.5",
|
33
|
+
"@codemirror/text": "0.19.6",
|
34
|
+
"@codemirror/tooltip": "0.19.13",
|
35
|
+
"@codemirror/view": "0.19.42",
|
36
36
|
"@lezer/common": "0.15.11",
|
37
|
-
"@lezer/lr": "0.15.
|
37
|
+
"@lezer/lr": "0.15.8",
|
38
38
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
39
39
|
"rollup-plugin-dts": "^4.0.0",
|
40
40
|
"rollup-plugin-terser": "^7.0.2",
|
@@ -37,8 +37,8 @@ export const markdownLinks = new Map<string, string>([
|
|
37
37
|
],
|
38
38
|
['https://developer.chrome.com/docs/extensions/mv3/', 'https://developer.chrome.com/docs/extensions/mv3/'],
|
39
39
|
[
|
40
|
-
'https://developer.chrome.com/blog/immutable-document-domain',
|
41
|
-
'https://developer.chrome.com/blog/immutable-document-domain',
|
40
|
+
'https://developer.chrome.com/blog/immutable-document-domain/',
|
41
|
+
'https://developer.chrome.com/blog/immutable-document-domain/',
|
42
42
|
],
|
43
43
|
]);
|
44
44
|
|
@@ -1144,7 +1144,7 @@ export class TabbedPaneTab {
|
|
1144
1144
|
if (this.tabbedPane.allowTabReorder) {
|
1145
1145
|
installDragHandle(
|
1146
1146
|
tabElement, this.startTabDragging.bind(this), this.tabDragging.bind(this), this.endTabDragging.bind(this),
|
1147
|
-
|
1147
|
+
null, null, 200);
|
1148
1148
|
}
|
1149
1149
|
}
|
1150
1150
|
|
@@ -388,8 +388,8 @@ export class TimelineOverviewBase extends UI.Widget.VBox implements TimelineOver
|
|
388
388
|
reset(): void {
|
389
389
|
}
|
390
390
|
|
391
|
-
overviewInfoPromise(_x: number): Promise<Element|null> {
|
392
|
-
return
|
391
|
+
async overviewInfoPromise(_x: number): Promise<Element|null> {
|
392
|
+
return null;
|
393
393
|
}
|
394
394
|
|
395
395
|
setCalculator(calculator: TimelineOverviewCalculator): void {
|
@@ -578,8 +578,10 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
578
578
|
if (this.lineToScrollTo !== null) {
|
579
579
|
if (this.loaded && this.isShowing()) {
|
580
580
|
const {textEditor} = this;
|
581
|
-
|
582
|
-
|
581
|
+
// DevTools history items are 0-based, but CodeMirror is 1-based, so we have to increment the
|
582
|
+
// line we want to scroll to by 1.
|
583
|
+
const position = textEditor.toOffset({lineNumber: this.lineToScrollTo + 1, columnNumber: 0});
|
584
|
+
textEditor.dispatch({effects: CodeMirror.EditorView.scrollIntoView(position, {y: 'start'})});
|
583
585
|
this.lineToScrollTo = null;
|
584
586
|
}
|
585
587
|
}
|
@@ -269,10 +269,6 @@
|
|
269
269
|
align-items: center;
|
270
270
|
}
|
271
271
|
|
272
|
-
.tabbed-pane-shadow.vertical-tab-layout .tabbed-pane-header-tab:not(.selected) {
|
273
|
-
cursor: pointer !important; /* stylelint-disable-line declaration-no-important */
|
274
|
-
}
|
275
|
-
|
276
272
|
/* stylelint-disable no-descending-specificity */
|
277
273
|
.tabbed-pane-shadow.vertical-tab-layout .tabbed-pane-header-tab.selected {
|
278
274
|
--override-vertical-tab-selected-border-color: #666;
|
package/package.json
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
"auto-debug-interactionstest": "autoninja -C out/Default && npm run debug-interactionstest --",
|
24
24
|
"auto-debug-unittest": "DEBUG_TEST=1 npm run auto-unittest --",
|
25
25
|
"auto-e2etest": "autoninja -C out/Default && npm run e2etest --",
|
26
|
-
"auto-interactionstest": "autoninja -C out/Default && npm run interactionstest",
|
26
|
+
"auto-interactionstest": "autoninja -C out/Default && npm run interactionstest --",
|
27
27
|
"auto-unittest": "scripts/test/run_auto_unittests.py --no-text-coverage",
|
28
28
|
"build": "autoninja -C out/Default",
|
29
29
|
"build-release": "autoninja -C out/Release",
|
@@ -54,5 +54,5 @@
|
|
54
54
|
"unittest": "scripts/test/run_unittests.py --no-text-coverage",
|
55
55
|
"watch": "third_party/node/node.py --output scripts/watch_build.js"
|
56
56
|
},
|
57
|
-
"version": "1.0.
|
57
|
+
"version": "1.0.970302"
|
58
58
|
}
|
@@ -111,4 +111,35 @@ function devtoolsPlugin(source, importer) {
|
|
111
111
|
};
|
112
112
|
}
|
113
113
|
|
114
|
-
|
114
|
+
function esbuildPlugin(outdir) {
|
115
|
+
return args => {
|
116
|
+
// args.importer is absolute path in esbuild.
|
117
|
+
const res = devtoolsPlugin(args.path, args.importer);
|
118
|
+
if (!res) {
|
119
|
+
return null;
|
120
|
+
}
|
121
|
+
|
122
|
+
if (res.external) {
|
123
|
+
// res.id can be both of absolutized local JavaScript path or node's
|
124
|
+
// builtin module (e.g. 'fs', 'path'), and only relativize the path in
|
125
|
+
// former case.
|
126
|
+
if (path.isAbsolute(res.id)) {
|
127
|
+
res.id = './' + path.relative(outdir, res.id);
|
128
|
+
}
|
129
|
+
|
130
|
+
return {
|
131
|
+
external: res.external,
|
132
|
+
path: res.id,
|
133
|
+
};
|
134
|
+
}
|
135
|
+
|
136
|
+
return {
|
137
|
+
path: res.id,
|
138
|
+
};
|
139
|
+
};
|
140
|
+
}
|
141
|
+
|
142
|
+
module.exports = {
|
143
|
+
devtoolsPlugin,
|
144
|
+
esbuildPlugin
|
145
|
+
};
|
package/scripts/build/esbuild.js
CHANGED
@@ -21,30 +21,7 @@ const plugin = {
|
|
21
21
|
name: 'devtools-plugin',
|
22
22
|
setup(build) {
|
23
23
|
// https://esbuild.github.io/plugins/#on-resolve
|
24
|
-
build.onResolve({filter: /.*/},
|
25
|
-
const res = devtools_plugin.devtoolsPlugin(args.path, args.importer);
|
26
|
-
if (!res) {
|
27
|
-
return null;
|
28
|
-
}
|
29
|
-
|
30
|
-
if (res.external) {
|
31
|
-
// res.id can be both of absolutized local JavaScript path or node's
|
32
|
-
// builtin module (e.g. 'fs', 'path'), and only relativize the path in
|
33
|
-
// former case.
|
34
|
-
if (path.isAbsolute(res.id)) {
|
35
|
-
res.id = './' + path.relative(outdir, res.id);
|
36
|
-
}
|
37
|
-
|
38
|
-
return {
|
39
|
-
external: res.external,
|
40
|
-
path: res.id,
|
41
|
-
};
|
42
|
-
}
|
43
|
-
|
44
|
-
return {
|
45
|
-
path: res.id,
|
46
|
-
};
|
47
|
-
});
|
24
|
+
build.onResolve({filter: /.*/}, devtools_plugin.esbuildPlugin(outdir));
|
48
25
|
},
|
49
26
|
};
|
50
27
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
const {assert} = require('chai');
|
6
6
|
const path = require('path');
|
7
7
|
|
8
|
-
const {devtoolsPlugin} = require('../devtools_plugin.js');
|
8
|
+
const {devtoolsPlugin, esbuildPlugin} = require('../devtools_plugin.js');
|
9
9
|
|
10
10
|
describe('devtools_plugin can compute paths with', () => {
|
11
11
|
it('same directory import', () => {
|
@@ -27,4 +27,63 @@ describe('devtools_plugin can compute paths with', () => {
|
|
27
27
|
it('importing generated files', () => {
|
28
28
|
assert.strictEqual(devtoolsPlugin('../../generated/Protocol.js', 'front_end/core/sdk/FirstFile.js'), null);
|
29
29
|
});
|
30
|
+
|
31
|
+
it('importing lighthouse files', () => {
|
32
|
+
assert.deepEqual(
|
33
|
+
devtoolsPlugin('./front_end/third_party/lighthouse/lighthouse-dt-bundle.js', 'front_end/core/sdk/FirstFile.js'),
|
34
|
+
{
|
35
|
+
id: path.join(
|
36
|
+
'front_end', 'core', 'sdk', 'front_end', 'third_party', 'lighthouse', 'lighthouse-dt-bundle.js'),
|
37
|
+
external: true,
|
38
|
+
});
|
39
|
+
});
|
40
|
+
});
|
41
|
+
|
42
|
+
describe('esbuild_plugin can compute paths with', () => {
|
43
|
+
const srcdir = __dirname;
|
44
|
+
const outdir = path.join(srcdir, 'out');
|
45
|
+
const plugin = esbuildPlugin(outdir);
|
46
|
+
it('same directory import', () => {
|
47
|
+
assert.deepEqual(
|
48
|
+
plugin({path: './AnotherFile.js', importer: path.join(srcdir, 'front_end/core/sdk/FirstFile.js')}),
|
49
|
+
{path: path.join(srcdir, 'front_end', 'core', 'sdk', 'AnotherFile.js')});
|
50
|
+
});
|
51
|
+
|
52
|
+
it('different directory import', () => {
|
53
|
+
assert.deepEqual(
|
54
|
+
plugin({path: '../common/common.js', importer: path.join(srcdir, 'front_end/core/sdk/FirstFile.js')}),
|
55
|
+
{path: './' + path.join('..', 'front_end', 'core', 'common', 'common.js'), external: true});
|
56
|
+
});
|
57
|
+
|
58
|
+
it('node built-in modules', () => {
|
59
|
+
assert.deepEqual(
|
60
|
+
plugin({path: 'fs', importer: path.join(srcdir, 'scripts/some-script.js')}), {path: 'fs', external: true});
|
61
|
+
});
|
62
|
+
|
63
|
+
it('codemirror modules', () => {
|
64
|
+
assert.deepEqual(
|
65
|
+
plugin({path: '../../lib/codemirror', importer: path.join(srcdir, 'scripts/some-script.js')}),
|
66
|
+
{path: '../../lib/codemirror', external: true});
|
67
|
+
});
|
68
|
+
|
69
|
+
it('importing generated files', () => {
|
70
|
+
assert.strictEqual(
|
71
|
+
plugin({path: '../../generated/Protocol.js', importer: path.join(srcdir, 'front_end/core/sdk/FirstFile.js')}),
|
72
|
+
null);
|
73
|
+
});
|
74
|
+
|
75
|
+
it('importing lighthouse files', () => {
|
76
|
+
assert.deepEqual(
|
77
|
+
plugin({
|
78
|
+
path: './front_end/third_party/lighthouse/lighthouse-dt-bundle.js',
|
79
|
+
importer: path.join(srcdir, 'front_end/core/sdk/FirstFile.js')
|
80
|
+
}),
|
81
|
+
{
|
82
|
+
path: './' +
|
83
|
+
path.join(
|
84
|
+
'..', 'front_end', 'core', 'sdk', 'front_end', 'third_party', 'lighthouse',
|
85
|
+
'lighthouse-dt-bundle.js'),
|
86
|
+
external: true,
|
87
|
+
});
|
88
|
+
});
|
30
89
|
});
|
@@ -172,6 +172,11 @@ async function requestHandler(request, response) {
|
|
172
172
|
headers.set('Content-Type', inferredContentType);
|
173
173
|
}
|
174
174
|
}
|
175
|
+
if (!headers.get('Cache-Control')) {
|
176
|
+
// Lets reduce Disk I/O by allowing clients to cache resources.
|
177
|
+
// This is fine to do given that test invocations run against fresh Chrome profiles.
|
178
|
+
headers.set('Cache-Control', 'max-age=3600');
|
179
|
+
}
|
175
180
|
headers.forEach((value, header) => {
|
176
181
|
response.setHeader(header, value);
|
177
182
|
});
|