chrome-devtools-frontend 1.0.1625854 → 1.0.1626840
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/front_end/core/host/AidaClient.ts +1 -1
- package/front_end/core/host/AidaClientTypes.ts +2 -0
- package/front_end/core/host/AidaGcaTranslation.ts +2 -2
- package/front_end/core/host/UserMetrics.ts +11 -6
- package/front_end/core/root/ExperimentNames.ts +1 -1
- package/front_end/core/sdk/CSSMetadata.ts +60 -55
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +11 -2
- package/front_end/core/sdk/HeapProfilerModel.ts +1 -11
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -1
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -1
- package/front_end/entrypoints/main/MainImpl.ts +4 -29
- package/front_end/generated/InspectorBackendCommands.ts +3 -2
- package/front_end/generated/protocol-mapping.d.ts +5 -0
- package/front_end/generated/protocol-proxy-api.d.ts +4 -0
- package/front_end/generated/protocol.ts +21 -0
- package/front_end/models/ai_assistance/StorageItem.ts +16 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +11 -5
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +82 -0
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +9 -37
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +26 -3
- package/front_end/models/javascript_metadata/NativeFunctions.js +0 -4
- package/front_end/models/lighthouse/RunTypes.ts +1 -1
- package/front_end/models/web_mcp/WebMCPModel.ts +11 -2
- package/front_end/models/workspace/UISourceCode.ts +0 -1
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +6 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +4 -3
- package/front_end/panels/application/WebMCPView.ts +74 -16
- package/front_end/panels/application/webMCPView.css +13 -2
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +9 -0
- package/front_end/panels/elements/StandaloneStylesContainer.ts +3 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +35 -2
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +1 -1
- package/front_end/panels/elements/StylesContainer.ts +1 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +10 -4
- package/front_end/panels/emulation/DeviceModeToolbar.ts +7 -3
- package/front_end/panels/lighthouse/LighthouseController.ts +18 -0
- package/front_end/panels/profiler/profiler-meta.ts +0 -71
- package/front_end/panels/profiler/profiler.ts +0 -2
- package/front_end/panels/sources/ProfilePlugin.ts +12 -65
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +5 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +179 -145
- package/front_end/panels/timeline/timelineTreeView.css +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +4213 -4208
- package/front_end/third_party/lighthouse/locales/en-US.json +26 -8
- package/front_end/third_party/lighthouse/locales/en-XL.json +26 -8
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -1
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +8 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +0 -56
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +0 -35
- package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +1 -1
- package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -405
- package/front_end/panels/profiler/liveHeapProfile.css +0 -22
- package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +0 -113
|
@@ -140,6 +140,10 @@ const UIStrings = {
|
|
|
140
140
|
* @example {color: blue;} PH1
|
|
141
141
|
*/
|
|
142
142
|
aiSuggestionAccepted: '{PH1} Suggestion accepted.',
|
|
143
|
+
/**
|
|
144
|
+
* @description Title of the general at-rule section
|
|
145
|
+
*/
|
|
146
|
+
atRuleSection: 'Other @rules',
|
|
143
147
|
} as const;
|
|
144
148
|
|
|
145
149
|
const str_ = i18n.i18n.registerUIStrings('panels/elements/StylesSidebarPane.ts', UIStrings);
|
|
@@ -154,8 +158,6 @@ const MIN_FOLDED_SECTIONS_COUNT = 5;
|
|
|
154
158
|
export const REGISTERED_PROPERTY_SECTION_NAME = '@property';
|
|
155
159
|
/** Title of the function section **/
|
|
156
160
|
export const FUNCTION_SECTION_NAME = '@function';
|
|
157
|
-
/** Title of the general at-rule section */
|
|
158
|
-
export const AT_RULE_SECTION_NAME = '@font-*';
|
|
159
161
|
|
|
160
162
|
// Highlightable properties are those that can be hovered in the sidebar to trigger a specific
|
|
161
163
|
// highlighting mode on the current element.
|
|
@@ -347,7 +349,11 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
347
349
|
}
|
|
348
350
|
|
|
349
351
|
jumpToFontPaletteDefinition(paletteName: string): void {
|
|
350
|
-
this.jumpToSection(`@font-palette-values ${paletteName}`,
|
|
352
|
+
this.jumpToSection(`@font-palette-values ${paletteName}`, i18nString(UIStrings.atRuleSection));
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
jumpToCounterStyleDefinition(counterStyleName: string): void {
|
|
356
|
+
this.jumpToSection(`@counter-style ${counterStyleName}`, i18nString(UIStrings.atRuleSection));
|
|
351
357
|
}
|
|
352
358
|
|
|
353
359
|
forceUpdate(): void {
|
|
@@ -1710,7 +1716,7 @@ export class SectionBlock {
|
|
|
1710
1716
|
const separatorElement = document.createElement('div');
|
|
1711
1717
|
const block = new SectionBlock(separatorElement, true, expandedByDefault);
|
|
1712
1718
|
separatorElement.className = 'sidebar-separator';
|
|
1713
|
-
separatorElement.appendChild(document.createTextNode(
|
|
1719
|
+
separatorElement.appendChild(document.createTextNode(i18nString(UIStrings.atRuleSection)));
|
|
1714
1720
|
return block;
|
|
1715
1721
|
}
|
|
1716
1722
|
|
|
@@ -248,6 +248,10 @@ export class DeviceModeToolbar {
|
|
|
248
248
|
'emulation.device-mode-value', {device: '', orientation: '', mode: ''});
|
|
249
249
|
|
|
250
250
|
this.model.toolbarControlsEnabledSetting().addChangeListener(this.update, this);
|
|
251
|
+
this.model.scaleSetting().addChangeListener(this.update, this);
|
|
252
|
+
this.model.uaSetting().addChangeListener(this.update, this);
|
|
253
|
+
this.model.deviceScaleFactorSetting().addChangeListener(this.update, this);
|
|
254
|
+
this.model.addEventListener(EmulationModel.DeviceModeModel.Events.UPDATED, this.update, this);
|
|
251
255
|
|
|
252
256
|
this.update();
|
|
253
257
|
}
|
|
@@ -449,11 +453,11 @@ export class DeviceModeToolbar {
|
|
|
449
453
|
|
|
450
454
|
<div class="device-mode-empty-toolbar-element"></div>
|
|
451
455
|
<devtools-button class="toolbar-button"
|
|
452
|
-
.data=${{variant: Buttons.Button.Variant.TOOLBAR, iconName: 'screen-rotation'
|
|
456
|
+
.data=${{variant: Buttons.Button.Variant.TOOLBAR, iconName: 'screen-rotation',
|
|
457
|
+
disabled: modeButtonDisabled} as Buttons.Button.ButtonData}
|
|
453
458
|
jslog=${VisualLogging.action('screen-rotation').track({click: true})}
|
|
454
459
|
@click=${this.modeMenuClicked.bind(this)}
|
|
455
|
-
.title=${modeButtonTitle}
|
|
456
|
-
.disabled=${modeButtonDisabled}>
|
|
460
|
+
.title=${modeButtonTitle}>
|
|
457
461
|
</devtools-button>
|
|
458
462
|
|
|
459
463
|
<!-- Show dual screen toolbar -->
|
|
@@ -84,6 +84,15 @@ const UIStrings = {
|
|
|
84
84
|
* @description Tooltip text of checkbox to include running the Search Engine Optimization audits in Lighthouse
|
|
85
85
|
*/
|
|
86
86
|
isThisPageOptimizedForSearch: 'Is this page optimized for search engine results ranking',
|
|
87
|
+
/**
|
|
88
|
+
* @description Text of checkbox to include running the Agentic Browsing audits in Lighthouse
|
|
89
|
+
*/
|
|
90
|
+
agenticBrowsing: 'Agentic browsing',
|
|
91
|
+
/**
|
|
92
|
+
* @description Tooltip text of checkbox to include running the Agentic Browsing audits in Lighthouse
|
|
93
|
+
*/
|
|
94
|
+
agenticBrowsingDescription:
|
|
95
|
+
'These checks ensure high-quality, browsable websites for AI agents and validate the correctness of WebMCP integrations. This category is still under development and subject to change.',
|
|
87
96
|
/**
|
|
88
97
|
* @description ARIA label for a radio button input to emulate mobile device behavior when running audits in Lighthouse.
|
|
89
98
|
*/
|
|
@@ -749,6 +758,15 @@ export function getPresets(): LighthouseModel.RunTypes.Preset[] {
|
|
|
749
758
|
supportedModes: ['navigation', 'snapshot'],
|
|
750
759
|
userMetric: Host.UserMetrics.LighthouseCategoryUsed.SEO,
|
|
751
760
|
},
|
|
761
|
+
{
|
|
762
|
+
setting: Common.Settings.Settings.instance().createSetting(
|
|
763
|
+
'lighthouse.cat-agentic-browsing', false, Common.Settings.SettingStorageType.SYNCED),
|
|
764
|
+
configID: 'agentic-browsing',
|
|
765
|
+
title: i18nLazyString(UIStrings.agenticBrowsing),
|
|
766
|
+
description: i18nLazyString(UIStrings.agenticBrowsingDescription),
|
|
767
|
+
supportedModes: ['navigation', 'snapshot'],
|
|
768
|
+
userMetric: Host.UserMetrics.LighthouseCategoryUsed.AGENTIC_BROWSING,
|
|
769
|
+
},
|
|
752
770
|
];
|
|
753
771
|
}
|
|
754
772
|
return presets;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
|
-
import * as Root from '../../core/root/root.js';
|
|
7
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
8
|
|
|
@@ -16,22 +15,6 @@ const UIStrings = {
|
|
|
16
15
|
* @description Title for the profiler tab
|
|
17
16
|
*/
|
|
18
17
|
memory: 'Memory',
|
|
19
|
-
/**
|
|
20
|
-
* @description Title of the 'Live Heap Profile' tool in the bottom drawer
|
|
21
|
-
*/
|
|
22
|
-
liveHeapProfile: 'Live Heap Profile',
|
|
23
|
-
/**
|
|
24
|
-
* @description Title of an action under the Performance category that can be invoked through the Command Menu
|
|
25
|
-
*/
|
|
26
|
-
startRecordingHeapAllocations: 'Start recording heap allocations',
|
|
27
|
-
/**
|
|
28
|
-
* @description Title of an action under the Performance category that can be invoked through the Command Menu
|
|
29
|
-
*/
|
|
30
|
-
stopRecordingHeapAllocations: 'Stop recording heap allocations',
|
|
31
|
-
/**
|
|
32
|
-
* @description Title of an action in the live heap profile tool to start with reload
|
|
33
|
-
*/
|
|
34
|
-
startRecordingHeapAllocationsAndReload: 'Start recording heap allocations and reload the page',
|
|
35
18
|
/**
|
|
36
19
|
* @description Text in the Shortcuts page to explain a keyboard shortcut (start/stop recording performance)
|
|
37
20
|
*/
|
|
@@ -40,10 +23,6 @@ const UIStrings = {
|
|
|
40
23
|
* @description Command for showing the profiler tab
|
|
41
24
|
*/
|
|
42
25
|
showMemory: 'Show Memory',
|
|
43
|
-
/**
|
|
44
|
-
* @description Command for showing the 'Live Heap Profile' tool in the bottom drawer
|
|
45
|
-
*/
|
|
46
|
-
showLiveHeapProfile: 'Show Live Heap Profile',
|
|
47
26
|
/**
|
|
48
27
|
* @description Tooltip text that appears when hovering over the largeicon clear button in the Profiles Panel of a profiler tool
|
|
49
28
|
*/
|
|
@@ -90,56 +69,6 @@ UI.ViewManager.registerViewExtension({
|
|
|
90
69
|
},
|
|
91
70
|
});
|
|
92
71
|
|
|
93
|
-
UI.ViewManager.registerViewExtension({
|
|
94
|
-
location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,
|
|
95
|
-
id: 'live-heap-profile',
|
|
96
|
-
commandPrompt: i18nLazyString(UIStrings.showLiveHeapProfile),
|
|
97
|
-
title: i18nLazyString(UIStrings.liveHeapProfile),
|
|
98
|
-
persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,
|
|
99
|
-
order: 100,
|
|
100
|
-
async loadView() {
|
|
101
|
-
const Profiler = await loadProfilerModule();
|
|
102
|
-
return Profiler.LiveHeapProfileView.LiveHeapProfileView.instance();
|
|
103
|
-
},
|
|
104
|
-
experiment: Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE,
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
UI.ActionRegistration.registerActionExtension({
|
|
108
|
-
actionId: 'live-heap-profile.toggle-recording',
|
|
109
|
-
iconClass: UI.ActionRegistration.IconClass.START_RECORDING,
|
|
110
|
-
toggleable: true,
|
|
111
|
-
toggledIconClass: UI.ActionRegistration.IconClass.STOP_RECORDING,
|
|
112
|
-
toggleWithRedColor: true,
|
|
113
|
-
async loadActionDelegate() {
|
|
114
|
-
const Profiler = await loadProfilerModule();
|
|
115
|
-
return new Profiler.LiveHeapProfileView.ActionDelegate();
|
|
116
|
-
},
|
|
117
|
-
category: UI.ActionRegistration.ActionCategory.MEMORY,
|
|
118
|
-
experiment: Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE,
|
|
119
|
-
options: [
|
|
120
|
-
{
|
|
121
|
-
value: true,
|
|
122
|
-
title: i18nLazyString(UIStrings.startRecordingHeapAllocations),
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
value: false,
|
|
126
|
-
title: i18nLazyString(UIStrings.stopRecordingHeapAllocations),
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
UI.ActionRegistration.registerActionExtension({
|
|
132
|
-
actionId: 'live-heap-profile.start-with-reload',
|
|
133
|
-
iconClass: UI.ActionRegistration.IconClass.REFRESH,
|
|
134
|
-
async loadActionDelegate() {
|
|
135
|
-
const Profiler = await loadProfilerModule();
|
|
136
|
-
return new Profiler.LiveHeapProfileView.ActionDelegate();
|
|
137
|
-
},
|
|
138
|
-
category: UI.ActionRegistration.ActionCategory.MEMORY,
|
|
139
|
-
experiment: Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE,
|
|
140
|
-
title: i18nLazyString(UIStrings.startRecordingHeapAllocationsAndReload),
|
|
141
|
-
});
|
|
142
|
-
|
|
143
72
|
UI.ActionRegistration.registerActionExtension({
|
|
144
73
|
actionId: 'profiler.heap-toggle-recording',
|
|
145
74
|
category: UI.ActionRegistration.ActionCategory.MEMORY,
|
|
@@ -10,7 +10,6 @@ import * as HeapSnapshotGridNodes from './HeapSnapshotGridNodes.js';
|
|
|
10
10
|
import * as HeapSnapshotView from './HeapSnapshotView.js';
|
|
11
11
|
import * as HeapTimelineOverview from './HeapTimelineOverview.js';
|
|
12
12
|
import * as IsolateSelector from './IsolateSelector.js';
|
|
13
|
-
import * as LiveHeapProfileView from './LiveHeapProfileView.js';
|
|
14
13
|
import * as ProfileDataGrid from './ProfileDataGrid.js';
|
|
15
14
|
import * as ProfileFlameChart from './ProfileFlameChartDataProvider.js';
|
|
16
15
|
import * as ProfileHeader from './ProfileHeader.js';
|
|
@@ -30,7 +29,6 @@ export {
|
|
|
30
29
|
HeapSnapshotView,
|
|
31
30
|
HeapTimelineOverview,
|
|
32
31
|
IsolateSelector,
|
|
33
|
-
LiveHeapProfileView,
|
|
34
32
|
ProfileDataGrid,
|
|
35
33
|
ProfileFlameChart,
|
|
36
34
|
ProfileHeader,
|
|
@@ -20,58 +20,16 @@ const UIStrings = {
|
|
|
20
20
|
* @description The milisecond unit
|
|
21
21
|
*/
|
|
22
22
|
ms: 'ms',
|
|
23
|
-
/**
|
|
24
|
-
* @description Unit for data size in DevTools
|
|
25
|
-
*/
|
|
26
|
-
mb: 'MB',
|
|
27
|
-
/**
|
|
28
|
-
* @description A unit
|
|
29
|
-
*/
|
|
30
|
-
kb: 'kB',
|
|
31
23
|
} as const;
|
|
32
24
|
const str_ = i18n.i18n.registerUIStrings('panels/sources/ProfilePlugin.ts', UIStrings);
|
|
33
25
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
34
26
|
|
|
35
|
-
class MemoryMarker extends CodeMirror.GutterMarker {
|
|
36
|
-
constructor(readonly value: number) {
|
|
37
|
-
super();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
override eq(other: MemoryMarker): boolean {
|
|
41
|
-
return this.value === other.value;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
override toDOM(): HTMLElement {
|
|
45
|
-
const element = document.createElement('div');
|
|
46
|
-
element.className = 'cm-profileMarker';
|
|
47
|
-
let value = this.value;
|
|
48
|
-
const intensity = Platform.NumberUtilities.clamp(Math.log10(1 + 2e-3 * value) / 5, 0.02, 1);
|
|
49
|
-
element.style.backgroundColor = `hsla(217, 100%, 70%, ${intensity.toFixed(3)})`;
|
|
50
|
-
value /= 1e3;
|
|
51
|
-
let units;
|
|
52
|
-
let fractionDigits;
|
|
53
|
-
if (value >= 1e3) {
|
|
54
|
-
units = i18nString(UIStrings.mb);
|
|
55
|
-
value /= 1e3;
|
|
56
|
-
fractionDigits = value >= 20 ? 0 : 1;
|
|
57
|
-
} else {
|
|
58
|
-
units = i18nString(UIStrings.kb);
|
|
59
|
-
fractionDigits = 0;
|
|
60
|
-
}
|
|
61
|
-
element.textContent = value.toFixed(fractionDigits);
|
|
62
|
-
const unitElement = element.appendChild(document.createElement('span'));
|
|
63
|
-
unitElement.className = 'cm-units';
|
|
64
|
-
unitElement.textContent = units;
|
|
65
|
-
return element;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
27
|
class PerformanceMarker extends CodeMirror.GutterMarker {
|
|
70
28
|
constructor(readonly value: number) {
|
|
71
29
|
super();
|
|
72
30
|
}
|
|
73
31
|
|
|
74
|
-
override eq(other:
|
|
32
|
+
override eq(other: PerformanceMarker): boolean {
|
|
75
33
|
return this.value === other.value;
|
|
76
34
|
}
|
|
77
35
|
|
|
@@ -89,10 +47,8 @@ class PerformanceMarker extends CodeMirror.GutterMarker {
|
|
|
89
47
|
}
|
|
90
48
|
}
|
|
91
49
|
|
|
92
|
-
function markersFromProfileData(
|
|
93
|
-
|
|
94
|
-
type: Workspace.UISourceCode.DecoratorType): CodeMirror.RangeSet<CodeMirror.GutterMarker> {
|
|
95
|
-
const markerType = type === Workspace.UISourceCode.DecoratorType.PERFORMANCE ? PerformanceMarker : MemoryMarker;
|
|
50
|
+
function markersFromProfileData(map: Workspace.UISourceCode.LineColumnProfileMap, state: CodeMirror.EditorState):
|
|
51
|
+
CodeMirror.RangeSet<CodeMirror.GutterMarker> {
|
|
96
52
|
const markers: Array<CodeMirror.Range<CodeMirror.GutterMarker>> = [];
|
|
97
53
|
const aggregatedByLine = new Map<number, number>();
|
|
98
54
|
for (const [line, value] of map) {
|
|
@@ -104,13 +60,12 @@ function markersFromProfileData(
|
|
|
104
60
|
}
|
|
105
61
|
for (const [line, value] of aggregatedByLine) {
|
|
106
62
|
const {from} = state.doc.line(line);
|
|
107
|
-
markers.push(new
|
|
63
|
+
markers.push(new PerformanceMarker(value).range(from));
|
|
108
64
|
}
|
|
109
65
|
return CodeMirror.RangeSet.of(markers, true);
|
|
110
66
|
}
|
|
111
67
|
|
|
112
|
-
|
|
113
|
-
class ProfilePlugin extends Plugin {
|
|
68
|
+
export class PerformanceProfilePlugin extends Plugin {
|
|
114
69
|
updateEffect = CodeMirror.StateEffect.define<Workspace.UISourceCode.LineColumnProfileMap>();
|
|
115
70
|
field: CodeMirror.StateField<CodeMirror.RangeSet<CodeMirror.GutterMarker>>;
|
|
116
71
|
gutter: CodeMirror.Extension;
|
|
@@ -126,14 +81,14 @@ const makeLineLevelProfilePlugin = (type: Workspace.UISourceCode.DecoratorType):
|
|
|
126
81
|
},
|
|
127
82
|
update: (markers, tr) => {
|
|
128
83
|
return tr.effects.reduce((markers, effect) => {
|
|
129
|
-
return effect.is(this.updateEffect) ? markersFromProfileData(effect.value, tr.state
|
|
84
|
+
return effect.is(this.updateEffect) ? markersFromProfileData(effect.value, tr.state) : markers;
|
|
130
85
|
}, markers.map(tr.changes));
|
|
131
86
|
},
|
|
132
87
|
});
|
|
133
88
|
|
|
134
89
|
this.gutter = CodeMirror.gutter({
|
|
135
90
|
markers: view => view.state.field(this.field),
|
|
136
|
-
class: `cm-${
|
|
91
|
+
class: `cm-${Workspace.UISourceCode.DecoratorType.PERFORMANCE}Gutter`,
|
|
137
92
|
});
|
|
138
93
|
|
|
139
94
|
this.#transformer = transformer;
|
|
@@ -144,7 +99,8 @@ const makeLineLevelProfilePlugin = (type: Workspace.UISourceCode.DecoratorType):
|
|
|
144
99
|
}
|
|
145
100
|
|
|
146
101
|
private getLineMap(): Workspace.UISourceCode.LineColumnProfileMap|undefined {
|
|
147
|
-
const uiSourceCodeProfileMap =
|
|
102
|
+
const uiSourceCodeProfileMap =
|
|
103
|
+
this.uiSourceCode.getDecorationData(Workspace.UISourceCode.DecoratorType.PERFORMANCE);
|
|
148
104
|
if (!uiSourceCodeProfileMap) {
|
|
149
105
|
return undefined;
|
|
150
106
|
}
|
|
@@ -158,7 +114,7 @@ const makeLineLevelProfilePlugin = (type: Workspace.UISourceCode.DecoratorType):
|
|
|
158
114
|
override editorExtension(): CodeMirror.Extension {
|
|
159
115
|
const map = this.getLineMap();
|
|
160
116
|
return this.compartment.of(
|
|
161
|
-
!map ? [] : [this.field.init(state => markersFromProfileData(map, state
|
|
117
|
+
!map ? [] : [this.field.init(state => markersFromProfileData(map, state)), this.gutter, theme]);
|
|
162
118
|
}
|
|
163
119
|
|
|
164
120
|
override decorationChanged(type: Workspace.UISourceCode.DecoratorType, editor: TextEditor.TextEditor.TextEditor):
|
|
@@ -172,13 +128,13 @@ const makeLineLevelProfilePlugin = (type: Workspace.UISourceCode.DecoratorType):
|
|
|
172
128
|
} else if (!installed) {
|
|
173
129
|
editor.dispatch({
|
|
174
130
|
effects: this.compartment.reconfigure(
|
|
175
|
-
[this.field.init(state => markersFromProfileData(map, state
|
|
131
|
+
[this.field.init(state => markersFromProfileData(map, state)), this.gutter, theme]),
|
|
176
132
|
});
|
|
177
133
|
} else {
|
|
178
134
|
editor.dispatch({effects: this.updateEffect.of(map)});
|
|
179
135
|
}
|
|
180
136
|
}
|
|
181
|
-
}
|
|
137
|
+
}
|
|
182
138
|
|
|
183
139
|
const theme = CodeMirror.EditorView.baseTheme({
|
|
184
140
|
'.cm-line::selection': {
|
|
@@ -190,11 +146,6 @@ const theme = CodeMirror.EditorView.baseTheme({
|
|
|
190
146
|
backgroundColor: 'var(--sys-color-cdt-base-container)',
|
|
191
147
|
marginLeft: '3px',
|
|
192
148
|
},
|
|
193
|
-
'.cm-memoryGutter': {
|
|
194
|
-
width: '48px',
|
|
195
|
-
backgroundColor: 'var(--sys-color-cdt-base-container)',
|
|
196
|
-
marginLeft: '3px',
|
|
197
|
-
},
|
|
198
149
|
'.cm-profileMarker': {
|
|
199
150
|
textAlign: 'right',
|
|
200
151
|
paddingRight: '3px',
|
|
@@ -205,7 +156,3 @@ const theme = CodeMirror.EditorView.baseTheme({
|
|
|
205
156
|
marginLeft: '3px',
|
|
206
157
|
},
|
|
207
158
|
});
|
|
208
|
-
|
|
209
|
-
export const MemoryProfilePlugin = makeLineLevelProfilePlugin(Workspace.UISourceCode.DecoratorType.MEMORY);
|
|
210
|
-
|
|
211
|
-
export const PerformanceProfilePlugin = makeLineLevelProfilePlugin(Workspace.UISourceCode.DecoratorType.PERFORMANCE);
|
|
@@ -104,6 +104,10 @@ export class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextF
|
|
|
104
104
|
return scopeChainSidebarPaneInstance;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
treeOutlineForTest(): ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline {
|
|
108
|
+
return this.treeOutline;
|
|
109
|
+
}
|
|
110
|
+
|
|
107
111
|
flavorChanged(callFrame: StackTrace.StackTrace.DebuggableFrameFlavor|null): void {
|
|
108
112
|
this.#scopeChainModel?.dispose();
|
|
109
113
|
this.#scopeChainModel = null;
|
|
@@ -210,6 +214,6 @@ export class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextF
|
|
|
210
214
|
return section;
|
|
211
215
|
}
|
|
212
216
|
|
|
213
|
-
|
|
217
|
+
sidebarPaneUpdatedForTest(): void {
|
|
214
218
|
}
|
|
215
219
|
}
|
|
@@ -25,7 +25,7 @@ import {CoveragePlugin} from './CoveragePlugin.js';
|
|
|
25
25
|
import {CSSPlugin} from './CSSPlugin.js';
|
|
26
26
|
import {DebuggerPlugin} from './DebuggerPlugin.js';
|
|
27
27
|
import type {Plugin} from './Plugin.js';
|
|
28
|
-
import {
|
|
28
|
+
import {PerformanceProfilePlugin} from './ProfilePlugin.js';
|
|
29
29
|
import {ResourceOriginPlugin} from './ResourceOriginPlugin.js';
|
|
30
30
|
import {SnippetsPlugin} from './SnippetsPlugin.js';
|
|
31
31
|
import {SourcesPanel} from './SourcesPanel.js';
|
|
@@ -321,7 +321,6 @@ export class UISourceCodeFrame extends Common.ObjectWrapper
|
|
|
321
321
|
SnippetsPlugin,
|
|
322
322
|
ResourceOriginPlugin,
|
|
323
323
|
CoveragePlugin,
|
|
324
|
-
MemoryProfilePlugin,
|
|
325
324
|
PerformanceProfilePlugin,
|
|
326
325
|
AiWarningInfobarPlugin,
|
|
327
326
|
];
|