chrome-devtools-frontend 1.0.998281 → 1.0.999791
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/.clang-format +1 -0
- package/front_end/core/common/Color.ts +9 -1
- package/front_end/core/common/Object.ts +2 -1
- package/front_end/core/common/Settings.ts +13 -1
- package/front_end/core/dom_extension/DOMExtension.ts +0 -10
- package/front_end/core/host/InspectorFrontendHost.ts +4 -1
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +4 -10
- package/front_end/core/i18n/locales/en-XL.json +4 -10
- package/front_end/core/sdk/CSSProperty.ts +6 -7
- package/front_end/core/sdk/ChildTargetManager.ts +0 -3
- package/front_end/core/sdk/ConsoleModel.ts +2 -1
- package/front_end/core/sdk/DebuggerModel.ts +4 -30
- package/front_end/core/sdk/NetworkManager.ts +3 -1
- package/front_end/core/sdk/RuntimeModel.ts +7 -1
- package/front_end/core/sdk/SourceMapManager.ts +10 -1
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +5 -1
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +31 -0
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +15 -0
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +6 -0
- package/front_end/generated/InspectorBackendCommands.js +0 -1
- package/front_end/generated/protocol.ts +0 -1
- package/front_end/legacy/legacy-defs.d.ts +2 -2
- package/front_end/models/formatter/ScriptFormatter.ts +3 -1
- package/front_end/models/issues_manager/DeprecationIssue.ts +202 -201
- package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +5 -1
- package/front_end/models/text_utils/CodeMirrorUtils.ts +14 -17
- package/front_end/models/timeline_model/TimelineModel.ts +1 -1
- package/front_end/panels/application/IndexedDBViews.ts +5 -2
- package/front_end/panels/console/ConsoleView.ts +9 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -1
- package/front_end/panels/elements/PropertiesWidget.ts +0 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +7 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +19 -12
- package/front_end/panels/lighthouse/LighthousePanel.ts +3 -2
- package/front_end/panels/lighthouse/LighthouseStartView.ts +10 -4
- package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +50 -48
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +9 -2
- package/front_end/panels/lighthouse/lighthouseDialog.css +5 -0
- package/front_end/panels/lighthouse/lighthouseStartView.css +3 -3
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +3 -1
- package/front_end/panels/network/NetworkLogView.ts +5 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -1
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +8 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +3 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +14 -2
- package/front_end/panels/sources/SourcesPanel.ts +7 -1
- package/front_end/panels/timeline/TimelineController.ts +1 -1
- package/front_end/panels/timeline/TimelineEventOverview.ts +0 -60
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -9
- package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -1
- package/front_end/panels/timeline/TimelineHistoryManager.ts +5 -2
- package/front_end/panels/timeline/TimelinePanel.ts +9 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +7 -34
- package/front_end/panels/timeline/timeline-legacy.ts +0 -3
- package/front_end/panels/timeline/timelinePanel.css +0 -6
- package/front_end/panels/web_audio/graph_visualizer/GraphView.ts +3 -1
- package/front_end/panels/web_audio/graph_visualizer/NodeRendererUtility.ts +8 -1
- package/front_end/panels/web_audio/graph_visualizer/NodeView.ts +13 -1
- package/front_end/panels/web_audio/web_audio.ts +8 -1
- package/front_end/ui/components/buttons/button.css +16 -3
- package/front_end/ui/components/data_grid/DataGrid.ts +9 -1
- package/front_end/ui/components/docs/button/basic.ts +10 -0
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +11 -3
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +12 -1
- package/front_end/ui/components/tree_outline/TreeOutline.ts +16 -11
- package/front_end/ui/legacy/ActionRegistration.ts +1 -0
- package/front_end/ui/legacy/Fragment.ts +2 -2
- package/front_end/ui/legacy/Toolbar.ts +4 -0
- package/front_end/ui/legacy/ViewManager.ts +12 -1
- package/front_end/ui/legacy/XLink.ts +6 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +8 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngleEditor.ts +7 -1
- package/package.json +1 -1
- package/scripts/reformat-clang-js-ts.js +60 -0
@@ -28,14 +28,17 @@
|
|
28
28
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
29
|
*/
|
30
30
|
|
31
|
-
import indexedDBViewsStyles from './indexedDBViews.css.js';
|
32
31
|
import * as i18n from '../../core/i18n/i18n.js';
|
32
|
+
|
33
|
+
import indexedDBViewsStyles from './indexedDBViews.css.js';
|
34
|
+
|
33
35
|
import type * as SDK from '../../core/sdk/sdk.js';
|
34
36
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
35
37
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
36
38
|
import * as UI from '../../ui/legacy/legacy.js';
|
37
39
|
|
38
|
-
import type {
|
40
|
+
import type {
|
41
|
+
Database, DatabaseId, Entry, Index, IndexedDBModel, ObjectStore, ObjectStoreMetadata} from './IndexedDBModel.js';
|
39
42
|
|
40
43
|
const UIStrings = {
|
41
44
|
/**
|
@@ -56,7 +56,15 @@ import {ConsoleFilter, FilterType} from './ConsoleFilter.js';
|
|
56
56
|
import {ConsolePinPane} from './ConsolePinPane.js';
|
57
57
|
import {ConsolePrompt, Events as ConsolePromptEvents} from './ConsolePrompt.js';
|
58
58
|
import {ConsoleSidebar, Events} from './ConsoleSidebar.js';
|
59
|
-
import {
|
59
|
+
import {
|
60
|
+
ConsoleCommand,
|
61
|
+
ConsoleCommandResult,
|
62
|
+
ConsoleGroupViewMessage,
|
63
|
+
ConsoleTableMessageView,
|
64
|
+
ConsoleViewMessage,
|
65
|
+
getMessageForElement,
|
66
|
+
MaxLengthForLinks,
|
67
|
+
} from './ConsoleViewMessage.js';
|
60
68
|
|
61
69
|
import type {ConsoleViewportElement, ConsoleViewportProvider} from './ConsoleViewport.js';
|
62
70
|
import {ConsoleViewport} from './ConsoleViewport.js';
|
@@ -14,7 +14,9 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
14
14
|
import type * as Protocol from '../../generated/protocol.js';
|
15
15
|
|
16
16
|
import cssOverviewCompletedViewStyles from './cssOverviewCompletedView.css.js';
|
17
|
-
import type {
|
17
|
+
import type {
|
18
|
+
OverviewController, PopulateNodesEvent, PopulateNodesEventNodes, PopulateNodesEventNodeTypes} from
|
19
|
+
'./CSSOverviewController.js';
|
18
20
|
import {Events as CSSOverViewControllerEvents} from './CSSOverviewController.js';
|
19
21
|
import {CSSOverviewSidebarPanel, SidebarEvents} from './CSSOverviewSidebarPanel.js';
|
20
22
|
import type {UnusedDeclaration} from './CSSOverviewUnusedDeclarations.js';
|
@@ -61,7 +61,13 @@ import {StylePropertyHighlighter} from './StylePropertyHighlighter.js';
|
|
61
61
|
import stylesSidebarPaneStyles from './stylesSidebarPane.css.js';
|
62
62
|
|
63
63
|
import type {StylePropertyTreeElement} from './StylePropertyTreeElement.js';
|
64
|
-
import {
|
64
|
+
import {
|
65
|
+
StylePropertiesSection,
|
66
|
+
BlankStylePropertiesSection,
|
67
|
+
KeyframePropertiesSection,
|
68
|
+
HighlightPseudoStylePropertiesSection,
|
69
|
+
} from './StylePropertiesSection.js';
|
70
|
+
|
65
71
|
import * as LayersWidget from './LayersWidget.js';
|
66
72
|
|
67
73
|
const UIStrings = {
|
@@ -399,14 +399,16 @@ export const Presets: Preset[] = [
|
|
399
399
|
title: i18nLazyString(UIStrings.performance),
|
400
400
|
description: i18nLazyString(UIStrings.howLongDoesThisAppTakeToShow),
|
401
401
|
plugin: false,
|
402
|
+
supportedModes: ['navigation', 'timespan', 'snapshot'],
|
402
403
|
},
|
403
404
|
{
|
404
405
|
setting: Common.Settings.Settings.instance().createSetting(
|
405
|
-
'lighthouse.
|
406
|
-
configID: '
|
407
|
-
title: i18nLazyString(UIStrings.
|
408
|
-
description: i18nLazyString(UIStrings.
|
406
|
+
'lighthouse.cat_a11y', true, Common.Settings.SettingStorageType.Synced),
|
407
|
+
configID: 'accessibility',
|
408
|
+
title: i18nLazyString(UIStrings.accessibility),
|
409
|
+
description: i18nLazyString(UIStrings.isThisPageUsableByPeopleWith),
|
409
410
|
plugin: false,
|
411
|
+
supportedModes: ['navigation', 'snapshot'],
|
410
412
|
},
|
411
413
|
{
|
412
414
|
setting: Common.Settings.Settings.instance().createSetting(
|
@@ -415,14 +417,7 @@ export const Presets: Preset[] = [
|
|
415
417
|
title: i18nLazyString(UIStrings.bestPractices),
|
416
418
|
description: i18nLazyString(UIStrings.doesThisPageFollowBestPractices),
|
417
419
|
plugin: false,
|
418
|
-
|
419
|
-
{
|
420
|
-
setting: Common.Settings.Settings.instance().createSetting(
|
421
|
-
'lighthouse.cat_a11y', true, Common.Settings.SettingStorageType.Synced),
|
422
|
-
configID: 'accessibility',
|
423
|
-
title: i18nLazyString(UIStrings.accessibility),
|
424
|
-
description: i18nLazyString(UIStrings.isThisPageUsableByPeopleWith),
|
425
|
-
plugin: false,
|
420
|
+
supportedModes: ['navigation', 'timespan', 'snapshot'],
|
426
421
|
},
|
427
422
|
{
|
428
423
|
setting: Common.Settings.Settings.instance().createSetting(
|
@@ -431,6 +426,16 @@ export const Presets: Preset[] = [
|
|
431
426
|
title: i18nLazyString(UIStrings.seo),
|
432
427
|
description: i18nLazyString(UIStrings.isThisPageOptimizedForSearch),
|
433
428
|
plugin: false,
|
429
|
+
supportedModes: ['navigation', 'snapshot'],
|
430
|
+
},
|
431
|
+
{
|
432
|
+
setting: Common.Settings.Settings.instance().createSetting(
|
433
|
+
'lighthouse.cat_pwa', true, Common.Settings.SettingStorageType.Synced),
|
434
|
+
configID: 'pwa',
|
435
|
+
title: i18nLazyString(UIStrings.progressiveWebApp),
|
436
|
+
description: i18nLazyString(UIStrings.doesThisPageMeetTheStandardOfA),
|
437
|
+
plugin: false,
|
438
|
+
supportedModes: ['navigation'],
|
434
439
|
},
|
435
440
|
{
|
436
441
|
setting: Common.Settings.Settings.instance().createSetting(
|
@@ -439,6 +444,7 @@ export const Presets: Preset[] = [
|
|
439
444
|
configID: 'lighthouse-plugin-publisher-ads',
|
440
445
|
title: i18nLazyString(UIStrings.publisherAds),
|
441
446
|
description: i18nLazyString(UIStrings.isThisPageOptimizedForAdSpeedAnd),
|
447
|
+
supportedModes: ['navigation'],
|
442
448
|
},
|
443
449
|
];
|
444
450
|
|
@@ -567,6 +573,7 @@ export interface Preset {
|
|
567
573
|
title: () => Common.UIString.LocalizedString;
|
568
574
|
description: () => Common.UIString.LocalizedString;
|
569
575
|
plugin: boolean;
|
576
|
+
supportedModes: string[];
|
570
577
|
}
|
571
578
|
export interface RuntimeSetting {
|
572
579
|
setting: Common.Settings.Setting<string|boolean>;
|
@@ -12,7 +12,8 @@ import * as EmulationModel from '../../models/emulation/emulation.js';
|
|
12
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
13
13
|
import * as Emulation from '../emulation/emulation.js';
|
14
14
|
|
15
|
-
import type {
|
15
|
+
import type {
|
16
|
+
AuditProgressChangedEvent, PageAuditabilityChangedEvent, PageWarningsChangedEvent} from './LighthouseController.js';
|
16
17
|
import {Events, LighthouseController} from './LighthouseController.js';
|
17
18
|
import lighthousePanelStyles from './lighthousePanel.css.js';
|
18
19
|
import type {LighthouseRun} from './LighthouseProtocolService.js';
|
@@ -174,7 +175,7 @@ export class LighthousePanel extends UI.Panel.Panel {
|
|
174
175
|
return;
|
175
176
|
}
|
176
177
|
|
177
|
-
this.startView.
|
178
|
+
this.startView.refresh();
|
178
179
|
|
179
180
|
this.unauditableExplanation = evt.data.helpText;
|
180
181
|
this.startView.setUnauditableExplanation(evt.data.helpText);
|
@@ -102,20 +102,26 @@ export class StartView extends UI.Widget.Widget {
|
|
102
102
|
}
|
103
103
|
}
|
104
104
|
|
105
|
-
protected populateFormControls(fragment: UI.Fragment.Fragment): void {
|
105
|
+
protected populateFormControls(fragment: UI.Fragment.Fragment, mode?: string): void {
|
106
106
|
// Populate the device type
|
107
107
|
const deviceTypeFormElements = fragment.$('device-type-form-elements');
|
108
108
|
this.populateRuntimeSettingAsRadio('lighthouse.device_type', i18nString(UIStrings.device), deviceTypeFormElements);
|
109
109
|
|
110
110
|
// Populate the categories
|
111
|
-
const categoryFormElements = fragment.$('categories-form-elements');
|
112
|
-
|
111
|
+
const categoryFormElements = fragment.$('categories-form-elements') as HTMLElement;
|
112
|
+
categoryFormElements.textContent = '';
|
113
|
+
const pluginFormElements = fragment.$('plugins-form-elements') as HTMLElement;
|
114
|
+
pluginFormElements.textContent = '';
|
113
115
|
for (const preset of Presets) {
|
114
116
|
const formElements = preset.plugin ? pluginFormElements : categoryFormElements;
|
115
117
|
preset.setting.setTitle(preset.title());
|
116
118
|
const checkbox = new UI.Toolbar.ToolbarSettingCheckbox(preset.setting, preset.description());
|
117
119
|
const row = formElements.createChild('div', 'vbox lighthouse-launcher-row');
|
118
120
|
row.appendChild(checkbox.element);
|
121
|
+
if (mode && !preset.supportedModes.includes(mode)) {
|
122
|
+
checkbox.setEnabled(false);
|
123
|
+
checkbox.setIndeterminate(true);
|
124
|
+
}
|
119
125
|
}
|
120
126
|
UI.ARIAUtils.markAsGroup(categoryFormElements);
|
121
127
|
UI.ARIAUtils.setAccessibleName(categoryFormElements, i18nString(UIStrings.categories));
|
@@ -181,7 +187,7 @@ export class StartView extends UI.Widget.Widget {
|
|
181
187
|
this.contentElement.style.overflow = 'auto';
|
182
188
|
}
|
183
189
|
|
184
|
-
|
190
|
+
refresh(): void {
|
185
191
|
// Do nothing in default case.
|
186
192
|
}
|
187
193
|
|
@@ -46,6 +46,52 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
46
46
|
export class StartViewFR extends StartView {
|
47
47
|
protected render(): void {
|
48
48
|
super.render();
|
49
|
+
this.refresh();
|
50
|
+
}
|
51
|
+
|
52
|
+
private createStartButton(mode: string): HTMLButtonElement {
|
53
|
+
let buttonLabel: Platform.UIString.LocalizedString;
|
54
|
+
let callback: () => void;
|
55
|
+
|
56
|
+
if (mode === 'timespan') {
|
57
|
+
buttonLabel = i18nString(UIStrings.startTimespan);
|
58
|
+
callback = (): void => {
|
59
|
+
this.controller.dispatchEventToListeners(
|
60
|
+
Events.RequestLighthouseTimespanStart,
|
61
|
+
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
62
|
+
);
|
63
|
+
};
|
64
|
+
} else if (mode === 'snapshot') {
|
65
|
+
buttonLabel = i18nString(UIStrings.analyzeSnapshot);
|
66
|
+
callback = (): void => {
|
67
|
+
this.controller.dispatchEventToListeners(
|
68
|
+
Events.RequestLighthouseStart,
|
69
|
+
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
70
|
+
);
|
71
|
+
};
|
72
|
+
} else {
|
73
|
+
buttonLabel = i18nString(UIStrings.analyzeNavigation);
|
74
|
+
callback = (): void => {
|
75
|
+
this.controller.dispatchEventToListeners(
|
76
|
+
Events.RequestLighthouseStart,
|
77
|
+
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
78
|
+
);
|
79
|
+
};
|
80
|
+
}
|
81
|
+
|
82
|
+
return UI.UIUtils.createTextButton(
|
83
|
+
buttonLabel,
|
84
|
+
callback,
|
85
|
+
/* className */ '',
|
86
|
+
/* primary */ true,
|
87
|
+
);
|
88
|
+
}
|
89
|
+
|
90
|
+
refresh(): void {
|
91
|
+
const {mode} = this.controller.getFlags();
|
92
|
+
|
93
|
+
this.startButton = this.createStartButton(mode);
|
94
|
+
|
49
95
|
const fragment = UI.Fragment.Fragment.build`
|
50
96
|
<form class="lighthouse-start-view-fr">
|
51
97
|
<header class="hbox">
|
@@ -82,7 +128,7 @@ export class StartViewFR extends StartView {
|
|
82
128
|
this.warningText = fragment.$('warning-text');
|
83
129
|
|
84
130
|
// The previous radios are removed later and don't exist on the new fragment yet.
|
85
|
-
this.populateFormControls(fragment);
|
131
|
+
this.populateFormControls(fragment, mode);
|
86
132
|
|
87
133
|
// Populate the Lighthouse mode
|
88
134
|
const modeFormElements = fragment.$('mode-form-elements');
|
@@ -90,7 +136,9 @@ export class StartViewFR extends StartView {
|
|
90
136
|
|
91
137
|
this.contentElement.textContent = '';
|
92
138
|
this.contentElement.append(fragment.element());
|
93
|
-
|
139
|
+
|
140
|
+
// Ensure the correct layout is used after refresh.
|
141
|
+
this.onResize();
|
94
142
|
}
|
95
143
|
|
96
144
|
onResize(): void {
|
@@ -107,50 +155,4 @@ export class StartViewFR extends StartView {
|
|
107
155
|
optionsEl.classList.toggle('narrow', useNarrowLayout);
|
108
156
|
}
|
109
157
|
}
|
110
|
-
|
111
|
-
updateMode(): void {
|
112
|
-
const {mode} = this.controller.getFlags();
|
113
|
-
|
114
|
-
let buttonLabel: Platform.UIString.LocalizedString;
|
115
|
-
let callback: () => void;
|
116
|
-
|
117
|
-
if (mode === 'timespan') {
|
118
|
-
buttonLabel = i18nString(UIStrings.startTimespan);
|
119
|
-
callback = (): void => {
|
120
|
-
this.controller.dispatchEventToListeners(
|
121
|
-
Events.RequestLighthouseTimespanStart,
|
122
|
-
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
123
|
-
);
|
124
|
-
};
|
125
|
-
} else if (mode === 'snapshot') {
|
126
|
-
buttonLabel = i18nString(UIStrings.analyzeSnapshot);
|
127
|
-
callback = (): void => {
|
128
|
-
this.controller.dispatchEventToListeners(
|
129
|
-
Events.RequestLighthouseStart,
|
130
|
-
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
131
|
-
);
|
132
|
-
};
|
133
|
-
} else {
|
134
|
-
buttonLabel = i18nString(UIStrings.analyzeNavigation);
|
135
|
-
callback = (): void => {
|
136
|
-
this.controller.dispatchEventToListeners(
|
137
|
-
Events.RequestLighthouseStart,
|
138
|
-
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
139
|
-
);
|
140
|
-
};
|
141
|
-
}
|
142
|
-
|
143
|
-
this.startButton = UI.UIUtils.createTextButton(
|
144
|
-
buttonLabel,
|
145
|
-
callback,
|
146
|
-
/* className */ '',
|
147
|
-
/* primary */ true,
|
148
|
-
);
|
149
|
-
|
150
|
-
const startButtonContainerEl = this.contentElement.querySelector('.lighthouse-start-button-container');
|
151
|
-
if (startButtonContainerEl) {
|
152
|
-
startButtonContainerEl.textContent = '';
|
153
|
-
startButtonContainerEl.appendChild(this.startButton);
|
154
|
-
}
|
155
|
-
}
|
156
158
|
}
|
@@ -71,13 +71,20 @@ export class TimespanView extends UI.Dialog.Dialog {
|
|
71
71
|
const dialogRoot = UI.Utils.createShadowRootWithCoreStyles(
|
72
72
|
this.contentElement, {cssFile: [lighthouseDialogStyles], delegatesFocus: undefined});
|
73
73
|
|
74
|
-
this.endButton = UI.UIUtils.createTextButton(
|
74
|
+
this.endButton = UI.UIUtils.createTextButton(
|
75
|
+
i18nString(UIStrings.endTimespan),
|
76
|
+
this.endTimespan.bind(this),
|
77
|
+
undefined,
|
78
|
+
true,
|
79
|
+
);
|
75
80
|
const cancelButton = UI.UIUtils.createTextButton(i18nString(UIStrings.cancel), this.cancel.bind(this));
|
76
81
|
const fragment = UI.Fragment.Fragment.build`
|
77
82
|
<div class="lighthouse-view vbox">
|
78
83
|
<h2 $="status-header"></h2>
|
79
|
-
|
84
|
+
<div class="lighthouse-action-buttons hbox">
|
80
85
|
${cancelButton}
|
86
|
+
${this.endButton}
|
87
|
+
</div>
|
81
88
|
</div>
|
82
89
|
`;
|
83
90
|
|
@@ -170,16 +170,16 @@ input[type="radio"]:focus {
|
|
170
170
|
|
171
171
|
.lighthouse-options {
|
172
172
|
display: grid;
|
173
|
-
grid-template-columns:
|
173
|
+
grid-template-columns: 1fr 1fr;
|
174
174
|
grid-template-rows: auto auto;
|
175
175
|
}
|
176
176
|
|
177
177
|
.lighthouse-options.narrow {
|
178
|
-
grid-template-columns:
|
178
|
+
grid-template-columns: 1fr;
|
179
179
|
grid-template-rows: auto auto auto;
|
180
180
|
}
|
181
181
|
|
182
182
|
.lighthouse-options.wide {
|
183
|
-
grid-template-columns:
|
183
|
+
grid-template-columns: 1fr 1fr 1fr;
|
184
184
|
grid-template-rows: auto;
|
185
185
|
}
|
@@ -11,7 +11,9 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
11
11
|
import {MobileThrottlingSelector} from './MobileThrottlingSelector.js';
|
12
12
|
import {NetworkThrottlingSelector} from './NetworkThrottlingSelector.js';
|
13
13
|
|
14
|
-
import type {
|
14
|
+
import type {
|
15
|
+
Conditions, ConditionsList, MobileThrottlingConditionsGroup, NetworkThrottlingConditionsGroup} from
|
16
|
+
'./ThrottlingPresets.js';
|
15
17
|
import {ThrottlingPresets} from './ThrottlingPresets.js';
|
16
18
|
|
17
19
|
const UIStrings = {
|
@@ -57,7 +57,11 @@ import {Events, NetworkGroupNode, NetworkRequestNode} from './NetworkDataGridNod
|
|
57
57
|
import {NetworkFrameGrouper} from './NetworkFrameGrouper.js';
|
58
58
|
import {NetworkLogViewColumns} from './NetworkLogViewColumns.js';
|
59
59
|
import type {NetworkTimeCalculator} from './NetworkTimeCalculator.js';
|
60
|
-
import {
|
60
|
+
import {
|
61
|
+
NetworkTimeBoundary,
|
62
|
+
NetworkTransferDurationCalculator,
|
63
|
+
NetworkTransferTimeCalculator,
|
64
|
+
} from './NetworkTimeCalculator.js';
|
61
65
|
|
62
66
|
const UIStrings = {
|
63
67
|
/**
|
@@ -14,7 +14,9 @@ import type {NetworkNode} from './NetworkDataGridNode.js';
|
|
14
14
|
import {NetworkRequestNode} from './NetworkDataGridNode.js';
|
15
15
|
import type {NetworkLogView} from './NetworkLogView.js';
|
16
16
|
import {NetworkManageCustomHeadersView} from './NetworkManageCustomHeadersView.js';
|
17
|
-
import type {
|
17
|
+
import type {
|
18
|
+
NetworkTimeCalculator, NetworkTransferDurationCalculator, NetworkTransferTimeCalculator} from
|
19
|
+
'./NetworkTimeCalculator.js';
|
18
20
|
import {NetworkWaterfallColumn} from './NetworkWaterfallColumn.js';
|
19
21
|
import {RequestInitiatorView} from './RequestInitiatorView.js';
|
20
22
|
|
@@ -102,7 +102,7 @@ const UIStrings = {
|
|
102
102
|
/**
|
103
103
|
*@description Text in Request Timing View of the Network panel
|
104
104
|
*/
|
105
|
-
waitingTtfb: 'Waiting
|
105
|
+
waitingTtfb: 'Waiting for server response',
|
106
106
|
/**
|
107
107
|
*@description Text in Signed Exchange Info View of the Network panel
|
108
108
|
*/
|
@@ -38,7 +38,14 @@ import type * as SDK from '../../core/sdk/sdk.js';
|
|
38
38
|
import * as UI from '../../ui/legacy/legacy.js';
|
39
39
|
|
40
40
|
import type {HeapSnapshotGridNode} from './HeapSnapshotGridNodes.js';
|
41
|
-
import {
|
41
|
+
import {
|
42
|
+
AllocationGridNode,
|
43
|
+
HeapSnapshotConstructorNode,
|
44
|
+
HeapSnapshotGenericObjectNode,
|
45
|
+
HeapSnapshotRetainingObjectNode,
|
46
|
+
HeapSnapshotObjectNode,
|
47
|
+
HeapSnapshotDiffNode,
|
48
|
+
} from './HeapSnapshotGridNodes.js';
|
42
49
|
import type {HeapSnapshotProxy} from './HeapSnapshotProxy.js';
|
43
50
|
import type {HeapProfileHeader} from './HeapSnapshotView.js';
|
44
51
|
import type {DataDisplayDelegate} from './ProfileHeader.js';
|
@@ -38,7 +38,9 @@ import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
38
38
|
import * as UI from '../../ui/legacy/legacy.js';
|
39
39
|
|
40
40
|
import type {ChildrenProvider} from './ChildrenProvider.js';
|
41
|
-
import type {
|
41
|
+
import type {
|
42
|
+
AllocationDataGrid, HeapSnapshotConstructorsDataGrid, HeapSnapshotDiffDataGrid, HeapSnapshotSortableDataGrid} from
|
43
|
+
'./HeapSnapshotDataGrids.js';
|
42
44
|
import {HeapSnapshotSortableDataGridEvents} from './HeapSnapshotDataGrids.js';
|
43
45
|
import type {HeapSnapshotProviderProxy, HeapSnapshotProxy} from './HeapSnapshotProxy.js';
|
44
46
|
import type {DataDisplayDelegate} from './ProfileHeader.js';
|
@@ -44,7 +44,14 @@ import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
44
44
|
import * as UI from '../../ui/legacy/legacy.js';
|
45
45
|
|
46
46
|
import type {HeapSnapshotSortableDataGrid} from './HeapSnapshotDataGrids.js';
|
47
|
-
import {
|
47
|
+
import {
|
48
|
+
AllocationDataGrid,
|
49
|
+
HeapSnapshotSortableDataGridEvents,
|
50
|
+
HeapSnapshotConstructorsDataGrid,
|
51
|
+
HeapSnapshotDiffDataGrid,
|
52
|
+
HeapSnapshotRetainmentDataGrid,
|
53
|
+
HeapSnapshotContainmentDataGrid,
|
54
|
+
} from './HeapSnapshotDataGrids.js';
|
48
55
|
import type {AllocationGridNode, HeapSnapshotGridNode} from './HeapSnapshotGridNodes.js';
|
49
56
|
import {HeapSnapshotGenericObjectNode} from './HeapSnapshotGridNodes.js';
|
50
57
|
import type {HeapSnapshotProxy} from './HeapSnapshotProxy.js';
|
@@ -53,7 +60,12 @@ import type {IdsRangeChangedEvent} from './HeapTimelineOverview.js';
|
|
53
60
|
import {HeapTimelineOverview, Events, Samples} from './HeapTimelineOverview.js';
|
54
61
|
import * as ModuleUIStrings from './ModuleUIStrings.js';
|
55
62
|
import type {DataDisplayDelegate} from './ProfileHeader.js';
|
56
|
-
import {
|
63
|
+
import {
|
64
|
+
Events as ProfileHeaderEvents,
|
65
|
+
ProfileEvents as ProfileTypeEvents,
|
66
|
+
ProfileHeader,
|
67
|
+
ProfileType,
|
68
|
+
} from './ProfileHeader.js';
|
57
69
|
import {ProfileSidebarTreeElement} from './ProfileSidebarTreeElement.js';
|
58
70
|
import {instance} from './ProfileTypeRegistry.js';
|
59
71
|
|
@@ -45,7 +45,13 @@ import {DebuggerPausedMessage} from './DebuggerPausedMessage.js';
|
|
45
45
|
import sourcesPanelStyles from './sourcesPanel.css.js';
|
46
46
|
|
47
47
|
import type {NavigatorView} from './NavigatorView.js';
|
48
|
-
import {
|
48
|
+
import {
|
49
|
+
ContentScriptsNavigatorView,
|
50
|
+
FilesNavigatorView,
|
51
|
+
NetworkNavigatorView,
|
52
|
+
OverridesNavigatorView,
|
53
|
+
SnippetsNavigatorView,
|
54
|
+
} from './SourcesNavigator.js';
|
49
55
|
import {Events, SourcesView} from './SourcesView.js';
|
50
56
|
import {ThreadsSidebarPane} from './ThreadsSidebarPane.js';
|
51
57
|
import {UISourceCodeFrame} from './UISourceCodeFrame.js';
|
@@ -90,7 +90,7 @@ export class TimelineController implements SDK.TargetManager.SDKModelObserver<SD
|
|
90
90
|
// 'disabled-by-default-v8.cpu_profiler'
|
91
91
|
// └ default: on, option: enableJSSampling
|
92
92
|
const categoriesArray = [
|
93
|
-
'-*',
|
93
|
+
Root.Runtime.experiments.isEnabled('timelineShowAllEvents') ? '*' : '-*',
|
94
94
|
TimelineModel.TimelineModel.TimelineModelImpl.Category.Console,
|
95
95
|
TimelineModel.TimelineModel.TimelineModelImpl.Category.UserTiming,
|
96
96
|
'devtools.timeline',
|
@@ -53,10 +53,6 @@ const UIStrings = {
|
|
53
53
|
/**
|
54
54
|
*@description Text in Timeline Event Overview of the Performance panel
|
55
55
|
*/
|
56
|
-
fps: 'FPS',
|
57
|
-
/**
|
58
|
-
*@description Text in Timeline Event Overview of the Performance panel
|
59
|
-
*/
|
60
56
|
heap: 'HEAP',
|
61
57
|
/**
|
62
58
|
*@description Heap size label text content in Timeline Event Overview of the Performance panel
|
@@ -485,62 +481,6 @@ export class TimelineFilmStripOverview extends TimelineEventOverview {
|
|
485
481
|
static readonly Padding = 2;
|
486
482
|
}
|
487
483
|
|
488
|
-
export class TimelineEventOverviewFrames extends TimelineEventOverview {
|
489
|
-
constructor() {
|
490
|
-
super('framerate', i18nString(UIStrings.fps));
|
491
|
-
}
|
492
|
-
|
493
|
-
update(): void {
|
494
|
-
super.update();
|
495
|
-
if (!this.model) {
|
496
|
-
return;
|
497
|
-
}
|
498
|
-
const frames = this.model.frames();
|
499
|
-
if (!frames.length) {
|
500
|
-
return;
|
501
|
-
}
|
502
|
-
const height = this.height();
|
503
|
-
const padding = Number(window.devicePixelRatio);
|
504
|
-
const baseFrameDurationMs = 1e3 / 60;
|
505
|
-
const visualHeight = height - 2 * padding;
|
506
|
-
const timeOffset = this.model.timelineModel().minimumRecordTime();
|
507
|
-
const timeSpan = this.model.timelineModel().maximumRecordTime() - timeOffset;
|
508
|
-
const scale = this.width() / timeSpan;
|
509
|
-
const baseY = height - padding;
|
510
|
-
const ctx = this.context();
|
511
|
-
const bottomY = baseY + 10 * window.devicePixelRatio;
|
512
|
-
let x = 0;
|
513
|
-
let y: number = bottomY;
|
514
|
-
|
515
|
-
const lineWidth = window.devicePixelRatio;
|
516
|
-
const offset = lineWidth & 1 ? 0.5 : 0;
|
517
|
-
const tickDepth = 1.5 * window.devicePixelRatio;
|
518
|
-
ctx.beginPath();
|
519
|
-
ctx.moveTo(0, y);
|
520
|
-
for (let i = 0; i < frames.length; ++i) {
|
521
|
-
const frame = frames[i];
|
522
|
-
x = Math.round((frame.startTime - timeOffset) * scale) + offset;
|
523
|
-
ctx.lineTo(x, y);
|
524
|
-
ctx.lineTo(x, y + tickDepth);
|
525
|
-
y = frame.idle ? bottomY :
|
526
|
-
Math.round(baseY - visualHeight * Math.min(baseFrameDurationMs / frame.duration, 1)) - offset;
|
527
|
-
ctx.lineTo(x, y + tickDepth);
|
528
|
-
ctx.lineTo(x, y);
|
529
|
-
}
|
530
|
-
const lastFrame = frames[frames.length - 1];
|
531
|
-
if (lastFrame) {
|
532
|
-
x = Math.round((lastFrame.startTime + lastFrame.duration - timeOffset) * scale) + offset;
|
533
|
-
}
|
534
|
-
ctx.lineTo(x, y);
|
535
|
-
ctx.lineTo(x, bottomY);
|
536
|
-
ctx.fillStyle = 'hsl(110, 50%, 88%)';
|
537
|
-
ctx.strokeStyle = 'hsl(110, 50%, 60%)';
|
538
|
-
ctx.lineWidth = lineWidth;
|
539
|
-
ctx.fill();
|
540
|
-
ctx.stroke();
|
541
|
-
}
|
542
|
-
}
|
543
|
-
|
544
484
|
export class TimelineEventOverviewMemory extends TimelineEventOverview {
|
545
485
|
private heapSizeLabel: HTMLElement;
|
546
486
|
constructor() {
|
@@ -131,12 +131,6 @@ const UIStrings = {
|
|
131
131
|
occurrencesS: 'Occurrences: {PH1}',
|
132
132
|
/**
|
133
133
|
*@description Text in Timeline Flame Chart Data Provider of the Performance panel
|
134
|
-
*@example {10ms} PH1
|
135
|
-
*@example {100.0} PH2
|
136
|
-
*/
|
137
|
-
sFfps: '{PH1} ~ {PH2} fps',
|
138
|
-
/**
|
139
|
-
*@description Text in Timeline Flame Chart Data Provider of the Performance panel
|
140
134
|
*/
|
141
135
|
idleFrame: 'Idle Frame',
|
142
136
|
/**
|
@@ -1005,9 +999,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
1005
999
|
|
1006
1000
|
} else if (type === EntryType.Frame) {
|
1007
1001
|
const frame = (this.entryData[entryIndex] as TimelineModel.TimelineFrameModel.TimelineFrame);
|
1008
|
-
time =
|
1009
|
-
UIStrings.sFfps,
|
1010
|
-
{PH1: i18n.TimeUtilities.preciseMillisToString(frame.duration, 1), PH2: (1000 / frame.duration).toFixed(0)});
|
1002
|
+
time = i18n.TimeUtilities.preciseMillisToString(frame.duration, 1);
|
1011
1003
|
|
1012
1004
|
if (frame.idle) {
|
1013
1005
|
title = i18nString(UIStrings.idleFrame);
|
@@ -17,7 +17,10 @@ import type {PerformanceModel, WindowChangedEvent} from './PerformanceModel.js';
|
|
17
17
|
import {Events as PerformanceModelEvents} from './PerformanceModel.js';
|
18
18
|
import {TimelineDetailsView} from './TimelineDetailsView.js';
|
19
19
|
import {TimelineRegExp} from './TimelineFilters.js';
|
20
|
-
import {
|
20
|
+
import {
|
21
|
+
Events as TimelineFlameChartDataProviderEvents,
|
22
|
+
TimelineFlameChartDataProvider,
|
23
|
+
} from './TimelineFlameChartDataProvider.js';
|
21
24
|
import {TimelineFlameChartNetworkDataProvider} from './TimelineFlameChartNetworkDataProvider.js';
|
22
25
|
import type {TimelineModeViewDelegate} from './TimelinePanel.js';
|
23
26
|
import {TimelineSelection} from './TimelinePanel.js';
|
@@ -10,7 +10,11 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
10
10
|
import timelineHistoryManagerStyles from './timelineHistoryManager.css.js';
|
11
11
|
|
12
12
|
import type {PerformanceModel} from './PerformanceModel.js';
|
13
|
-
import {
|
13
|
+
import {
|
14
|
+
TimelineEventOverviewCPUActivity,
|
15
|
+
TimelineEventOverviewNetwork,
|
16
|
+
TimelineEventOverviewResponsiveness,
|
17
|
+
} from './TimelineEventOverview.js';
|
14
18
|
|
15
19
|
const UIStrings = {
|
16
20
|
/**
|
@@ -81,7 +85,6 @@ export class TimelineHistoryManager {
|
|
81
85
|
|
82
86
|
this.allOverviews = [
|
83
87
|
{constructor: TimelineEventOverviewResponsiveness, height: 3},
|
84
|
-
{constructor: TimelineEventOverviewFrames, height: 16},
|
85
88
|
{constructor: TimelineEventOverviewCPUActivity, height: 20},
|
86
89
|
{constructor: TimelineEventOverviewNetwork, height: 8},
|
87
90
|
];
|