chrome-devtools-frontend 1.0.972361 → 1.0.973446
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 -1
- package/front_end/core/i18n/locales/en-US.json +24 -0
- package/front_end/core/i18n/locales/en-XL.json +24 -0
- package/front_end/core/sdk/NetworkManager.ts +15 -7
- package/front_end/core/sdk/NetworkRequest.ts +16 -14
- package/front_end/core/sdk/ResourceTreeModel.ts +8 -10
- package/front_end/core/sdk/SourceMap.ts +9 -9
- package/front_end/entrypoints/lighthouse_worker/{LighthouseService.ts → LighthouseWorkerService.ts} +69 -36
- package/front_end/entrypoints/lighthouse_worker/lighthouse_worker.ts +1 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +4 -3
- package/front_end/models/har/HARFormat.ts +4 -2
- package/front_end/models/har/Importer.ts +0 -1
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +4 -4
- package/front_end/models/persistence/IsolatedFileSystem.ts +0 -1
- package/front_end/models/text_utils/StaticContentProvider.ts +5 -4
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +2 -1
- package/front_end/panels/elements/components/LayoutPane.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +13 -2
- package/front_end/panels/lighthouse/LighthousePanel.ts +57 -8
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +94 -30
- package/front_end/panels/lighthouse/LighthouseStartView.ts +6 -2
- package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +61 -0
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +99 -0
- package/front_end/panels/sources/NavigatorView.ts +1 -3
- package/front_end/third_party/codemirror.next/bundle.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/json.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +28 -2
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +10 -10
- package/front_end/ui/components/expandable_list/expandableList.css +1 -1
- package/front_end/ui/components/text_editor/config.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +7 -4
- package/package.json +1 -1
@@ -0,0 +1,99 @@
|
|
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 * as i18n from '../../core/i18n/i18n.js';
|
6
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
7
|
+
|
8
|
+
import type {LighthouseController} from './LighthouseController.js';
|
9
|
+
import {Events} from './LighthouseController.js';
|
10
|
+
import lighthouseDialogStyles from './lighthouseDialog.css.js';
|
11
|
+
|
12
|
+
const UIStrings = {
|
13
|
+
/**
|
14
|
+
* @description Header indicating that a Lighthouse timespan is starting.
|
15
|
+
*/
|
16
|
+
timespanStarting: 'Timespan starting…',
|
17
|
+
/**
|
18
|
+
* @description Header indicating that a Lighthouse timespan has started.
|
19
|
+
*/
|
20
|
+
timespanStarted: 'Timespan started, interact with the page',
|
21
|
+
/**
|
22
|
+
* @description Label for a button that ends a Lighthouse timespan.
|
23
|
+
*/
|
24
|
+
endTimespan: 'End timespan',
|
25
|
+
/**
|
26
|
+
* @description Label for a button that cancels a Lighthouse timespan.
|
27
|
+
*/
|
28
|
+
cancel: 'Cancel',
|
29
|
+
};
|
30
|
+
|
31
|
+
const str_ = i18n.i18n.registerUIStrings('panels/lighthouse/LighthouseTimespanView.ts', UIStrings);
|
32
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
33
|
+
|
34
|
+
export class TimespanView extends UI.Dialog.Dialog {
|
35
|
+
private controller: LighthouseController;
|
36
|
+
private statusHeader: Element|null;
|
37
|
+
private endButton: HTMLButtonElement|null;
|
38
|
+
|
39
|
+
constructor(controller: LighthouseController) {
|
40
|
+
super();
|
41
|
+
this.controller = controller;
|
42
|
+
this.statusHeader = null;
|
43
|
+
this.endButton = null;
|
44
|
+
this.setDimmed(true);
|
45
|
+
this.setCloseOnEscape(false);
|
46
|
+
this.setOutsideClickCallback(event => event.consume(true));
|
47
|
+
this.render();
|
48
|
+
}
|
49
|
+
|
50
|
+
show(dialogRenderElement: Element): void {
|
51
|
+
this.reset();
|
52
|
+
super.show(dialogRenderElement);
|
53
|
+
}
|
54
|
+
|
55
|
+
reset(): void {
|
56
|
+
if (this.statusHeader && this.endButton) {
|
57
|
+
this.statusHeader.textContent = i18nString(UIStrings.timespanStarting);
|
58
|
+
this.endButton.disabled = true;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
ready(): void {
|
63
|
+
if (this.statusHeader && this.endButton) {
|
64
|
+
this.statusHeader.textContent = i18nString(UIStrings.timespanStarted);
|
65
|
+
this.endButton.disabled = false;
|
66
|
+
this.endButton.focus();
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
render(): void {
|
71
|
+
const dialogRoot = UI.Utils.createShadowRootWithCoreStyles(
|
72
|
+
this.contentElement, {cssFile: [lighthouseDialogStyles], delegatesFocus: undefined});
|
73
|
+
|
74
|
+
this.endButton = UI.UIUtils.createTextButton(i18nString(UIStrings.endTimespan), this.endTimespan.bind(this));
|
75
|
+
const cancelButton = UI.UIUtils.createTextButton(i18nString(UIStrings.cancel), this.cancel.bind(this));
|
76
|
+
const fragment = UI.Fragment.Fragment.build`
|
77
|
+
<div class="lighthouse-view vbox">
|
78
|
+
<h2 $="status-header"></h2>
|
79
|
+
${this.endButton}
|
80
|
+
${cancelButton}
|
81
|
+
</div>
|
82
|
+
`;
|
83
|
+
|
84
|
+
this.statusHeader = fragment.$('status-header');
|
85
|
+
dialogRoot.appendChild(fragment.element());
|
86
|
+
|
87
|
+
this.setSizeBehavior(UI.GlassPane.SizeBehavior.SetExactWidthMaxHeight);
|
88
|
+
this.setMaxContentSize(new UI.Geometry.Size(500, 400));
|
89
|
+
this.reset();
|
90
|
+
}
|
91
|
+
|
92
|
+
private endTimespan(): void {
|
93
|
+
this.controller.dispatchEventToListeners(Events.RequestLighthouseTimespanEnd, false);
|
94
|
+
}
|
95
|
+
|
96
|
+
private cancel(): void {
|
97
|
+
this.controller.dispatchEventToListeners(Events.RequestLighthouseCancel);
|
98
|
+
}
|
99
|
+
}
|
@@ -854,10 +854,8 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
|
|
854
854
|
}
|
855
855
|
|
856
856
|
if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {
|
857
|
-
// TODO(crbug.com/1253323): Cast to RawPathString will be removed when migration to branded types is complete.
|
858
857
|
const folderPath = Common.ParsedURL.ParsedURL.urlToRawPathString(
|
859
|
-
Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.completeURL(project, path)
|
860
|
-
Platform.DevToolsPath.UrlString,
|
858
|
+
Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.completeURL(project, path),
|
861
859
|
Host.Platform.isWin());
|
862
860
|
contextMenu.revealSection().appendItem(
|
863
861
|
i18nString(UIStrings.openFolder),
|
@@ -30,7 +30,7 @@ export {ensureSyntaxTree, indentOnInput, indentUnit,Language, LanguageSupport, s
|
|
30
30
|
export {bracketMatching} from '@codemirror/matchbrackets';
|
31
31
|
export {Panel, showPanel} from '@codemirror/panel';
|
32
32
|
export {Range, RangeSet, RangeSetBuilder} from '@codemirror/rangeset';
|
33
|
-
export {selectNextOccurrence} from '@codemirror/search';
|
33
|
+
export { highlightSelectionMatches,selectNextOccurrence} from '@codemirror/search';
|
34
34
|
export {
|
35
35
|
Annotation, AnnotationType, ChangeDesc, ChangeSet, ChangeSpec, Compartment,
|
36
36
|
EditorSelection, EditorState, EditorStateConfig, Extension, Facet, MapMode
|