chrome-devtools-frontend 1.0.998787 → 1.0.1000057
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/.eslintrc.js +4 -4
- package/front_end/core/common/Color.ts +9 -1
- package/front_end/core/common/Object.ts +2 -1
- package/front_end/core/common/ParsedURL.ts +3 -3
- 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/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/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/legacy/legacy-defs.d.ts +2 -2
- package/front_end/models/formatter/ScriptFormatter.ts +3 -1
- package/front_end/models/issues_manager/DeprecationIssue.ts +1 -1
- 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/models/workspace/WorkspaceImpl.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 +15 -0
- package/front_end/panels/lighthouse/LighthousePanel.ts +2 -1
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +9 -2
- package/front_end/panels/lighthouse/lighthouseDialog.css +5 -0
- 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/AddSourceMapURLDialog.ts +5 -4
- package/front_end/panels/sources/DebuggerPausedMessage.ts +2 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +2 -4
- package/front_end/panels/sources/NavigatorView.ts +4 -5
- package/front_end/panels/sources/ScriptFormatterEditorAction.ts +2 -1
- package/front_end/panels/sources/SourcesPanel.ts +7 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +14 -13
- 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 +0 -6
- 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/Fragment.ts +2 -2
- 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/eslint_rules/lib/enforce_bound_render_for_schedule_render.js +110 -0
- package/scripts/eslint_rules/tests/enforce_bound_render_for_schedule_render_test.js +74 -0
- package/scripts/reformat-clang-js-ts.js +60 -0
@@ -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
|
|
@@ -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
|
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
6
|
+
import type * as Platform from '../../core/platform/platform.js';
|
6
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
7
8
|
|
8
9
|
import dialogStyles from './dialog.css.js';
|
@@ -22,8 +23,8 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
22
23
|
export class AddSourceMapURLDialog extends UI.Widget.HBox {
|
23
24
|
private readonly input: HTMLInputElement;
|
24
25
|
private readonly dialog: UI.Dialog.Dialog;
|
25
|
-
private readonly callback: (arg0:
|
26
|
-
constructor(callback: (arg0:
|
26
|
+
private readonly callback: (arg0: Platform.DevToolsPath.UrlString) => void;
|
27
|
+
constructor(callback: (arg0: Platform.DevToolsPath.UrlString) => void) {
|
27
28
|
super(/* isWebComponent */ true);
|
28
29
|
|
29
30
|
this.contentElement.createChild('label').textContent = i18nString(UIStrings.sourceMapUrl);
|
@@ -51,13 +52,13 @@ export class AddSourceMapURLDialog extends UI.Widget.HBox {
|
|
51
52
|
this.dialog.show();
|
52
53
|
}
|
53
54
|
|
54
|
-
private done(value:
|
55
|
+
private done(value: Platform.DevToolsPath.UrlString): void {
|
55
56
|
this.dialog.hide();
|
56
57
|
this.callback(value);
|
57
58
|
}
|
58
59
|
|
59
60
|
private apply(): void {
|
60
|
-
this.done(this.input.value);
|
61
|
+
this.done(this.input.value as Platform.DevToolsPath.UrlString);
|
61
62
|
}
|
62
63
|
|
63
64
|
private onKeyDown(event: KeyboardEvent): void {
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
7
|
+
import type * as Platform from '../../core/platform/platform.js';
|
7
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
8
9
|
|
9
10
|
import debuggerPausedMessageStyles from './debuggerPausedMessage.css.js';
|
@@ -276,6 +277,6 @@ export const BreakpointTypeNouns = new Map([
|
|
276
277
|
]);
|
277
278
|
interface PausedDetailsAuxData {
|
278
279
|
description?: string;
|
279
|
-
url?:
|
280
|
+
url?: Platform.DevToolsPath.UrlString;
|
280
281
|
value?: string;
|
281
282
|
}
|
@@ -472,11 +472,11 @@ export class DebuggerPlugin extends Plugin {
|
|
472
472
|
}
|
473
473
|
|
474
474
|
function addSourceMapURLDialogCallback(
|
475
|
-
scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile, url:
|
475
|
+
scriptFile: Bindings.ResourceScriptMapping.ResourceScriptFile, url: Platform.DevToolsPath.UrlString): void {
|
476
476
|
if (!url) {
|
477
477
|
return;
|
478
478
|
}
|
479
|
-
scriptFile.addSourceMapURL(url
|
479
|
+
scriptFile.addSourceMapURL(url);
|
480
480
|
}
|
481
481
|
|
482
482
|
if (this.uiSourceCode.project().type() === Workspace.Workspace.projectTypes.Network &&
|
@@ -93,9 +93,7 @@ export class EditingLocationHistoryManager {
|
|
93
93
|
}
|
94
94
|
|
95
95
|
private reveal(entry: EditingLocationHistoryEntry): void {
|
96
|
-
|
97
|
-
const uiSourceCode = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCode(
|
98
|
-
entry.projectId, entry.url as Platform.DevToolsPath.UrlString);
|
96
|
+
const uiSourceCode = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCode(entry.projectId, entry.url);
|
99
97
|
if (uiSourceCode) {
|
100
98
|
this.revealing = true;
|
101
99
|
this.sourcesView.showSourceLocation(uiSourceCode, entry.position, false, true);
|
@@ -131,7 +129,7 @@ export class EditingLocationHistoryManager {
|
|
131
129
|
|
132
130
|
class EditingLocationHistoryEntry {
|
133
131
|
readonly projectId: string;
|
134
|
-
readonly url:
|
132
|
+
readonly url: Platform.DevToolsPath.UrlString;
|
135
133
|
position: number;
|
136
134
|
|
137
135
|
constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode, position: number) {
|
@@ -290,7 +290,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
|
|
290
290
|
// Update folder titles.
|
291
291
|
const pathTokens =
|
292
292
|
Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.relativePath(binding.fileSystem);
|
293
|
-
let folderPath =
|
293
|
+
let folderPath = Platform.DevToolsPath.EmptyEncodedPathString;
|
294
294
|
for (let i = 0; i < pathTokens.length - 1; ++i) {
|
295
295
|
folderPath = Common.ParsedURL.ParsedURL.concatenate(folderPath, pathTokens[i]);
|
296
296
|
const folderId =
|
@@ -744,7 +744,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
|
|
744
744
|
const folderId = this.folderNodeId(
|
745
745
|
project, target, frame, uiSourceCode.origin(),
|
746
746
|
currentNode instanceof NavigatorFolderTreeNode && currentNode.folderPath ||
|
747
|
-
|
747
|
+
Platform.DevToolsPath.EmptyEncodedPathString);
|
748
748
|
this.subfolderNodes.delete(folderId);
|
749
749
|
parentNode.removeChild(currentNode);
|
750
750
|
currentNode = (parentNode as NavigatorUISourceCodeTreeNode | null);
|
@@ -822,8 +822,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
|
|
822
822
|
contextMenu.editSection().appendItem(i18nString(UIStrings.rename), this.handleContextMenuRename.bind(this, node));
|
823
823
|
contextMenu.editSection().appendItem(
|
824
824
|
i18nString(UIStrings.makeACopy),
|
825
|
-
this.handleContextMenuCreate.bind(
|
826
|
-
this, project, '' as Platform.DevToolsPath.EncodedPathString, uiSourceCode));
|
825
|
+
this.handleContextMenuCreate.bind(this, project, Platform.DevToolsPath.EmptyEncodedPathString, uiSourceCode));
|
827
826
|
contextMenu.editSection().appendItem(
|
828
827
|
i18nString(UIStrings.delete), this.handleContextMenuDelete.bind(this, uiSourceCode));
|
829
828
|
}
|
@@ -1472,7 +1471,7 @@ export class NavigatorFolderTreeNode extends NavigatorTreeNode {
|
|
1472
1471
|
folderPath: Platform.DevToolsPath.EncodedPathString, title: string) {
|
1473
1472
|
super(navigatorView, id, type);
|
1474
1473
|
this.project = project;
|
1475
|
-
this.folderPath = folderPath
|
1474
|
+
this.folderPath = folderPath;
|
1476
1475
|
this.title = title;
|
1477
1476
|
}
|
1478
1477
|
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import type * as Common from '../../core/common/common.js';
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
7
|
+
import type * as Platform from '../../core/platform/platform.js';
|
7
8
|
import * as FormatterModule from '../../models/formatter/formatter.js';
|
8
9
|
import * as Persistence from '../../models/persistence/persistence.js';
|
9
10
|
import * as Workspace from '../../models/workspace/workspace.js';
|
@@ -30,7 +31,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
30
31
|
let scriptFormatterEditorActionInstance: ScriptFormatterEditorAction;
|
31
32
|
|
32
33
|
export class ScriptFormatterEditorAction implements EditorAction {
|
33
|
-
private readonly pathsToFormatOnLoad: Set<
|
34
|
+
private readonly pathsToFormatOnLoad: Set<Platform.DevToolsPath.UrlString>;
|
34
35
|
private sourcesView!: SourcesView;
|
35
36
|
private button!: UI.Toolbar.ToolbarButton;
|
36
37
|
private constructor() {
|
@@ -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';
|
@@ -436,10 +436,10 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
436
436
|
private updateHistory(): void {
|
437
437
|
const tabIds = this.tabbedPane.lastOpenedTabIds(maximalPreviouslyViewedFilesCount);
|
438
438
|
|
439
|
-
function tabIdToURI(this: TabbedEditorContainer, tabId: string):
|
439
|
+
function tabIdToURI(this: TabbedEditorContainer, tabId: string): Platform.DevToolsPath.UrlString {
|
440
440
|
const tab = this.files.get(tabId);
|
441
441
|
if (!tab) {
|
442
|
-
return
|
442
|
+
return Platform.DevToolsPath.EmptyUrlString;
|
443
443
|
}
|
444
444
|
return tab.url();
|
445
445
|
}
|
@@ -639,18 +639,19 @@ export let tabId = 0;
|
|
639
639
|
export const maximalPreviouslyViewedFilesCount = 30;
|
640
640
|
|
641
641
|
interface SerializedHistoryItem {
|
642
|
-
url:
|
642
|
+
url: Platform.DevToolsPath.UrlString;
|
643
643
|
selectionRange?: TextUtils.TextRange.SerializedTextRange;
|
644
644
|
scrollLineNumber?: number;
|
645
645
|
}
|
646
646
|
|
647
647
|
export class HistoryItem {
|
648
|
-
url:
|
648
|
+
url: Platform.DevToolsPath.UrlString;
|
649
649
|
private isSerializable: boolean;
|
650
650
|
selectionRange: TextUtils.TextRange.TextRange|undefined;
|
651
651
|
scrollLineNumber: number|undefined;
|
652
652
|
|
653
|
-
constructor(
|
653
|
+
constructor(
|
654
|
+
url: Platform.DevToolsPath.UrlString, selectionRange?: TextUtils.TextRange.TextRange, scrollLineNumber?: number) {
|
654
655
|
this.url = url;
|
655
656
|
this.isSerializable = url.length < HistoryItem.serializableUrlLengthLimit;
|
656
657
|
this.selectionRange = selectionRange;
|
@@ -700,7 +701,7 @@ export class History {
|
|
700
701
|
return new History(items);
|
701
702
|
}
|
702
703
|
|
703
|
-
index(url:
|
704
|
+
index(url: Platform.DevToolsPath.UrlString): number {
|
704
705
|
const index = this.itemsIndex.get(url);
|
705
706
|
if (index !== undefined) {
|
706
707
|
return index;
|
@@ -716,12 +717,12 @@ export class History {
|
|
716
717
|
}
|
717
718
|
}
|
718
719
|
|
719
|
-
selectionRange(url:
|
720
|
+
selectionRange(url: Platform.DevToolsPath.UrlString): TextUtils.TextRange.TextRange|undefined {
|
720
721
|
const index = this.index(url);
|
721
722
|
return index !== -1 ? this.items[index].selectionRange : undefined;
|
722
723
|
}
|
723
724
|
|
724
|
-
updateSelectionRange(url:
|
725
|
+
updateSelectionRange(url: Platform.DevToolsPath.UrlString, selectionRange?: TextUtils.TextRange.TextRange): void {
|
725
726
|
if (!selectionRange) {
|
726
727
|
return;
|
727
728
|
}
|
@@ -732,12 +733,12 @@ export class History {
|
|
732
733
|
this.items[index].selectionRange = selectionRange;
|
733
734
|
}
|
734
735
|
|
735
|
-
scrollLineNumber(url:
|
736
|
+
scrollLineNumber(url: Platform.DevToolsPath.UrlString): number|undefined {
|
736
737
|
const index = this.index(url);
|
737
738
|
return index !== -1 ? this.items[index].scrollLineNumber : undefined;
|
738
739
|
}
|
739
740
|
|
740
|
-
updateScrollLineNumber(url:
|
741
|
+
updateScrollLineNumber(url: Platform.DevToolsPath.UrlString, scrollLineNumber: number): void {
|
741
742
|
const index = this.index(url);
|
742
743
|
if (index === -1) {
|
743
744
|
return;
|
@@ -745,7 +746,7 @@ export class History {
|
|
745
746
|
this.items[index].scrollLineNumber = scrollLineNumber;
|
746
747
|
}
|
747
748
|
|
748
|
-
update(urls:
|
749
|
+
update(urls: Platform.DevToolsPath.UrlString[]): void {
|
749
750
|
for (let i = urls.length - 1; i >= 0; --i) {
|
750
751
|
const index = this.index(urls[i]);
|
751
752
|
let item;
|
@@ -760,7 +761,7 @@ export class History {
|
|
760
761
|
}
|
761
762
|
}
|
762
763
|
|
763
|
-
remove(url:
|
764
|
+
remove(url: Platform.DevToolsPath.UrlString): void {
|
764
765
|
const index = this.index(url);
|
765
766
|
if (index !== -1) {
|
766
767
|
this.items.splice(index, 1);
|
@@ -786,7 +787,7 @@ export class History {
|
|
786
787
|
return serializedHistory;
|
787
788
|
}
|
788
789
|
|
789
|
-
urls():
|
790
|
+
urls(): Platform.DevToolsPath.UrlString[] {
|
790
791
|
const result = [];
|
791
792
|
for (let i = 0; i < this.items.length; ++i) {
|
792
793
|
result.push(this.items[i].url);
|
@@ -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
|
];
|
@@ -57,7 +57,15 @@ import {Events, PerformanceModel} from './PerformanceModel.js';
|
|
57
57
|
import type {Client} from './TimelineController.js';
|
58
58
|
import {TimelineController} from './TimelineController.js';
|
59
59
|
import type {TimelineEventOverview} from './TimelineEventOverview.js';
|
60
|
-
import {
|
60
|
+
import {
|
61
|
+
TimelineEventOverviewCoverage,
|
62
|
+
TimelineEventOverviewCPUActivity,
|
63
|
+
TimelineEventOverviewInput,
|
64
|
+
TimelineEventOverviewMemory,
|
65
|
+
TimelineEventOverviewNetwork,
|
66
|
+
TimelineEventOverviewResponsiveness,
|
67
|
+
TimelineFilmStripOverview,
|
68
|
+
} from './TimelineEventOverview.js';
|
61
69
|
import {TimelineFlameChartView} from './TimelineFlameChartView.js';
|
62
70
|
import {TimelineHistoryManager} from './TimelineHistoryManager.js';
|
63
71
|
import {TimelineLoader} from './TimelineLoader.js';
|
@@ -701,7 +709,6 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
|
|
701
709
|
if (Root.Runtime.experiments.isEnabled('inputEventsOnTimelineOverview')) {
|
702
710
|
this.overviewControls.push(new TimelineEventOverviewInput());
|
703
711
|
}
|
704
|
-
this.overviewControls.push(new TimelineEventOverviewFrames());
|
705
712
|
this.overviewControls.push(new TimelineEventOverviewCPUActivity());
|
706
713
|
this.overviewControls.push(new TimelineEventOverviewNetwork());
|
707
714
|
if (this.showScreenshotsSetting.get() && this.performanceModel &&
|
@@ -1069,10 +1069,6 @@ const UIStrings = {
|
|
1069
1069
|
*/
|
1070
1070
|
frame: 'Frame',
|
1071
1071
|
/**
|
1072
|
-
*@description Text in Timeline Event Overview of the Performance panel
|
1073
|
-
*/
|
1074
|
-
fps: 'FPS',
|
1075
|
-
/**
|
1076
1072
|
*@description Text in Timeline UIUtils of the Performance panel
|
1077
1073
|
*/
|
1078
1074
|
cpuTime: 'CPU time',
|
@@ -3089,8 +3085,6 @@ export class TimelineUIUtils {
|
|
3089
3085
|
|
3090
3086
|
const duration = TimelineUIUtils.frameDuration(frame);
|
3091
3087
|
contentHelper.appendElementRow(i18nString(UIStrings.duration), duration, frame.hasWarnings());
|
3092
|
-
const durationInMillis = frame.endTime - frame.startTime;
|
3093
|
-
contentHelper.appendTextRow(i18nString(UIStrings.fps), Math.floor(1000 / durationInMillis));
|
3094
3088
|
contentHelper.appendTextRow(i18nString(UIStrings.cpuTime), i18n.TimeUtilities.millisToString(frame.cpuTime, true));
|
3095
3089
|
if (filmStripFrame) {
|
3096
3090
|
const filmStripPreview = document.createElement('div');
|
@@ -74,9 +74,6 @@ Timeline.TimelineEventOverviewResponsiveness = TimelineModule.TimelineEventOverv
|
|
74
74
|
/** @constructor */
|
75
75
|
Timeline.TimelineFilmStripOverview = TimelineModule.TimelineEventOverview.TimelineFilmStripOverview;
|
76
76
|
|
77
|
-
/** @constructor */
|
78
|
-
Timeline.TimelineEventOverviewFrames = TimelineModule.TimelineEventOverview.TimelineEventOverviewFrames;
|
79
|
-
|
80
77
|
/** @constructor */
|
81
78
|
Timeline.TimelineEventOverviewMemory = TimelineModule.TimelineEventOverview.TimelineEventOverviewMemory;
|
82
79
|
|
@@ -111,11 +111,6 @@
|
|
111
111
|
flex-basis: 8px;
|
112
112
|
}
|
113
113
|
|
114
|
-
#timeline-overview-framerate {
|
115
|
-
flex-basis: 16px;
|
116
|
-
margin-top: 0 !important; /* stylelint-disable-line declaration-no-important */
|
117
|
-
}
|
118
|
-
|
119
114
|
#timeline-overview-filmstrip {
|
120
115
|
flex-basis: 30px;
|
121
116
|
}
|
@@ -124,7 +119,6 @@
|
|
124
119
|
flex-basis: 20px;
|
125
120
|
}
|
126
121
|
|
127
|
-
#timeline-overview-framerate::before,
|
128
122
|
#timeline-overview-network::before,
|
129
123
|
#timeline-overview-cpu-activity::before {
|
130
124
|
content: "";
|
@@ -6,7 +6,9 @@ import * as Common from '../../../core/common/common.js';
|
|
6
6
|
import * as Platform from '../../../core/platform/platform.js';
|
7
7
|
|
8
8
|
import {EdgeTypes, EdgeView, generateEdgePortIdsByData} from './EdgeView.js';
|
9
|
-
import type {
|
9
|
+
import type {
|
10
|
+
NodeCreationData, NodeParamConnectionData, NodeParamDisconnectionData, NodesConnectionData, NodesDisconnectionData,
|
11
|
+
NodesDisconnectionDataWithDestination, ParamCreationData} from './GraphStyle.js';
|
10
12
|
import {NodeLabelGenerator, NodeView} from './NodeView.js';
|
11
13
|
|
12
14
|
// A class that tracks all the nodes and edges of an audio graph.
|
@@ -3,7 +3,14 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import type {Point, Size} from './GraphStyle.js';
|
6
|
-
import {
|
6
|
+
import {
|
7
|
+
AudioParamRadius,
|
8
|
+
InputPortRadius,
|
9
|
+
LeftSideTopPadding,
|
10
|
+
TotalInputPortHeight,
|
11
|
+
TotalOutputPortHeight,
|
12
|
+
TotalParamPortHeight,
|
13
|
+
} from './GraphStyle.js';
|
7
14
|
|
8
15
|
/**
|
9
16
|
* Calculate the x, y value of input port.
|