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.
Files changed (65) hide show
  1. package/config/gni/devtools_grd_files.gni +64 -0
  2. package/front_end/core/i18n/locales/en-US.json +18 -0
  3. package/front_end/core/i18n/locales/en-XL.json +18 -0
  4. package/front_end/core/sdk/CSSMatchedStyles.ts +1 -1
  5. package/front_end/core/sdk/ChildTargetManager.ts +2 -2
  6. package/front_end/core/sdk/Connections.ts +6 -1
  7. package/front_end/core/sdk/NetworkManager.ts +4 -3
  8. package/front_end/entrypoints/lighthouse_worker/LighthouseService.ts +84 -13
  9. package/front_end/models/persistence/NetworkPersistenceManager.ts +205 -41
  10. package/front_end/models/timeline_model/TimelineFrameModel.ts +21 -7
  11. package/front_end/panels/animation/animationTimeline.css +0 -3
  12. package/front_end/panels/application/components/ReportsGrid.ts +19 -4
  13. package/front_end/panels/application/components/trustTokensViewDeleteButton.css +0 -1
  14. package/front_end/panels/console/consolePinPane.css +0 -17
  15. package/front_end/panels/css_overview/cssOverviewCompletedView.css +0 -1
  16. package/front_end/panels/elements/components/adornerSettingsPane.css +0 -1
  17. package/front_end/panels/elements/components/computedStyleTrace.css +1 -1
  18. package/front_end/panels/elements/components/elementsBreadcrumbs.css +0 -1
  19. package/front_end/panels/elements/computedStyleWidgetTree.css +2 -2
  20. package/front_end/panels/elements/elementsTreeOutline.css +0 -2
  21. package/front_end/panels/emulation/deviceModeView.css +0 -1
  22. package/front_end/panels/event_listeners/eventListenersView.css +0 -1
  23. package/front_end/panels/issues/components/hideIssuesMenu.css +0 -1
  24. package/front_end/panels/lighthouse/LighthouseController.ts +25 -1
  25. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +37 -5
  26. package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -0
  27. package/front_end/panels/lighthouse/LighthouseStatusView.ts +5 -5
  28. package/front_end/panels/media/playerListView.css +0 -1
  29. package/front_end/panels/network/networkLogView.css +0 -4
  30. package/front_end/panels/network/requestPayloadTree.css +0 -2
  31. package/front_end/panels/network/signedExchangeInfoTree.css +0 -1
  32. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +0 -4
  33. package/front_end/panels/settings/emulation/devicesSettingsTab.css +0 -1
  34. package/front_end/panels/sources/CSSPlugin.ts +2 -0
  35. package/front_end/panels/sources/ScopeChainSidebarPane.ts +31 -0
  36. package/front_end/panels/sources/SourceMapNamesResolver.ts +15 -9
  37. package/front_end/panels/sources/watchExpressionsSidebarPane.css +0 -1
  38. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +75 -3
  39. package/front_end/panels/webauthn/webauthnPane.css +0 -12
  40. package/front_end/services/puppeteer/PuppeteerConnection.ts +107 -0
  41. package/front_end/services/puppeteer/puppeteer.ts +9 -0
  42. package/front_end/third_party/codemirror/package/addon/fold/foldgutter.css +1 -5
  43. package/front_end/third_party/codemirror.next/README.chromium +10 -0
  44. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  45. package/front_end/third_party/codemirror.next/chunk/cpp.js +2 -1
  46. package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -2
  47. package/front_end/third_party/codemirror.next/chunk/python.js +2 -1
  48. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +574 -553
  49. package/front_end/third_party/codemirror.next/package.json +11 -11
  50. package/front_end/ui/components/adorners/adorner.css +0 -4
  51. package/front_end/ui/components/buttons/button.css +0 -4
  52. package/front_end/ui/components/data_grid/dataGrid.css +0 -4
  53. package/front_end/ui/components/icon_button/iconButton.css +0 -1
  54. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +2 -2
  55. package/front_end/ui/legacy/TabbedPane.ts +1 -1
  56. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -2
  57. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +4 -2
  58. package/front_end/ui/legacy/tabbedPane.css +0 -4
  59. package/front_end/ui/legacy/textButton.css +0 -1
  60. package/front_end/ui/legacy/toolbar.css +0 -1
  61. package/package.json +2 -2
  62. package/scripts/build/devtools_plugin.js +32 -1
  63. package/scripts/build/esbuild.js +1 -24
  64. package/scripts/build/tests/plugins_test.js +60 -1
  65. 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.7",
8
+ "@codemirror/commands": "0.19.8",
9
9
  "@codemirror/comment": "0.19.0",
10
- "@codemirror/fold": "0.19.2",
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.6",
18
+ "@codemirror/lang-javascript": "0.19.7",
19
19
  "@codemirror/lang-json": "0.19.1",
20
- "@codemirror/lang-markdown": "0.19.4",
20
+ "@codemirror/lang-markdown": "0.19.6",
21
21
  "@codemirror/lang-php": "0.19.1",
22
- "@codemirror/lang-python": "0.19.2",
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.5",
30
+ "@codemirror/search": "0.19.6",
31
31
  "@codemirror/state": "0.19.6",
32
- "@codemirror/stream-parser": "0.19.3",
33
- "@codemirror/text": "0.19.5",
34
- "@codemirror/tooltip": "0.19.12",
35
- "@codemirror/view": "0.19.39",
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.6",
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",
@@ -12,10 +12,6 @@
12
12
  display: none;
13
13
  }
14
14
 
15
- :host(.clickable) {
16
- cursor: pointer;
17
- }
18
-
19
15
  slot {
20
16
  display: inline-flex;
21
17
  box-sizing: border-box;
@@ -49,10 +49,6 @@ button:focus-visible {
49
49
  box-shadow: 0 0 0 2px var(--color-button-outline-focus);
50
50
  }
51
51
 
52
- button:hover {
53
- cursor: pointer;
54
- }
55
-
56
52
  button.toolbar {
57
53
  background: transparent;
58
54
  border-radius: 2px;
@@ -115,10 +115,6 @@ th.firstVisibleColumn {
115
115
  padding: 1px;
116
116
  }
117
117
 
118
- [aria-sort]:hover {
119
- cursor: pointer;
120
- }
121
-
122
118
  [aria-sort="descending"]::after {
123
119
  content: "";
124
120
  width: 0;
@@ -21,7 +21,6 @@
21
21
  }
22
22
 
23
23
  .icon-button.with-click-handler {
24
- cursor: pointer;
25
24
  border: 1px solid var(--color-details-hairline);
26
25
  border-radius: 2px;
27
26
  }
@@ -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
- '-webkit-grabbing', 'pointer', 200);
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 Promise.resolve((null as Element | null));
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
- const position = textEditor.toOffset({lineNumber: this.lineToScrollTo, columnNumber: 0});
582
- textEditor.dispatch({effects: CodeMirror.EditorView.scrollTo.of(CodeMirror.EditorSelection.cursor(position))});
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;
@@ -27,7 +27,6 @@
27
27
  .text-button:not(:disabled):active {
28
28
  background-color: var(--color-background-elevation-1);
29
29
  box-shadow: 0 1px 2px var(--divider-line);
30
- cursor: pointer;
31
30
  }
32
31
 
33
32
  .text-button:not(:disabled):active {
@@ -80,7 +80,6 @@ select.toolbar-item:disabled + .toolbar-dropdown-arrow {
80
80
  min-width: 28px;
81
81
  background: transparent;
82
82
  border-radius: 0;
83
- cursor: pointer;
84
83
  }
85
84
 
86
85
  .toolbar-text {
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.968254"
57
+ "version": "1.0.970302"
58
58
  }
@@ -111,4 +111,35 @@ function devtoolsPlugin(source, importer) {
111
111
  };
112
112
  }
113
113
 
114
- module.exports = {devtoolsPlugin};
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
+ };
@@ -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: /.*/}, args => {
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
  });