chrome-devtools-frontend 1.0.921086 → 1.0.922671
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/all_devtools_files.gni +1 -1
- package/config/gni/devtools_grd_files.gni +2 -0
- package/front_end/core/common/ColorUtils.ts +2 -1
- package/front_end/core/common/Object.ts +36 -1
- package/front_end/core/common/Settings.ts +8 -1
- package/front_end/core/common/common.ts +2 -1
- package/front_end/core/i18n/locales/af.json +53 -32
- package/front_end/core/i18n/locales/am.json +56 -35
- package/front_end/core/i18n/locales/ar.json +53 -32
- package/front_end/core/i18n/locales/as.json +63 -42
- package/front_end/core/i18n/locales/az.json +53 -32
- package/front_end/core/i18n/locales/be.json +52 -31
- package/front_end/core/i18n/locales/bg.json +51 -30
- package/front_end/core/i18n/locales/bn.json +63 -42
- package/front_end/core/i18n/locales/bs.json +57 -36
- package/front_end/core/i18n/locales/ca.json +55 -34
- package/front_end/core/i18n/locales/cs.json +51 -30
- package/front_end/core/i18n/locales/cy.json +63 -42
- package/front_end/core/i18n/locales/da.json +55 -34
- package/front_end/core/i18n/locales/de.json +52 -31
- package/front_end/core/i18n/locales/el.json +58 -37
- package/front_end/core/i18n/locales/en-GB.json +51 -30
- package/front_end/core/i18n/locales/en-US.json +3 -0
- package/front_end/core/i18n/locales/en-XL.json +3 -0
- package/front_end/core/i18n/locales/es-419.json +53 -32
- package/front_end/core/i18n/locales/es.json +52 -31
- package/front_end/core/i18n/locales/et.json +54 -33
- package/front_end/core/i18n/locales/eu.json +71 -50
- package/front_end/core/i18n/locales/fa.json +54 -33
- package/front_end/core/i18n/locales/fi.json +55 -34
- package/front_end/core/i18n/locales/fil.json +59 -38
- package/front_end/core/i18n/locales/fr-CA.json +52 -31
- package/front_end/core/i18n/locales/fr.json +54 -33
- package/front_end/core/i18n/locales/gl.json +57 -36
- package/front_end/core/i18n/locales/gu.json +65 -44
- package/front_end/core/i18n/locales/he.json +56 -35
- package/front_end/core/i18n/locales/hi.json +61 -40
- package/front_end/core/i18n/locales/hr.json +55 -34
- package/front_end/core/i18n/locales/hu.json +53 -32
- package/front_end/core/i18n/locales/hy.json +54 -33
- package/front_end/core/i18n/locales/id.json +59 -38
- package/front_end/core/i18n/locales/is.json +51 -30
- package/front_end/core/i18n/locales/it.json +51 -30
- package/front_end/core/i18n/locales/ja.json +52 -31
- package/front_end/core/i18n/locales/ka.json +51 -30
- package/front_end/core/i18n/locales/kk.json +56 -35
- package/front_end/core/i18n/locales/km.json +59 -38
- package/front_end/core/i18n/locales/kn.json +63 -42
- package/front_end/core/i18n/locales/ko.json +59 -38
- package/front_end/core/i18n/locales/ky.json +54 -33
- package/front_end/core/i18n/locales/lo.json +59 -38
- package/front_end/core/i18n/locales/lt.json +52 -31
- package/front_end/core/i18n/locales/lv.json +60 -39
- package/front_end/core/i18n/locales/mk.json +51 -30
- package/front_end/core/i18n/locales/ml.json +65 -44
- package/front_end/core/i18n/locales/mn.json +59 -38
- package/front_end/core/i18n/locales/mr.json +61 -40
- package/front_end/core/i18n/locales/ms.json +59 -38
- package/front_end/core/i18n/locales/my.json +59 -38
- package/front_end/core/i18n/locales/ne.json +63 -42
- package/front_end/core/i18n/locales/nl.json +55 -34
- package/front_end/core/i18n/locales/no.json +54 -33
- package/front_end/core/i18n/locales/or.json +63 -42
- package/front_end/core/i18n/locales/pa.json +61 -40
- package/front_end/core/i18n/locales/pl.json +51 -30
- package/front_end/core/i18n/locales/pt-PT.json +52 -31
- package/front_end/core/i18n/locales/pt.json +59 -38
- package/front_end/core/i18n/locales/ro.json +52 -31
- package/front_end/core/i18n/locales/ru.json +52 -31
- package/front_end/core/i18n/locales/si.json +59 -38
- package/front_end/core/i18n/locales/sk.json +52 -31
- package/front_end/core/i18n/locales/sl.json +52 -31
- package/front_end/core/i18n/locales/sq.json +51 -30
- package/front_end/core/i18n/locales/sr-Latn.json +52 -31
- package/front_end/core/i18n/locales/sr.json +52 -31
- package/front_end/core/i18n/locales/sv.json +52 -31
- package/front_end/core/i18n/locales/sw.json +60 -39
- package/front_end/core/i18n/locales/ta.json +67 -46
- package/front_end/core/i18n/locales/te.json +62 -41
- package/front_end/core/i18n/locales/th.json +52 -31
- package/front_end/core/i18n/locales/tr.json +55 -34
- package/front_end/core/i18n/locales/uk.json +55 -34
- package/front_end/core/i18n/locales/ur.json +60 -39
- package/front_end/core/i18n/locales/uz.json +52 -31
- package/front_end/core/i18n/locales/vi.json +54 -33
- package/front_end/core/i18n/locales/zh-HK.json +52 -31
- package/front_end/core/i18n/locales/zh-TW.json +57 -36
- package/front_end/core/i18n/locales/zh.json +56 -35
- package/front_end/core/i18n/locales/zu.json +59 -38
- package/front_end/core/sdk/FrameManager.ts +2 -2
- package/front_end/core/sdk/RemoteObject.ts +43 -20
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +1 -1
- package/front_end/entrypoints/js_app/JsMain.ts +1 -1
- package/front_end/entrypoints/node_main/NodeMain.ts +1 -1
- package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
- package/front_end/legacy/legacy-defs.d.ts +9 -0
- package/front_end/models/emulation/DeviceModeModel.ts +1 -1
- package/front_end/models/extensions/ExtensionAPI.ts +1 -1
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +4 -1
- package/front_end/models/issues_manager/descriptions/arAttributionEventSourceTriggerDataTooLarge.md +4 -0
- package/front_end/models/timeline_model/TimelineModel.ts +5 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +8 -7
- package/front_end/panels/application/DatabaseQueryView.ts +7 -1
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/changes/ChangesSidebar.ts +6 -1
- package/front_end/panels/console/ConsolePrompt.ts +6 -1
- package/front_end/panels/console/ConsoleSidebar.ts +5 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +2 -2
- package/front_end/panels/coverage/CoverageView.ts +5 -4
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +59 -48
- package/front_end/panels/css_overview/CSSOverviewController.ts +48 -8
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +8 -1
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +14 -12
- package/front_end/panels/elements/ElementsPanel.ts +10 -8
- package/front_end/panels/elements/ElementsTreeOutline.ts +8 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -2
- package/front_end/panels/elements/layoutPane.css +1 -0
- package/front_end/panels/emulation/AdvancedApp.ts +2 -12
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +14 -1
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +10 -0
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +7 -1
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +4 -4
- package/front_end/panels/layer_viewer/Layers3DView.ts +7 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +7 -1
- package/front_end/panels/layers/LayersPanel.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +1 -2
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +4 -0
- package/front_end/panels/network/NetworkDataGridNode.ts +46 -104
- package/front_end/panels/network/NetworkItemView.ts +2 -6
- package/front_end/panels/network/NetworkLogView.ts +4 -4
- package/front_end/panels/network/NetworkPanel.ts +12 -18
- package/front_end/panels/network/RequestTimingView.ts +3 -1
- package/front_end/panels/network/module.json +0 -3
- package/front_end/panels/profiler/CPUProfileFlameChart.ts +26 -11
- package/front_end/panels/profiler/HeapProfileView.ts +5 -6
- package/front_end/panels/profiler/HeapSnapshotView.ts +6 -6
- package/front_end/panels/profiler/HeapTimelineOverview.ts +17 -3
- package/front_end/panels/profiler/ProfileLauncherView.ts +6 -1
- package/front_end/panels/profiler/ProfileView.ts +1 -1
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
- package/front_end/panels/settings/SettingsScreen.ts +2 -2
- package/front_end/panels/sources/CSSPlugin.ts +6 -6
- package/front_end/panels/sources/DebuggerPlugin.ts +4 -5
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +7 -5
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +5 -5
- package/front_end/panels/sources/OutlineQuickOpen.ts +7 -2
- package/front_end/panels/sources/ScriptFormatterEditorAction.ts +5 -6
- package/front_end/panels/sources/SourcesPanel.ts +2 -2
- package/front_end/panels/sources/SourcesView.ts +16 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +8 -13
- package/front_end/panels/sources/UISourceCodeFrame.ts +7 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -7
- package/front_end/panels/timeline/TimelineDetailsView.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -4
- package/front_end/panels/timeline/TimelineLayersView.ts +7 -7
- package/front_end/panels/timeline/TimelinePanel.ts +2 -1
- package/front_end/panels/timeline/TimelineTreeView.ts +6 -1
- package/front_end/ui/components/docs/toggle_fonts.ts +28 -1
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +4 -5
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +14 -5
- package/front_end/ui/legacy/Dialog.ts +12 -2
- package/front_end/ui/legacy/FilterBar.ts +12 -8
- package/front_end/ui/legacy/InspectorView.ts +3 -3
- package/front_end/ui/legacy/SplitWidget.ts +6 -1
- package/front_end/ui/legacy/TabbedPane.ts +9 -1
- package/front_end/ui/legacy/TextEditor.ts +12 -1
- package/front_end/ui/legacy/Treeoutline.ts +19 -11
- package/front_end/ui/legacy/ViewManager.ts +8 -7
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +6 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +6 -1
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +7 -1
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +12 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +19 -71
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +8 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +9 -1
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +13 -3
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +14 -3
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -4
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +13 -3
- package/front_end/ui/legacy/components/quick_open/QuickInput.ts +4 -5
- package/front_end/ui/legacy/components/quick_open/QuickPick.ts +4 -5
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +29 -19
- package/front_end/ui/legacy/components/source_frame/SourcesTextEditor.ts +18 -2
- package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +3 -1
- package/front_end/ui/legacy/splitWidget.css +2 -2
- package/inspector_overlay/common.ts +3 -3
- package/inspector_overlay/tool_viewport_size.ts +1 -1
- package/package.json +1 -1
- package/scripts/build/generate_css_js_files.js +1 -0
|
@@ -171,7 +171,7 @@ export class CPUProfileFlameChart extends UI.Widget.VBox implements UI.Searchabl
|
|
|
171
171
|
this.mainPane.addEventListener(PerfUI.FlameChart.Events.EntryInvoked, this.onEntryInvoked, this);
|
|
172
172
|
this.entrySelected = false;
|
|
173
173
|
this.mainPane.addEventListener(PerfUI.FlameChart.Events.CanvasFocused, this.onEntrySelected, this);
|
|
174
|
-
this.overviewPane.addEventListener(
|
|
174
|
+
this.overviewPane.addEventListener(OverviewPaneEvents.WindowChanged, this.onWindowChanged, this);
|
|
175
175
|
this.dataProvider = dataProvider;
|
|
176
176
|
this.searchResults = [];
|
|
177
177
|
}
|
|
@@ -180,9 +180,8 @@ export class CPUProfileFlameChart extends UI.Widget.VBox implements UI.Searchabl
|
|
|
180
180
|
this.mainPane.focus();
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
onWindowChanged(event: Common.EventTarget.EventTargetEvent): void {
|
|
184
|
-
const windowLeft = event.data
|
|
185
|
-
const windowRight = event.data.windowTimeRight;
|
|
183
|
+
onWindowChanged(event: Common.EventTarget.EventTargetEvent<OverviewPaneWindowChangedEvent>): void {
|
|
184
|
+
const {windowTimeLeft: windowLeft, windowTimeRight: windowRight} = event.data;
|
|
186
185
|
this.mainPane.setWindowTimes(windowLeft, windowRight, /* animate */ true);
|
|
187
186
|
}
|
|
188
187
|
|
|
@@ -190,9 +189,9 @@ export class CPUProfileFlameChart extends UI.Widget.VBox implements UI.Searchabl
|
|
|
190
189
|
this.overviewPane.selectRange(timeLeft, timeRight);
|
|
191
190
|
}
|
|
192
191
|
|
|
193
|
-
onEntrySelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
192
|
+
onEntrySelected(event: Common.EventTarget.EventTargetEvent<void|number>): void {
|
|
194
193
|
if (event.data) {
|
|
195
|
-
const eventIndex =
|
|
194
|
+
const eventIndex = event.data;
|
|
196
195
|
this.mainPane.setSelectedEntry(eventIndex);
|
|
197
196
|
if (eventIndex === -1) {
|
|
198
197
|
this.entrySelected = false;
|
|
@@ -205,7 +204,7 @@ export class CPUProfileFlameChart extends UI.Widget.VBox implements UI.Searchabl
|
|
|
205
204
|
}
|
|
206
205
|
}
|
|
207
206
|
|
|
208
|
-
onEntryInvoked(event: Common.EventTarget.EventTargetEvent): void {
|
|
207
|
+
onEntryInvoked(event: Common.EventTarget.EventTargetEvent<number>): void {
|
|
209
208
|
this.onEntrySelected(event);
|
|
210
209
|
this.dispatchEventToListeners(PerfUI.FlameChart.Events.EntryInvoked, event.data);
|
|
211
210
|
}
|
|
@@ -308,7 +307,8 @@ export class OverviewCalculator implements PerfUI.TimelineGrid.Calculator {
|
|
|
308
307
|
}
|
|
309
308
|
}
|
|
310
309
|
|
|
311
|
-
export class OverviewPane extends
|
|
310
|
+
export class OverviewPane extends Common.ObjectWrapper.eventMixin<OverviewPaneEvents, typeof UI.Widget.VBox>(
|
|
311
|
+
UI.Widget.VBox) implements PerfUI.FlameChart.FlameChartDelegate {
|
|
312
312
|
overviewContainer: HTMLElement;
|
|
313
313
|
readonly overviewCalculator: OverviewCalculator;
|
|
314
314
|
readonly overviewGrid: PerfUI.OverviewGrid.OverviewGrid;
|
|
@@ -329,7 +329,8 @@ export class OverviewPane extends UI.Widget.VBox implements PerfUI.FlameChart.Fl
|
|
|
329
329
|
(this.overviewContainer.createChild('canvas', 'cpu-profile-flame-chart-overview-canvas') as HTMLCanvasElement);
|
|
330
330
|
this.overviewContainer.appendChild(this.overviewGrid.element);
|
|
331
331
|
this.dataProvider = dataProvider;
|
|
332
|
-
this.overviewGrid.addEventListener(
|
|
332
|
+
this.overviewGrid.addEventListener(
|
|
333
|
+
PerfUI.OverviewGrid.Events.WindowChangedWithPosition, this.onWindowChanged, this);
|
|
333
334
|
}
|
|
334
335
|
|
|
335
336
|
windowChanged(windowStartTime: number, windowEndTime: number): void {
|
|
@@ -348,12 +349,13 @@ export class OverviewPane extends UI.Widget.VBox implements PerfUI.FlameChart.Fl
|
|
|
348
349
|
this.overviewGrid.setWindow((timeLeft - startTime) / totalTime, (timeRight - startTime) / totalTime);
|
|
349
350
|
}
|
|
350
351
|
|
|
351
|
-
onWindowChanged(event: Common.EventTarget.EventTargetEvent):
|
|
352
|
+
onWindowChanged(event: Common.EventTarget.EventTargetEvent<PerfUI.OverviewGrid.WindowChangedWithPositionEvent>):
|
|
353
|
+
void {
|
|
352
354
|
const windowPosition = {windowTimeLeft: event.data.rawStartValue, windowTimeRight: event.data.rawEndValue};
|
|
353
355
|
this.windowTimeLeft = windowPosition.windowTimeLeft;
|
|
354
356
|
this.windowTimeRight = windowPosition.windowTimeRight;
|
|
355
357
|
|
|
356
|
-
this.dispatchEventToListeners(
|
|
358
|
+
this.dispatchEventToListeners(OverviewPaneEvents.WindowChanged, windowPosition);
|
|
357
359
|
}
|
|
358
360
|
|
|
359
361
|
timelineData(): PerfUI.FlameChart.TimelineData|null {
|
|
@@ -445,3 +447,16 @@ export class OverviewPane extends UI.Widget.VBox implements PerfUI.FlameChart.Fl
|
|
|
445
447
|
this.overviewCanvas.style.height = height + 'px';
|
|
446
448
|
}
|
|
447
449
|
}
|
|
450
|
+
|
|
451
|
+
export const enum OverviewPaneEvents {
|
|
452
|
+
WindowChanged = 'WindowChanged',
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export interface OverviewPaneWindowChangedEvent {
|
|
456
|
+
windowTimeLeft: number;
|
|
457
|
+
windowTimeRight: number;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export type OVerviewPaneEventTypes = {
|
|
461
|
+
[OverviewPaneEvents.WindowChanged]: OverviewPaneWindowChangedEvent,
|
|
462
|
+
};
|
|
@@ -14,8 +14,8 @@ import type * as Protocol from '../../generated/protocol.js';
|
|
|
14
14
|
|
|
15
15
|
import {ProfileFlameChartDataProvider} from './CPUProfileFlameChart.js';
|
|
16
16
|
|
|
17
|
-
import type {Samples} from './HeapTimelineOverview.js';
|
|
18
|
-
import {
|
|
17
|
+
import type {Samples, IdsRangeChangedEvent} from './HeapTimelineOverview.js';
|
|
18
|
+
import {Events, HeapTimelineOverview} from './HeapTimelineOverview.js';
|
|
19
19
|
import type {Formatter, ProfileDataGridNode} from './ProfileDataGrid.js';
|
|
20
20
|
import type {ProfileHeader} from './ProfileHeader.js';
|
|
21
21
|
import {ProfileType, ProfileEvents} from './ProfileHeader.js';
|
|
@@ -155,7 +155,7 @@ export class HeapProfileView extends ProfileView implements UI.SearchableView.Se
|
|
|
155
155
|
this.timelineOverview = new HeapTimelineOverview();
|
|
156
156
|
|
|
157
157
|
if (Root.Runtime.experiments.isEnabled('samplingHeapProfilerTimeline')) {
|
|
158
|
-
this.timelineOverview.addEventListener(IdsRangeChanged, this.onIdsRangeChanged.bind(this));
|
|
158
|
+
this.timelineOverview.addEventListener(Events.IdsRangeChanged, this.onIdsRangeChanged.bind(this));
|
|
159
159
|
this.timelineOverview.show(this.element, this.element.firstChild);
|
|
160
160
|
this.timelineOverview.start();
|
|
161
161
|
|
|
@@ -172,9 +172,8 @@ export class HeapProfileView extends ProfileView implements UI.SearchableView.Se
|
|
|
172
172
|
return [...await super.toolbarItems(), this.selectedSizeText];
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
onIdsRangeChanged(event: Common.EventTarget.EventTargetEvent): void {
|
|
176
|
-
const minId =
|
|
177
|
-
const maxId = (event.data.maxId as number);
|
|
175
|
+
onIdsRangeChanged(event: Common.EventTarget.EventTargetEvent<IdsRangeChangedEvent>): void {
|
|
176
|
+
const {minId, maxId} = event.data;
|
|
178
177
|
this.selectedSizeText.setText(
|
|
179
178
|
i18nString(UIStrings.selectedSizeS, {PH1: Platform.NumberUtilities.bytesToString(event.data.size)}));
|
|
180
179
|
this.setSelectionRange(minId, maxId);
|
|
@@ -49,7 +49,8 @@ import type {AllocationGridNode, HeapSnapshotGridNode} from './HeapSnapshotGridN
|
|
|
49
49
|
import {HeapSnapshotGenericObjectNode} from './HeapSnapshotGridNodes.js';
|
|
50
50
|
import type {HeapSnapshotProxy} from './HeapSnapshotProxy.js';
|
|
51
51
|
import {HeapSnapshotWorkerProxy} from './HeapSnapshotProxy.js';
|
|
52
|
-
import {
|
|
52
|
+
import type {IdsRangeChangedEvent} from './HeapTimelineOverview.js';
|
|
53
|
+
import {HeapTimelineOverview, Events, Samples} from './HeapTimelineOverview.js';
|
|
53
54
|
import * as ModuleUIStrings from './ModuleUIStrings.js';
|
|
54
55
|
import type {DataDisplayDelegate} from './ProfileHeader.js';
|
|
55
56
|
import {Events as ProfileHeaderEvents, ProfileEvents as ProfileTypeEvents, ProfileHeader, ProfileType} from './ProfileHeader.js';
|
|
@@ -441,7 +442,7 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
|
|
|
441
442
|
createOverview(): void {
|
|
442
443
|
const profileType = this.profile.profileType();
|
|
443
444
|
this.trackingOverviewGrid = new HeapTimelineOverview();
|
|
444
|
-
this.trackingOverviewGrid.addEventListener(IdsRangeChanged, this.onIdsRangeChanged.bind(this));
|
|
445
|
+
this.trackingOverviewGrid.addEventListener(Events.IdsRangeChanged, this.onIdsRangeChanged.bind(this));
|
|
445
446
|
if (!this.profile.fromFile() && profileType.profileBeingRecorded() === this.profile) {
|
|
446
447
|
profileType.addEventListener(TrackingHeapSnapshotProfileType.HeapStatsUpdate, this.onHeapStatsUpdate, this);
|
|
447
448
|
profileType.addEventListener(TrackingHeapSnapshotProfileType.TrackingStopped, this.onStopTracking, this);
|
|
@@ -550,9 +551,8 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
|
|
|
550
551
|
return statistics;
|
|
551
552
|
}
|
|
552
553
|
|
|
553
|
-
onIdsRangeChanged(event: Common.EventTarget.EventTargetEvent): void {
|
|
554
|
-
const minId = event.data
|
|
555
|
-
const maxId = event.data.maxId;
|
|
554
|
+
onIdsRangeChanged(event: Common.EventTarget.EventTargetEvent<IdsRangeChangedEvent>): void {
|
|
555
|
+
const {minId, maxId} = event.data;
|
|
556
556
|
this.selectedSizeText.setText(
|
|
557
557
|
i18nString(UIStrings.selectedSizeS, {PH1: Platform.NumberUtilities.bytesToString(event.data.size)}));
|
|
558
558
|
if (this.constructorsDataGrid.snapshot) {
|
|
@@ -988,7 +988,7 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
|
|
|
988
988
|
}
|
|
989
989
|
this.onStopTracking();
|
|
990
990
|
if (this.trackingOverviewGrid) {
|
|
991
|
-
this.trackingOverviewGrid.removeEventListener(IdsRangeChanged, this.onIdsRangeChanged.bind(this));
|
|
991
|
+
this.trackingOverviewGrid.removeEventListener(Events.IdsRangeChanged, this.onIdsRangeChanged.bind(this));
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
}
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import * as Common from '../../core/common/common.js';
|
|
5
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
7
|
import * as Platform from '../../core/platform/platform.js';
|
|
7
8
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
8
9
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
10
|
|
|
10
|
-
export class HeapTimelineOverview extends UI.Widget.VBox
|
|
11
|
+
export class HeapTimelineOverview extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(
|
|
12
|
+
UI.Widget.VBox) {
|
|
11
13
|
readonly overviewCalculator: OverviewCalculator;
|
|
12
14
|
overviewContainer: HTMLElement;
|
|
13
15
|
overviewGrid: PerfUI.OverviewGrid.OverviewGrid;
|
|
@@ -246,11 +248,23 @@ export class HeapTimelineOverview extends UI.Widget.VBox {
|
|
|
246
248
|
const minId = minIndex > 0 ? ids[minIndex - 1] : 0;
|
|
247
249
|
const maxId = maxIndex < ids.length ? ids[maxIndex] : Infinity;
|
|
248
250
|
|
|
249
|
-
this.dispatchEventToListeners(IdsRangeChanged, {minId, maxId, size});
|
|
251
|
+
this.dispatchEventToListeners(Events.IdsRangeChanged, {minId, maxId, size});
|
|
250
252
|
}
|
|
251
253
|
}
|
|
252
254
|
|
|
253
|
-
export const
|
|
255
|
+
export const enum Events {
|
|
256
|
+
IdsRangeChanged = 'IdsRangeChanged',
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface IdsRangeChangedEvent {
|
|
260
|
+
minId: number;
|
|
261
|
+
maxId: number;
|
|
262
|
+
size: number;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export type EventTypes = {
|
|
266
|
+
[Events.IdsRangeChanged]: IdsRangeChangedEvent,
|
|
267
|
+
};
|
|
254
268
|
|
|
255
269
|
export class SmoothScale {
|
|
256
270
|
lastUpdate: number;
|
|
@@ -66,7 +66,8 @@ const UIStrings = {
|
|
|
66
66
|
};
|
|
67
67
|
const str_ = i18n.i18n.registerUIStrings('panels/profiler/ProfileLauncherView.ts', UIStrings);
|
|
68
68
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
69
|
-
export class ProfileLauncherView extends UI.Widget.VBox
|
|
69
|
+
export class ProfileLauncherView extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(
|
|
70
|
+
UI.Widget.VBox) {
|
|
70
71
|
readonly panel: ProfilesPanel;
|
|
71
72
|
private contentElementInternal: HTMLElement;
|
|
72
73
|
readonly selectedProfileTypeSetting: Common.Settings.Setting<string>;
|
|
@@ -232,3 +233,7 @@ export class ProfileLauncherView extends UI.Widget.VBox {
|
|
|
232
233
|
export enum Events {
|
|
233
234
|
ProfileTypeSelected = 'ProfileTypeSelected',
|
|
234
235
|
}
|
|
236
|
+
|
|
237
|
+
export type EventTypes = {
|
|
238
|
+
[Events.ProfileTypeSelected]: ProfileType,
|
|
239
|
+
};
|
|
@@ -413,7 +413,7 @@ export class ProfileView extends UI.View.SimpleView implements UI.SearchableView
|
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
async onEntryInvoked(event: Common.EventTarget.EventTargetEvent): Promise<void> {
|
|
416
|
+
async onEntryInvoked(event: Common.EventTarget.EventTargetEvent<number>): Promise<void> {
|
|
417
417
|
if (!this.dataProvider) {
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
@@ -282,8 +282,8 @@ export class ProfilesPanel extends UI.Panel.PanelWithSidebar implements DataDisp
|
|
|
282
282
|
this.launcherView.profileFinished();
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
onProfileTypeSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
286
|
-
this.selectedProfileType =
|
|
285
|
+
onProfileTypeSelected(event: Common.EventTarget.EventTargetEvent<ProfileType>): void {
|
|
286
|
+
this.selectedProfileType = event.data;
|
|
287
287
|
this.updateProfileTypeSpecificUI();
|
|
288
288
|
}
|
|
289
289
|
|
|
@@ -193,8 +193,8 @@ export class SettingsScreen extends UI.Widget.VBox implements UI.View.ViewLocati
|
|
|
193
193
|
this.tabbedLocation.tabbedPane().selectTab(name, /* userGesture */ true);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
private tabInvoked(event: Common.EventTarget.EventTargetEvent): void {
|
|
197
|
-
const eventData = event.data
|
|
196
|
+
private tabInvoked(event: Common.EventTarget.EventTargetEvent<UI.TabbedPane.EventData>): void {
|
|
197
|
+
const eventData = event.data;
|
|
198
198
|
if (!eventData.isUserGesture) {
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
@@ -261,12 +261,12 @@ export class CSSPlugin extends Plugin {
|
|
|
261
261
|
this.swatchPopoverHelper.show(this.spectrum, swatch, this.swatchPopoverHidden.bind(this));
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
private spectrumResized(_event: Common.EventTarget.EventTargetEvent): void {
|
|
264
|
+
private spectrumResized(_event: Common.EventTarget.EventTargetEvent<void>): void {
|
|
265
265
|
this.swatchPopoverHelper.reposition();
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
private spectrumChanged(event: Common.EventTarget.EventTargetEvent): void {
|
|
269
|
-
const colorString =
|
|
268
|
+
private spectrumChanged(event: Common.EventTarget.EventTargetEvent<string>): void {
|
|
269
|
+
const colorString = event.data;
|
|
270
270
|
const color = Common.Color.Color.parse(colorString);
|
|
271
271
|
if (!color || !this.currentSwatch) {
|
|
272
272
|
return;
|
|
@@ -291,8 +291,8 @@ export class CSSPlugin extends Plugin {
|
|
|
291
291
|
this.swatchPopoverHelper.show(this.bezierEditor, swatch.iconElement(), this.swatchPopoverHidden.bind(this));
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
private bezierChanged(event: Common.EventTarget.EventTargetEvent): void {
|
|
295
|
-
const bezierString =
|
|
294
|
+
private bezierChanged(event: Common.EventTarget.EventTargetEvent<string>): void {
|
|
295
|
+
const bezierString = event.data;
|
|
296
296
|
if (this.currentSwatch instanceof InlineEditor.Swatches.BezierSwatch) {
|
|
297
297
|
this.currentSwatch.setBezierText(bezierString);
|
|
298
298
|
}
|
|
@@ -313,7 +313,7 @@ export class CSSPlugin extends Plugin {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
private onTextChanged(event: Common.EventTarget.EventTargetEvent): void {
|
|
316
|
+
private onTextChanged(event: Common.EventTarget.EventTargetEvent<UI.TextEditor.TextChangedEvent>): void {
|
|
317
317
|
if (!this.muteSwatchProcessing) {
|
|
318
318
|
this.updateSwatches(event.data.newRange.startLine, event.data.newRange.endLine);
|
|
319
319
|
}
|
|
@@ -1812,17 +1812,16 @@ export class DebuggerPlugin extends Plugin {
|
|
|
1812
1812
|
this.textEditor.attachInfobar(this.prettyPrintInfobar);
|
|
1813
1813
|
}
|
|
1814
1814
|
|
|
1815
|
-
private async handleGutterClick(
|
|
1815
|
+
private async handleGutterClick(
|
|
1816
|
+
event: Common.EventTarget.EventTargetEvent<SourceFrame.SourcesTextEditor.GutterClickEventData>): Promise<void> {
|
|
1816
1817
|
if (this.muted) {
|
|
1817
1818
|
return;
|
|
1818
1819
|
}
|
|
1819
1820
|
|
|
1820
|
-
const
|
|
1821
|
-
if (
|
|
1821
|
+
const {gutterType, lineNumber: editorLineNumber, event: eventObject} = event.data;
|
|
1822
|
+
if (gutterType !== SourceFrame.SourcesTextEditor.lineNumbersGutterType) {
|
|
1822
1823
|
return;
|
|
1823
1824
|
}
|
|
1824
|
-
const editorLineNumber = eventData.lineNumber;
|
|
1825
|
-
const eventObject = eventData.event;
|
|
1826
1825
|
|
|
1827
1826
|
if (eventObject.button !== 0 || eventObject.altKey || eventObject.ctrlKey || eventObject.metaKey) {
|
|
1828
1827
|
return;
|
|
@@ -51,12 +51,14 @@ export class EditingLocationHistoryManager {
|
|
|
51
51
|
SourceFrame.SourcesTextEditor.Events.JumpHappened, this.onJumpHappened.bind(this));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
private onJumpHappened(event: Common.EventTarget.EventTargetEvent):
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
private onJumpHappened(event: Common.EventTarget.EventTargetEvent<SourceFrame.SourcesTextEditor.JumpHappenedEvent>):
|
|
55
|
+
void {
|
|
56
|
+
const {from, to} = event.data;
|
|
57
|
+
if (from) {
|
|
58
|
+
this.updateActiveState(from);
|
|
57
59
|
}
|
|
58
|
-
if (
|
|
59
|
-
this.pushActiveState(
|
|
60
|
+
if (to) {
|
|
61
|
+
this.pushActiveState(to);
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
|
|
@@ -10,7 +10,7 @@ import type * as Workspace from '../../models/workspace/workspace.js';
|
|
|
10
10
|
import type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
11
11
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
12
|
|
|
13
|
-
import type {EditorAction, SourcesView} from './SourcesView.js';
|
|
13
|
+
import type {EditorAction, EditorClosedEvent, SourcesView} from './SourcesView.js';
|
|
14
14
|
import {Events, registerEditorAction} from './SourcesView.js';
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
@@ -45,13 +45,13 @@ export class InplaceFormatterEditorAction implements EditorAction {
|
|
|
45
45
|
return inplaceFormatterEditorActionInstance;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
private editorSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
49
|
-
const uiSourceCode =
|
|
48
|
+
private editorSelected(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {
|
|
49
|
+
const uiSourceCode = event.data;
|
|
50
50
|
this.updateButton(uiSourceCode);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
private editorClosed(event: Common.EventTarget.EventTargetEvent): void {
|
|
54
|
-
const wasSelected =
|
|
53
|
+
private editorClosed(event: Common.EventTarget.EventTargetEvent<EditorClosedEvent>): void {
|
|
54
|
+
const {wasSelected} = event.data;
|
|
55
55
|
if (wasSelected) {
|
|
56
56
|
this.updateButton(null);
|
|
57
57
|
}
|
|
@@ -85,11 +85,16 @@ export class OutlineQuickOpen extends QuickOpen.FilteredListWidget.Provider {
|
|
|
85
85
|
return -item.line - 1;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
renderItem(itemIndex: number, query: string, titleElement: Element,
|
|
88
|
+
renderItem(itemIndex: number, query: string, titleElement: Element, _subtitleElement: Element): void {
|
|
89
89
|
const item = this.items[itemIndex];
|
|
90
90
|
titleElement.textContent = item.title + (item.subtitle ? item.subtitle : '');
|
|
91
91
|
QuickOpen.FilteredListWidget.FilteredListWidget.highlightRanges(titleElement, query);
|
|
92
|
-
|
|
92
|
+
|
|
93
|
+
const tagElement = (titleElement.parentElement?.parentElement?.createChild('span', 'tag') as HTMLElement);
|
|
94
|
+
if (!tagElement) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
tagElement.textContent = ':' + (item.line + 1);
|
|
93
98
|
}
|
|
94
99
|
|
|
95
100
|
selectItem(itemIndex: number|null, _promptValue: string): void {
|
|
@@ -10,7 +10,7 @@ import * as Workspace from '../../models/workspace/workspace.js';
|
|
|
10
10
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
11
11
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
12
|
|
|
13
|
-
import type {EditorAction, SourcesView} from './SourcesView.js';
|
|
13
|
+
import type {EditorAction, EditorClosedEvent, SourcesView} from './SourcesView.js';
|
|
14
14
|
import {Events, registerEditorAction} from './SourcesView.js';
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
@@ -48,8 +48,8 @@ export class ScriptFormatterEditorAction implements EditorAction {
|
|
|
48
48
|
return scriptFormatterEditorActionInstance;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
private editorSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
52
|
-
const uiSourceCode =
|
|
51
|
+
private editorSelected(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {
|
|
52
|
+
const uiSourceCode = event.data;
|
|
53
53
|
this.updateButton(uiSourceCode);
|
|
54
54
|
|
|
55
55
|
if (this.isFormattableScript(uiSourceCode) && this.pathsToFormatOnLoad.has(uiSourceCode.url()) &&
|
|
@@ -58,9 +58,8 @@ export class ScriptFormatterEditorAction implements EditorAction {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
private async editorClosed(event: Common.EventTarget.EventTargetEvent): Promise<void> {
|
|
62
|
-
const uiSourceCode =
|
|
63
|
-
const wasSelected = (event.data.wasSelected as boolean);
|
|
61
|
+
private async editorClosed(event: Common.EventTarget.EventTargetEvent<EditorClosedEvent>): Promise<void> {
|
|
62
|
+
const {uiSourceCode, wasSelected} = event.data;
|
|
64
63
|
|
|
65
64
|
if (wasSelected) {
|
|
66
65
|
this.updateButton(null);
|
|
@@ -643,8 +643,8 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
|
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
645
|
|
|
646
|
-
private editorSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
647
|
-
const uiSourceCode =
|
|
646
|
+
private editorSelected(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {
|
|
647
|
+
const uiSourceCode = event.data;
|
|
648
648
|
if (this.editorView.mainWidget() &&
|
|
649
649
|
Common.Settings.Settings.instance().moduleSetting('autoRevealInNavigator').get()) {
|
|
650
650
|
this.revealInNavigator(uiSourceCode, true);
|
|
@@ -40,8 +40,8 @@ const UIStrings = {
|
|
|
40
40
|
const str_ = i18n.i18n.registerUIStrings('panels/sources/SourcesView.ts', UIStrings);
|
|
41
41
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
42
42
|
|
|
43
|
-
export class SourcesView extends UI.Widget.VBox
|
|
44
|
-
|
|
43
|
+
export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(UI.Widget.VBox)
|
|
44
|
+
implements TabbedEditorContainerDelegate, UI.SearchableView.Searchable, UI.SearchableView.Replaceable {
|
|
45
45
|
private placeholderOptionArray: {
|
|
46
46
|
element: HTMLElement,
|
|
47
47
|
handler: Function,
|
|
@@ -446,7 +446,10 @@ export class SourcesView extends UI.Widget.VBox implements TabbedEditorContainer
|
|
|
446
446
|
this.updateToolbarChangedListener();
|
|
447
447
|
this.updateScriptViewToolbarItems();
|
|
448
448
|
|
|
449
|
-
|
|
449
|
+
const currentFile = this.editorContainer.currentFile();
|
|
450
|
+
if (currentFile) {
|
|
451
|
+
this.dispatchEventToListeners(Events.EditorSelected, currentFile);
|
|
452
|
+
}
|
|
450
453
|
}
|
|
451
454
|
|
|
452
455
|
private removeToolbarChangedListener(): void {
|
|
@@ -581,6 +584,16 @@ export // TODO(crbug.com/1167717): Make this a const enum again
|
|
|
581
584
|
EditorSelected = 'EditorSelected',
|
|
582
585
|
}
|
|
583
586
|
|
|
587
|
+
export interface EditorClosedEvent {
|
|
588
|
+
uiSourceCode: Workspace.UISourceCode.UISourceCode;
|
|
589
|
+
wasSelected: boolean;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
export type EventTypes = {
|
|
593
|
+
[Events.EditorClosed]: EditorClosedEvent,
|
|
594
|
+
[Events.EditorSelected]: Workspace.UISourceCode.UISourceCode,
|
|
595
|
+
};
|
|
596
|
+
|
|
584
597
|
/**
|
|
585
598
|
* @interface
|
|
586
599
|
*/
|
|
@@ -236,11 +236,10 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
236
236
|
SourceFrame.SourcesTextEditor.Events.SelectionChanged, this.selectionChanged, this);
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
private scrollChanged(
|
|
239
|
+
private scrollChanged({data: lineNumber}: Common.EventTarget.EventTargetEvent<number>): void {
|
|
240
240
|
if (this.scrollTimer) {
|
|
241
241
|
clearTimeout(this.scrollTimer);
|
|
242
242
|
}
|
|
243
|
-
const lineNumber = (event.data as number);
|
|
244
243
|
this.scrollTimer = window.setTimeout(saveHistory.bind(this), 100);
|
|
245
244
|
if (this.currentFileInternal) {
|
|
246
245
|
this.history.updateScrollLineNumber(this.currentFileInternal.url(), lineNumber);
|
|
@@ -251,8 +250,7 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
251
250
|
}
|
|
252
251
|
}
|
|
253
252
|
|
|
254
|
-
private selectionChanged(
|
|
255
|
-
const range = (event.data as TextUtils.TextRange.TextRange);
|
|
253
|
+
private selectionChanged({data: range}: Common.EventTarget.EventTargetEvent<TextUtils.TextRange.TextRange>): void {
|
|
256
254
|
if (this.currentFileInternal) {
|
|
257
255
|
this.history.updateSelectionRange(this.currentFileInternal.url(), range);
|
|
258
256
|
}
|
|
@@ -511,10 +509,8 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
511
509
|
}
|
|
512
510
|
}
|
|
513
511
|
|
|
514
|
-
private tabClosed(event: Common.EventTarget.EventTargetEvent): void {
|
|
515
|
-
const tabId =
|
|
516
|
-
const userGesture = (event.data.isUserGesture as boolean);
|
|
517
|
-
|
|
512
|
+
private tabClosed(event: Common.EventTarget.EventTargetEvent<UI.TabbedPane.EventData>): void {
|
|
513
|
+
const {tabId, isUserGesture} = event.data;
|
|
518
514
|
const uiSourceCode = this.files.get(tabId);
|
|
519
515
|
if (this.currentFileInternal === uiSourceCode) {
|
|
520
516
|
this.removeViewListeners();
|
|
@@ -531,19 +527,18 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
531
527
|
|
|
532
528
|
this.dispatchEventToListeners(Events.EditorClosed, uiSourceCode);
|
|
533
529
|
|
|
534
|
-
if (
|
|
530
|
+
if (isUserGesture) {
|
|
535
531
|
this.editorClosedByUserAction(uiSourceCode);
|
|
536
532
|
}
|
|
537
533
|
}
|
|
538
534
|
}
|
|
539
535
|
|
|
540
|
-
private tabSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
541
|
-
const tabId =
|
|
542
|
-
const userGesture = (event.data.isUserGesture as boolean);
|
|
536
|
+
private tabSelected(event: Common.EventTarget.EventTargetEvent<UI.TabbedPane.EventData>): void {
|
|
537
|
+
const {tabId, isUserGesture} = event.data;
|
|
543
538
|
|
|
544
539
|
const uiSourceCode = this.files.get(tabId);
|
|
545
540
|
if (uiSourceCode) {
|
|
546
|
-
this.innerShowFile(uiSourceCode,
|
|
541
|
+
this.innerShowFile(uiSourceCode, isUserGesture);
|
|
547
542
|
}
|
|
548
543
|
}
|
|
549
544
|
|
|
@@ -51,7 +51,9 @@ import {ScriptOriginPlugin} from './ScriptOriginPlugin.js';
|
|
|
51
51
|
import {SnippetsPlugin} from './SnippetsPlugin.js';
|
|
52
52
|
import {SourcesPanel} from './SourcesPanel.js';
|
|
53
53
|
|
|
54
|
-
export class UISourceCodeFrame extends
|
|
54
|
+
export class UISourceCodeFrame extends
|
|
55
|
+
Common.ObjectWrapper.eventMixin<EventTypes, typeof SourceFrame.SourceFrame.SourceFrameImpl>(
|
|
56
|
+
SourceFrame.SourceFrame.SourceFrameImpl) {
|
|
55
57
|
private uiSourceCodeInternal: Workspace.UISourceCode.UISourceCode;
|
|
56
58
|
private readonly diff: SourceFrame.SourceCodeDiff.SourceCodeDiff|undefined;
|
|
57
59
|
private muteSourceCodeEvents: boolean;
|
|
@@ -919,3 +921,7 @@ function messageLevelComparator(a: Workspace.UISourceCode.Message, b: Workspace.
|
|
|
919
921
|
export enum Events {
|
|
920
922
|
ToolbarItemsChanged = 'ToolbarItemsChanged',
|
|
921
923
|
}
|
|
924
|
+
|
|
925
|
+
export type EventTypes = {
|
|
926
|
+
[Events.ToolbarItemsChanged]: void,
|
|
927
|
+
};
|
|
@@ -7,17 +7,12 @@
|
|
|
7
7
|
.watch-expression-delete-button {
|
|
8
8
|
position: absolute;
|
|
9
9
|
top: 5px;
|
|
10
|
-
right:
|
|
10
|
+
right: 16px;
|
|
11
11
|
cursor: pointer;
|
|
12
12
|
opacity: 0%;
|
|
13
|
-
min-width: 20px;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
.watch-expression-header:hover .watch-expression-delete-button {
|
|
17
|
-
opacity: 50%;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.watch-expression-header:hover .watch-expression-delete-button:hover {
|
|
21
16
|
opacity: 100%;
|
|
22
17
|
}
|
|
23
18
|
|
|
@@ -101,7 +96,7 @@ li.watch-expression-tree-item {
|
|
|
101
96
|
}
|
|
102
97
|
|
|
103
98
|
li.watch-expression-tree-item:hover {
|
|
104
|
-
background-color: var(--color-background-elevation-
|
|
99
|
+
background-color: var(--color-background-elevation-1);
|
|
105
100
|
}
|
|
106
101
|
|
|
107
102
|
.watch-expression-header:focus-visible {
|
|
@@ -249,7 +249,7 @@ export class TimelineDetailsView extends UI.Widget.VBox {
|
|
|
249
249
|
this.updateContents();
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
private tabSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
252
|
+
private tabSelected(event: Common.EventTarget.EventTargetEvent<UI.TabbedPane.EventData>): void {
|
|
253
253
|
if (!event.data.isUserGesture) {
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
@@ -150,8 +150,8 @@ export class TimelineFlameChartView extends UI.Widget.VBox implements PerfUI.Fla
|
|
|
150
150
|
private readonly countersView: CountersGraph;
|
|
151
151
|
private readonly detailsSplitWidget: UI.SplitWidget.SplitWidget;
|
|
152
152
|
private readonly detailsView: TimelineDetailsView;
|
|
153
|
-
private readonly onMainEntrySelected: (event?: Common.EventTarget.EventTargetEvent) => void;
|
|
154
|
-
private readonly onNetworkEntrySelected: (event?: Common.EventTarget.EventTargetEvent) => void;
|
|
153
|
+
private readonly onMainEntrySelected: (event?: Common.EventTarget.EventTargetEvent<number>) => void;
|
|
154
|
+
private readonly onNetworkEntrySelected: (event?: Common.EventTarget.EventTargetEvent<number>) => void;
|
|
155
155
|
private nextExtensionIndex: number;
|
|
156
156
|
private readonly boundRefresh: () => void;
|
|
157
157
|
private selectedTrack: TimelineModel.TimelineModel.Track|null;
|
|
@@ -361,9 +361,9 @@ export class TimelineFlameChartView extends UI.Widget.VBox implements PerfUI.Fla
|
|
|
361
361
|
this.mainFlameChart.scheduleUpdate();
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
private onEntryHighlighted(commonEvent: Common.EventTarget.EventTargetEvent): void {
|
|
364
|
+
private onEntryHighlighted(commonEvent: Common.EventTarget.EventTargetEvent<number>): void {
|
|
365
365
|
SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight();
|
|
366
|
-
const entryIndex =
|
|
366
|
+
const entryIndex = commonEvent.data;
|
|
367
367
|
const event = this.mainDataProvider.eventByIndex(entryIndex);
|
|
368
368
|
if (!event) {
|
|
369
369
|
return;
|
|
@@ -63,13 +63,13 @@ export class TimelineLayersView extends UI.SplitWidget.SplitWidget {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
private onPaintProfilerRequested(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
66
|
+
private async onPaintProfilerRequested(
|
|
67
|
+
event: Common.EventTarget.EventTargetEvent<LayerViewer.LayerViewHost.Selection>): Promise<void> {
|
|
68
|
+
const selection = event.data;
|
|
69
|
+
const snapshotWithRect = await this.layers3DView.snapshotForSelection(selection);
|
|
70
|
+
if (snapshotWithRect) {
|
|
71
|
+
this.showPaintProfilerCallback(snapshotWithRect.snapshot);
|
|
72
|
+
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
private update(): void {
|
|
@@ -448,7 +448,8 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
|
|
|
448
448
|
this.loader = TimelineLoader.loadFromEvents(events, this);
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
-
private onOverviewWindowChanged(
|
|
451
|
+
private onOverviewWindowChanged(
|
|
452
|
+
event: Common.EventTarget.EventTargetEvent<PerfUI.TimelineOverviewPane.WindowChangedEvent>): void {
|
|
452
453
|
if (!this.performanceModel) {
|
|
453
454
|
return;
|
|
454
455
|
}
|