chrome-devtools-frontend 1.0.1704172 → 1.0.1706026
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/AUTHORS +1 -0
- package/docs/architecture_of_devtools.md +1 -1
- package/docs/cookbook/localization.md +2 -2
- package/eslint.config.mjs +1 -0
- package/front_end/Images/src/nodejsHex.svg +28 -0
- package/front_end/core/common/README.md +4 -3
- package/front_end/core/sdk/CPUThrottlingManager.ts +14 -10
- package/front_end/core/sdk/DOMModel.ts +65 -20
- package/front_end/core/sdk/DebuggerModel.ts +0 -4
- package/front_end/core/sdk/PageResourceLoader.ts +12 -11
- package/front_end/core/sdk/SourceMap.ts +7 -5
- package/front_end/core/sdk/SourceMapFunctionRanges.ts +22 -37
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +3 -3
- package/front_end/core/sdk/SourceMapScopesInfo.ts +50 -62
- package/front_end/entrypoints/formatter_actions/formatter_actions.ts +18 -0
- package/front_end/entrypoints/formatter_worker/Substitute.ts +9 -8
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +9 -4
- package/front_end/entrypoints/heap_snapshot_worker/ContextAnalyzer.ts +140 -20
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +16 -5
- package/front_end/entrypoints/inspector_main/nodeIcon.css +1 -1
- package/front_end/foundation/Universe.ts +9 -0
- package/front_end/generated/InspectorBackendCommands.ts +4 -3
- package/front_end/generated/protocol.ts +17 -1
- package/front_end/models/ai_assistance/AiConversation.ts +16 -3
- package/front_end/models/ai_assistance/skills/accessibility.md +8 -7
- package/front_end/models/formatter/FormatterWorkerPool.ts +14 -4
- package/front_end/models/javascript_metadata/NativeFunctions.ts +6 -2
- package/front_end/models/source_map_scopes/NamesResolver.ts +69 -42
- package/front_end/models/source_map_scopes/ScopeChainModel.ts +13 -45
- package/front_end/models/source_map_scopes/ScopeChainResolver.ts +101 -0
- package/front_end/models/source_map_scopes/source_map_scopes.ts +2 -0
- package/front_end/panels/application/BackgroundServiceView.ts +1 -0
- package/front_end/panels/application/components/AdsView.ts +6 -6
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/console/ConsolePrompt.ts +2 -1
- package/front_end/panels/elements/CSSRuleValidator.ts +3 -0
- package/front_end/panels/elements/ClassesPaneWidget.ts +4 -1
- package/front_end/panels/elements/LayoutPane.ts +17 -20
- package/front_end/panels/network/NetworkLogViewColumns.ts +10 -3
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +14 -7
- package/front_end/panels/sources/BreakpointEditDialog.ts +13 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +69 -58
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +6 -6
- package/front_end/panels/sources/OpenFileQuickOpen.ts +2 -2
- package/front_end/panels/sources/Plugin.ts +3 -2
- package/front_end/panels/sources/ResourceOriginPlugin.ts +14 -17
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +2 -2
- package/front_end/panels/sources/SourcesPanel.ts +1 -1
- package/front_end/panels/sources/SourcesView.ts +25 -82
- package/front_end/panels/sources/TabbedEditorContainer.ts +75 -21
- package/front_end/panels/sources/UISourceCodeFrame.ts +22 -13
- package/front_end/panels/sources/sourcesView.css +17 -27
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/source-map-scopes-codec/README.chromium +2 -2
- package/front_end/third_party/source-map-scopes-codec/package/CONTRIBUTING.md +14 -1
- package/front_end/third_party/source-map-scopes-codec/package/README.md +8 -6
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts +4 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts +3 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts +4 -3
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/deno.json +6 -2
- package/front_end/third_party/source-map-scopes-codec/package/package.json +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +18 -2
- package/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.ts +22 -3
- package/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +33 -5
- package/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.ts +41 -5
- package/front_end/third_party/source-map-scopes-codec/package/src/codec.js +0 -2
- package/front_end/third_party/source-map-scopes-codec/package/src/codec.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +4 -3
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +99 -36
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +143 -49
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +3 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.ts +3 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +40 -18
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +51 -21
- package/front_end/third_party/source-map-scopes-codec/package/src/scopes.ts +4 -3
- package/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +18 -4
- package/front_end/third_party/source-map-scopes-codec/package/src/vlq.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/vlq.ts +18 -4
- package/front_end/ui/comments/CommentOverlayManager.ts +23 -10
- package/front_end/ui/components/text_editor/javascript.ts +128 -52
- package/front_end/ui/legacy/README.md +12 -12
- package/front_end/ui/legacy/SearchableView.ts +125 -74
- package/front_end/ui/legacy/components/source_frame/FontView.ts +5 -5
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +13 -13
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +2 -6
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -2
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
- package/front_end/Images/nodeIcon.avif +0 -0
|
@@ -7,7 +7,7 @@ import * as Workspace from '../../models/workspace/workspace.js';
|
|
|
7
7
|
import type * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
|
|
8
8
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
9
9
|
|
|
10
|
-
import type {
|
|
10
|
+
import type {TabbedEditorContainer} from './TabbedEditorContainer.js';
|
|
11
11
|
import type {UISourceCodeFrame} from './UISourceCodeFrame.js';
|
|
12
12
|
|
|
13
13
|
export const HistoryDepth = 20;
|
|
@@ -17,7 +17,7 @@ export class EditingLocationHistoryManager {
|
|
|
17
17
|
private current = -1;
|
|
18
18
|
private revealingCount = 0;
|
|
19
19
|
|
|
20
|
-
constructor(private readonly
|
|
20
|
+
constructor(private readonly editorContainer: TabbedEditorContainer) {
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
trackSourceFrameCursorJumps(sourceFrame: UISourceCodeFrame): void {
|
|
@@ -66,12 +66,12 @@ export class EditingLocationHistoryManager {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
private
|
|
69
|
+
private reveal(entry: EditingLocationHistoryEntry): void {
|
|
70
70
|
const uiSourceCode = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCode(entry.projectId, entry.url);
|
|
71
71
|
if (uiSourceCode) {
|
|
72
72
|
this.revealingCount++;
|
|
73
73
|
try {
|
|
74
|
-
|
|
74
|
+
this.editorContainer.showSourceLocation(uiSourceCode, entry.position, false, true);
|
|
75
75
|
} finally {
|
|
76
76
|
this.revealingCount--;
|
|
77
77
|
}
|
|
@@ -81,14 +81,14 @@ export class EditingLocationHistoryManager {
|
|
|
81
81
|
rollback(): void {
|
|
82
82
|
if (this.current > 0) {
|
|
83
83
|
this.current--;
|
|
84
|
-
|
|
84
|
+
this.reveal(this.entries[this.current]);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
rollover(): void {
|
|
89
89
|
if (this.current < this.entries.length - 1) {
|
|
90
90
|
this.current++;
|
|
91
|
-
|
|
91
|
+
this.reveal(this.entries[this.current]);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -11,13 +11,13 @@ import {PanelUtils} from '../../panels/utils/utils.js';
|
|
|
11
11
|
import {Directives, html, type TemplateResult} from '../../ui/lit/lit.js';
|
|
12
12
|
|
|
13
13
|
import {FilteredUISourceCodeListProvider} from './FilteredUISourceCodeListProvider.js';
|
|
14
|
-
import {
|
|
14
|
+
import {TabbedEditorContainer} from './TabbedEditorContainer.js';
|
|
15
15
|
|
|
16
16
|
const {styleMap} = Directives;
|
|
17
17
|
|
|
18
18
|
export class OpenFileQuickOpen extends FilteredUISourceCodeListProvider {
|
|
19
19
|
override attach(): void {
|
|
20
|
-
this.setDefaultScores(
|
|
20
|
+
this.setDefaultScores(TabbedEditorContainer.defaultUISourceCodeScores());
|
|
21
21
|
super.attach();
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -7,6 +7,7 @@ import type * as CodeMirror from '../../third_party/codemirror.next/codemirror.n
|
|
|
7
7
|
import type * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
8
8
|
import type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
9
9
|
import type * as UI from '../../ui/legacy/legacy.js';
|
|
10
|
+
import type {LitTemplate} from '../../ui/lit/lit.js';
|
|
10
11
|
|
|
11
12
|
export class Plugin {
|
|
12
13
|
constructor(
|
|
@@ -21,7 +22,7 @@ export class Plugin {
|
|
|
21
22
|
willHide(): void {
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
rightToolbarItems(): UI.Toolbar.ToolbarItem
|
|
25
|
+
rightToolbarItems(): Array<UI.Toolbar.ToolbarItem|LitTemplate> {
|
|
25
26
|
return [];
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -30,7 +31,7 @@ export class Plugin {
|
|
|
30
31
|
* TODO(szuend): It is OK to asyncify this function (similar to {rightToolbarItems}),
|
|
31
32
|
* but it is currently not strictly necessary.
|
|
32
33
|
*/
|
|
33
|
-
leftToolbarItems(): UI.Toolbar.ToolbarItem
|
|
34
|
+
leftToolbarItems(): Array<UI.Toolbar.ToolbarItem|LitTemplate> {
|
|
34
35
|
return [];
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
// Copyright 2018 The Chromium Authors
|
|
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
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
|
-
|
|
6
4
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
5
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
8
6
|
import type * as Workspace from '../../models/workspace/workspace.js';
|
|
9
7
|
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
10
8
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
11
|
-
import
|
|
9
|
+
import {html, type LitTemplate, nothing} from '../../ui/lit/lit.js';
|
|
12
10
|
|
|
13
11
|
import {Plugin} from './Plugin.js';
|
|
14
12
|
|
|
@@ -35,12 +33,12 @@ export class ResourceOriginPlugin extends Plugin {
|
|
|
35
33
|
return contentType.hasScripts() || contentType.isFromSourceMap();
|
|
36
34
|
}
|
|
37
35
|
|
|
38
|
-
override rightToolbarItems():
|
|
36
|
+
override rightToolbarItems(): LitTemplate[] {
|
|
39
37
|
const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
|
|
40
38
|
|
|
41
39
|
// Handle source mapped scripts and stylesheets.
|
|
42
40
|
if (this.uiSourceCode.contentType().isFromSourceMap()) {
|
|
43
|
-
const links = [];
|
|
41
|
+
const links: Array<HTMLElement|LitTemplate> = [];
|
|
44
42
|
for (const script of debuggerWorkspaceBinding.scriptsForUISourceCode(this.uiSourceCode)) {
|
|
45
43
|
const uiSourceCode = debuggerWorkspaceBinding.uiSourceCodeForScript(script);
|
|
46
44
|
if (!uiSourceCode) {
|
|
@@ -55,21 +53,17 @@ export class ResourceOriginPlugin extends Plugin {
|
|
|
55
53
|
links.push(link);
|
|
56
54
|
}
|
|
57
55
|
for (const originURL of Bindings.SASSSourceMapping.SASSSourceMapping.uiSourceOrigin(this.uiSourceCode)) {
|
|
58
|
-
|
|
59
|
-
link.tabIndex = 0;
|
|
60
|
-
links.push(link);
|
|
56
|
+
links.push(Components.Linkifier.Linkifier.renderLinkifiedUrl(originURL, {tabStop: true}));
|
|
61
57
|
}
|
|
62
58
|
if (links.length === 0) {
|
|
63
59
|
return [];
|
|
64
60
|
}
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
return [new UI.Toolbar.ToolbarItem(uiI18n.getFormatLocalizedString(str_, UIStrings.fromS, {PH1: element}))];
|
|
61
|
+
const linksTemplate =
|
|
62
|
+
html`<span>${links.map((link, index) => html`${index > 0 ? ', ' : nothing}${link}`)}</span>`;
|
|
63
|
+
return [
|
|
64
|
+
html`<div class="toolbar-item">${
|
|
65
|
+
uiI18n.getFormatLocalizedStringTemplate(str_, UIStrings.fromS, {PH1: linksTemplate})}</div>`,
|
|
66
|
+
];
|
|
73
67
|
}
|
|
74
68
|
|
|
75
69
|
// Handle anonymous scripts with an originStackTrace.
|
|
@@ -77,7 +71,10 @@ export class ResourceOriginPlugin extends Plugin {
|
|
|
77
71
|
if (script.originStackTrace?.callFrames.length) {
|
|
78
72
|
const link = this.#linkifier.linkifyStackTraceTopFrame(script.debuggerModel.target(), script.originStackTrace);
|
|
79
73
|
link.tabIndex = 0;
|
|
80
|
-
return [
|
|
74
|
+
return [
|
|
75
|
+
html`<div class="toolbar-item">${
|
|
76
|
+
uiI18n.getFormatLocalizedStringTemplate(str_, UIStrings.fromS, {PH1: link})}</div>`,
|
|
77
|
+
];
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
80
|
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
32
32
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
33
33
|
import * as Protocol from '../../generated/protocol.js';
|
|
34
|
-
import * as Bindings from '../../models/bindings/bindings.js';
|
|
35
34
|
import * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';
|
|
36
35
|
import * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
37
36
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
@@ -214,8 +213,9 @@ export class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextF
|
|
|
214
213
|
this.#linkifier.reset();
|
|
215
214
|
|
|
216
215
|
if (callFrame) {
|
|
216
|
+
// TODO(crbug.com/458180550): Receive the ScopeChainResolver via constructor.
|
|
217
217
|
const scopeChainModel = new SourceMapScopes.ScopeChainModel.ScopeChainModel(
|
|
218
|
-
callFrame.sdkFrame,
|
|
218
|
+
callFrame.sdkFrame, SourceMapScopes.ScopeChainResolver.ScopeChainResolver.instance());
|
|
219
219
|
this.#scopeChainModel = scopeChainModel;
|
|
220
220
|
this.#scopeChainModel.addEventListener(SourceMapScopes.ScopeChainModel.Events.SCOPE_CHAIN_UPDATED, event => {
|
|
221
221
|
if (this.#scopeChainModel === scopeChainModel) {
|
|
@@ -421,7 +421,7 @@ export class SourcesPanel extends UI.Panel.Panel implements
|
|
|
421
421
|
} // Do not force layout.
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
override searchableView(): UI.SearchableView.SearchableView {
|
|
424
|
+
override searchableView(): UI.SearchableView.SearchableView|null {
|
|
425
425
|
return this.#sourcesView.searchableView();
|
|
426
426
|
}
|
|
427
427
|
|
|
@@ -19,11 +19,9 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
|
19
19
|
import {html, type LitTemplate, nothing, render} from '../../ui/lit/lit.js';
|
|
20
20
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
21
21
|
|
|
22
|
-
import {EditingLocationHistoryManager} from './EditingLocationHistoryManager.js';
|
|
23
22
|
import sourcesViewStyles from './sourcesView.css.js';
|
|
24
23
|
import {
|
|
25
24
|
type EditorSelectedEvent,
|
|
26
|
-
type SerializedHistoryItem,
|
|
27
25
|
TabbedEditorContainer,
|
|
28
26
|
} from './TabbedEditorContainer.js';
|
|
29
27
|
import {Events as UISourceCodeFrameEvents, UISourceCodeFrame} from './UISourceCodeFrame.js';
|
|
@@ -74,8 +72,8 @@ const {widget, widgetRef} = UI.Widget;
|
|
|
74
72
|
export interface ViewInput {
|
|
75
73
|
searchProvider: UI.SearchableView.Searchable;
|
|
76
74
|
replaceProvider: UI.SearchableView.Replaceable;
|
|
77
|
-
|
|
78
|
-
scriptViewToolbarItems:
|
|
75
|
+
isSearchReplaceable: boolean;
|
|
76
|
+
scriptViewToolbarItems: LitTemplate;
|
|
79
77
|
isNavigatorSidebarOpen: boolean;
|
|
80
78
|
isDebuggerSidebarOpen: boolean;
|
|
81
79
|
isDebuggerSidebarButtonEnabled: boolean;
|
|
@@ -86,15 +84,12 @@ export interface ViewInput {
|
|
|
86
84
|
onToggleDebuggerSidebar?: () => void;
|
|
87
85
|
breakpointsActive: boolean;
|
|
88
86
|
uiSourceCodes: ReadonlySet<Workspace.UISourceCode.UISourceCode>;
|
|
89
|
-
historyManager: EditingLocationHistoryManager;
|
|
90
|
-
previouslyViewedFilesSetting: Common.Settings.Setting<SerializedHistoryItem[]>;
|
|
91
87
|
onEditorSelected: (event: EditorSelectedEvent) => void;
|
|
92
88
|
onEditorClosed: (uiSourceCode: Workspace.UISourceCode.UISourceCode) => void;
|
|
93
89
|
}
|
|
94
90
|
|
|
95
91
|
export interface ViewOutput {
|
|
96
92
|
editorContainer?: TabbedEditorContainer;
|
|
97
|
-
searchableView?: UI.SearchableView.SearchableView;
|
|
98
93
|
}
|
|
99
94
|
|
|
100
95
|
export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
@@ -147,17 +142,16 @@ export const DEFAULT_VIEW: View = (input, output, target): void => {
|
|
|
147
142
|
render(html`
|
|
148
143
|
<style>${sourcesViewStyles}</style>
|
|
149
144
|
<devtools-widget class="vbox flex-auto"
|
|
150
|
-
${widget(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
145
|
+
${widget(UI.SearchableView.SearchableView, {
|
|
146
|
+
searchProvider: input.searchProvider,
|
|
147
|
+
replaceProvider: input.replaceProvider,
|
|
148
|
+
settingName: 'sources-view-search-config',
|
|
149
|
+
minimalSearchQuerySize: 0,
|
|
150
|
+
replaceable: input.isSearchReplaceable,
|
|
154
151
|
})}
|
|
155
|
-
${widgetRef(UI.SearchableView.SearchableView, e => { output.searchableView = e; })}
|
|
156
152
|
>
|
|
157
153
|
<devtools-widget class="vbox flex-auto ${input.breakpointsActive ? '' : 'breakpoints-deactivated'}"
|
|
158
154
|
${widget(TabbedEditorContainer, {
|
|
159
|
-
historyManager: input.historyManager,
|
|
160
|
-
previouslyViewedFilesSetting: input.previouslyViewedFilesSetting,
|
|
161
155
|
leftToolbarItems,
|
|
162
156
|
rightToolbarItems,
|
|
163
157
|
uiSourceCodes: input.uiSourceCodes,
|
|
@@ -168,10 +162,8 @@ export const DEFAULT_VIEW: View = (input, output, target): void => {
|
|
|
168
162
|
</devtools-widget>
|
|
169
163
|
</devtools-widget>
|
|
170
164
|
<div class="sources-toolbar" jslog=${VisualLogging.toolbar('bottom')}>
|
|
171
|
-
<devtools-toolbar class="script-view-toolbar"
|
|
172
|
-
${
|
|
173
|
-
? input.scriptViewToolbarItems.map(item => item.element)
|
|
174
|
-
: input.scriptViewToolbarItems}
|
|
165
|
+
<devtools-toolbar class="script-view-toolbar">
|
|
166
|
+
${input.scriptViewToolbarItems}
|
|
175
167
|
</devtools-toolbar>
|
|
176
168
|
<devtools-toolbar class="bottom-toolbar">
|
|
177
169
|
${bottomToolbarContent}
|
|
@@ -193,11 +185,10 @@ const SourcesViewBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Wid
|
|
|
193
185
|
|
|
194
186
|
export class SourcesView extends SourcesViewBase implements UI.SearchableView.Searchable,
|
|
195
187
|
UI.SearchableView.Replaceable {
|
|
196
|
-
#searchableView!: UI.SearchableView.SearchableView;
|
|
197
188
|
editorContainer?: TabbedEditorContainer;
|
|
198
189
|
#uiSourceCodes = new Set<Workspace.UISourceCode.UISourceCode>();
|
|
199
|
-
|
|
200
|
-
#
|
|
190
|
+
#scriptViewToolbarItems: LitTemplate = nothing;
|
|
191
|
+
#isSearchReplaceable = false;
|
|
201
192
|
private toolbarChangedListener: Common.EventTarget.EventDescriptor|null;
|
|
202
193
|
private searchView?: UISourceCodeFrame;
|
|
203
194
|
private searchConfig?: UI.SearchableView.SearchConfig;
|
|
@@ -215,7 +206,6 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
215
206
|
#breakpointsActive = true;
|
|
216
207
|
#editorContainerPromise: Promise<TabbedEditorContainer>;
|
|
217
208
|
#editorContainerResolve!: (container: TabbedEditorContainer) => void;
|
|
218
|
-
readonly previouslyViewedFilesSetting: Common.Settings.Setting<SerializedHistoryItem[]>;
|
|
219
209
|
|
|
220
210
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
221
211
|
super(element, {jslog: `${VisualLogging.pane('editor').track({keydown: 'Escape'})}`});
|
|
@@ -227,12 +217,8 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
227
217
|
|
|
228
218
|
const workspace = Workspace.Workspace.WorkspaceImpl.instance();
|
|
229
219
|
|
|
230
|
-
this.historyManager = new EditingLocationHistoryManager(this);
|
|
231
|
-
|
|
232
220
|
this.toolbarChangedListener = null;
|
|
233
221
|
|
|
234
|
-
this.previouslyViewedFilesSetting =
|
|
235
|
-
Common.Settings.Settings.instance().createLocalSetting('previously-viewed-files', []);
|
|
236
222
|
this.requestUpdate();
|
|
237
223
|
|
|
238
224
|
UI.UIUtils.startBatchUpdate();
|
|
@@ -280,7 +266,7 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
280
266
|
const input: ViewInput = {
|
|
281
267
|
searchProvider: this,
|
|
282
268
|
replaceProvider: this,
|
|
283
|
-
|
|
269
|
+
isSearchReplaceable: this.#isSearchReplaceable,
|
|
284
270
|
scriptViewToolbarItems: this.#scriptViewToolbarItems,
|
|
285
271
|
isNavigatorSidebarOpen: this.#isNavigatorSidebarOpen,
|
|
286
272
|
isDebuggerSidebarOpen: this.#isDebuggerSidebarOpen,
|
|
@@ -292,8 +278,6 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
292
278
|
onToggleDebuggerSidebar: this.#onToggleDebuggerSidebar,
|
|
293
279
|
breakpointsActive: this.#breakpointsActive,
|
|
294
280
|
uiSourceCodes: new Set(this.#uiSourceCodes),
|
|
295
|
-
historyManager: this.historyManager,
|
|
296
|
-
previouslyViewedFilesSetting: this.previouslyViewedFilesSetting,
|
|
297
281
|
onEditorSelected: this.editorSelected.bind(this),
|
|
298
282
|
onEditorClosed: this.editorClosed.bind(this),
|
|
299
283
|
};
|
|
@@ -303,17 +287,9 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
303
287
|
set editorContainer(value: TabbedEditorContainer) {
|
|
304
288
|
that.setEditorContainer(value);
|
|
305
289
|
},
|
|
306
|
-
set searchableView(value: UI.SearchableView.SearchableView) {
|
|
307
|
-
that.#searchableView = value;
|
|
308
|
-
},
|
|
309
290
|
};
|
|
310
291
|
|
|
311
|
-
this.#view(input, output, this.
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
override onDetach(): void {
|
|
315
|
-
super.onDetach();
|
|
316
|
-
this.editorContainer?.detachEditors();
|
|
292
|
+
this.#view(input, output, this.contentElement);
|
|
317
293
|
}
|
|
318
294
|
|
|
319
295
|
setEditorContainer(editorContainer: TabbedEditorContainer): void {
|
|
@@ -326,19 +302,6 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
326
302
|
}
|
|
327
303
|
}
|
|
328
304
|
|
|
329
|
-
static defaultUISourceCodeScores(): Map<Workspace.UISourceCode.UISourceCode, number> {
|
|
330
|
-
const defaultScores = new Map<Workspace.UISourceCode.UISourceCode, number>();
|
|
331
|
-
const sourcesView = UI.Context.Context.instance().flavor(SourcesView);
|
|
332
|
-
if (sourcesView) {
|
|
333
|
-
const uiSourceCodes = sourcesView.editorContainer?.historyUISourceCodes() ?? [];
|
|
334
|
-
for (let i = 1; i < uiSourceCodes.length; ++i) // Skip current element
|
|
335
|
-
{
|
|
336
|
-
defaultScores.set(uiSourceCodes[i], uiSourceCodes.length - i);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
return defaultScores;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
305
|
set onToggleNavigatorSidebar(callback: () => void) {
|
|
343
306
|
this.#onToggleNavigatorSidebar = callback;
|
|
344
307
|
this.requestUpdate();
|
|
@@ -398,11 +361,8 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
398
361
|
super.willHide();
|
|
399
362
|
}
|
|
400
363
|
|
|
401
|
-
searchableView(): UI.SearchableView.SearchableView {
|
|
402
|
-
|
|
403
|
-
this.performUpdate();
|
|
404
|
-
}
|
|
405
|
-
return this.#searchableView;
|
|
364
|
+
searchableView(): UI.SearchableView.SearchableView|null {
|
|
365
|
+
return UI.SearchableView.SearchableView.fromElement(this.contentElement.querySelector('devtools-widget'));
|
|
406
366
|
}
|
|
407
367
|
|
|
408
368
|
visibleView(): UI.Widget.Widget|null {
|
|
@@ -431,11 +391,11 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
431
391
|
}
|
|
432
392
|
|
|
433
393
|
onJumpToPreviousLocation(): void {
|
|
434
|
-
this.
|
|
394
|
+
this.editorContainer?.rollback();
|
|
435
395
|
}
|
|
436
396
|
|
|
437
397
|
onJumpToNextLocation(): void {
|
|
438
|
-
this.
|
|
398
|
+
this.editorContainer?.rollover();
|
|
439
399
|
}
|
|
440
400
|
|
|
441
401
|
#onScopeChange(): void {
|
|
@@ -488,9 +448,6 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
488
448
|
|
|
489
449
|
private removeUISourceCodes(uiSourceCodes: Workspace.UISourceCode.UISourceCode[]): void {
|
|
490
450
|
uiSourceCodes.forEach(ui => this.#uiSourceCodes.delete(ui));
|
|
491
|
-
for (let i = 0; i < uiSourceCodes.length; ++i) {
|
|
492
|
-
this.historyManager.removeHistoryForSourceCode(uiSourceCodes[i]);
|
|
493
|
-
}
|
|
494
451
|
this.requestUpdate();
|
|
495
452
|
}
|
|
496
453
|
|
|
@@ -504,11 +461,11 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
504
461
|
const view = this.visibleView();
|
|
505
462
|
if (view instanceof UI.View.SimpleView) {
|
|
506
463
|
void view.toolbarItems().then(items => {
|
|
507
|
-
this.#scriptViewToolbarItems = items;
|
|
464
|
+
this.#scriptViewToolbarItems = Array.isArray(items) ? html`${items.map(item => item.element)}` : items;
|
|
508
465
|
this.requestUpdate();
|
|
509
466
|
});
|
|
510
467
|
} else {
|
|
511
|
-
this.#scriptViewToolbarItems =
|
|
468
|
+
this.#scriptViewToolbarItems = nothing;
|
|
512
469
|
this.requestUpdate();
|
|
513
470
|
}
|
|
514
471
|
}
|
|
@@ -519,20 +476,7 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
519
476
|
if (!this.editorContainer) {
|
|
520
477
|
await this.#editorContainerPromise;
|
|
521
478
|
}
|
|
522
|
-
|
|
523
|
-
if (currentFrame) {
|
|
524
|
-
this.historyManager.updateCurrentState(currentFrame.uiSourceCode(),
|
|
525
|
-
currentFrame.textEditor.state.selection.main.head);
|
|
526
|
-
}
|
|
527
|
-
this.editorContainer?.showFile(uiSourceCode);
|
|
528
|
-
const currentSourceFrame = this.currentSourceFrame();
|
|
529
|
-
if (currentSourceFrame && location) {
|
|
530
|
-
currentSourceFrame.revealPosition(location, !omitHighlight);
|
|
531
|
-
}
|
|
532
|
-
const visibleView = this.visibleView();
|
|
533
|
-
if (!omitFocus && visibleView) {
|
|
534
|
-
visibleView.focus();
|
|
535
|
-
}
|
|
479
|
+
this.editorContainer?.showSourceLocation(uiSourceCode, location, omitFocus, omitHighlight);
|
|
536
480
|
}
|
|
537
481
|
|
|
538
482
|
viewForFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): UI.Widget.Widget|undefined {
|
|
@@ -544,8 +488,6 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
544
488
|
}
|
|
545
489
|
|
|
546
490
|
private editorClosed(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
|
547
|
-
this.historyManager.removeHistoryForSourceCode(uiSourceCode);
|
|
548
|
-
|
|
549
491
|
let wasSelected = false;
|
|
550
492
|
if (!this.editorContainer?.currentFile()) {
|
|
551
493
|
wasSelected = true;
|
|
@@ -554,7 +496,7 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
554
496
|
// SourcesNavigator does not need to update on EditorClosed.
|
|
555
497
|
this.removeToolbarChangedListener();
|
|
556
498
|
this.updateScriptViewToolbarItems();
|
|
557
|
-
this.searchableView()
|
|
499
|
+
this.searchableView()?.resetSearch();
|
|
558
500
|
|
|
559
501
|
const data = {
|
|
560
502
|
uiSourceCode,
|
|
@@ -573,8 +515,9 @@ export class SourcesView extends SourcesViewBase implements UI.SearchableView.Se
|
|
|
573
515
|
currentSourceFrame.setSearchableView(this.searchableView());
|
|
574
516
|
}
|
|
575
517
|
|
|
576
|
-
this
|
|
577
|
-
this.
|
|
518
|
+
this.#isSearchReplaceable = Boolean(currentSourceFrame?.canEditSource());
|
|
519
|
+
this.requestUpdate();
|
|
520
|
+
this.searchableView()?.refreshSearch();
|
|
578
521
|
this.updateToolbarChangedListener();
|
|
579
522
|
this.updateScriptViewToolbarItems();
|
|
580
523
|
|
|
@@ -22,8 +22,7 @@ import * as PanelCommon from '../common/common.js';
|
|
|
22
22
|
import * as Snippets from '../snippets/snippets.js';
|
|
23
23
|
|
|
24
24
|
import * as Components from './components/components.js';
|
|
25
|
-
import
|
|
26
|
-
import {SourcesView} from './SourcesView.js';
|
|
25
|
+
import {EditingLocationHistoryManager} from './EditingLocationHistoryManager.js';
|
|
27
26
|
import {UISourceCodeFrame} from './UISourceCodeFrame.js';
|
|
28
27
|
|
|
29
28
|
const UIStrings = {
|
|
@@ -103,8 +102,8 @@ interface TabInfo {
|
|
|
103
102
|
export interface TabbedEditorViewInput {
|
|
104
103
|
openTabs: TabInfo[];
|
|
105
104
|
activeTabId?: string;
|
|
106
|
-
leftToolbarItems:
|
|
107
|
-
rightToolbarItems:
|
|
105
|
+
leftToolbarItems: LitTemplate[];
|
|
106
|
+
rightToolbarItems: LitTemplate[];
|
|
108
107
|
tabDelegate: UI.TabbedPane.TabbedPaneTabDelegate;
|
|
109
108
|
shortcuts: Array<{
|
|
110
109
|
description: Platform.UIString.LocalizedString,
|
|
@@ -254,17 +253,17 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
254
253
|
@select=${input.onSelect}
|
|
255
254
|
>
|
|
256
255
|
<devtools-toolbar class="tabbed-pane-left-toolbar" slot="left">
|
|
257
|
-
${input.leftToolbarItems
|
|
256
|
+
${input.leftToolbarItems}
|
|
258
257
|
</devtools-toolbar>
|
|
259
258
|
<devtools-toolbar class="tabbed-pane-right-toolbar" slot="right">
|
|
260
|
-
${input.rightToolbarItems
|
|
259
|
+
${input.rightToolbarItems}
|
|
261
260
|
</devtools-toolbar>
|
|
262
261
|
${repeat(input.openTabs, tab => tab.tabId, tab => html`
|
|
263
262
|
<div id=${tab.tabId}
|
|
263
|
+
class="vbox flex-auto"
|
|
264
264
|
title=${tab.title}
|
|
265
265
|
?closeable=${tab.isCloseable}
|
|
266
|
-
?selected=${input.activeTabId === tab.tabId}
|
|
267
|
-
style="display: flex; flex: auto;">
|
|
266
|
+
?selected=${input.activeTabId === tab.tabId}>
|
|
268
267
|
${renderTabIcon(tab)}
|
|
269
268
|
${renderTabSuffix(tab, input)}
|
|
270
269
|
${tab.widget ? html`${widget(UI.Widget.WrapperWidget, {widget: tab.widget})}` : nothing}
|
|
@@ -386,13 +385,10 @@ export class TabbedEditorContainer extends TabbedEditorContainerBase {
|
|
|
386
385
|
};
|
|
387
386
|
this.#view(input, undefined, this.contentElement);
|
|
388
387
|
}
|
|
389
|
-
#historyManager
|
|
390
|
-
set historyManager(historyManager: EditingLocationHistoryManager) {
|
|
391
|
-
this.#historyManager = historyManager;
|
|
392
|
-
}
|
|
388
|
+
#historyManager: EditingLocationHistoryManager;
|
|
393
389
|
|
|
394
|
-
#leftToolbarItems:
|
|
395
|
-
set leftToolbarItems(items:
|
|
390
|
+
#leftToolbarItems: LitTemplate[] = [];
|
|
391
|
+
set leftToolbarItems(items: LitTemplate[]) {
|
|
396
392
|
if (this.#leftToolbarItems === items) {
|
|
397
393
|
return;
|
|
398
394
|
}
|
|
@@ -400,8 +396,8 @@ export class TabbedEditorContainer extends TabbedEditorContainerBase {
|
|
|
400
396
|
this.#scheduleUpdate();
|
|
401
397
|
}
|
|
402
398
|
|
|
403
|
-
#rightToolbarItems:
|
|
404
|
-
set rightToolbarItems(items:
|
|
399
|
+
#rightToolbarItems: LitTemplate[] = [];
|
|
400
|
+
set rightToolbarItems(items: LitTemplate[]) {
|
|
405
401
|
if (this.#rightToolbarItems === items) {
|
|
406
402
|
return;
|
|
407
403
|
}
|
|
@@ -439,8 +435,8 @@ export class TabbedEditorContainer extends TabbedEditorContainerBase {
|
|
|
439
435
|
private tabIds: Map<Workspace.UISourceCode.UISourceCode, string>;
|
|
440
436
|
private files: Map<string, Workspace.UISourceCode.UISourceCode>;
|
|
441
437
|
readonly #loadErrorFiles = new Set<Workspace.UISourceCode.UISourceCode>();
|
|
442
|
-
#previouslyViewedFilesSetting
|
|
443
|
-
history
|
|
438
|
+
#previouslyViewedFilesSetting: Common.Settings.Setting<SerializedHistoryItem[]>;
|
|
439
|
+
history: History;
|
|
444
440
|
set previouslyViewedFilesSetting(setting: Common.Settings.Setting<SerializedHistoryItem[]>) {
|
|
445
441
|
if (this.#previouslyViewedFilesSetting === setting) {
|
|
446
442
|
return;
|
|
@@ -461,6 +457,10 @@ export class TabbedEditorContainer extends TabbedEditorContainerBase {
|
|
|
461
457
|
super(element);
|
|
462
458
|
this.#view = view;
|
|
463
459
|
this.#tabDelegate = new EditorContainerTabDelegate(this);
|
|
460
|
+
this.#historyManager = new EditingLocationHistoryManager(this);
|
|
461
|
+
this.#previouslyViewedFilesSetting =
|
|
462
|
+
Common.Settings.Settings.instance().createLocalSetting('previously-viewed-files', []);
|
|
463
|
+
this.history = History.fromObject(this.#previouslyViewedFilesSetting.get());
|
|
464
464
|
|
|
465
465
|
this.tabIds = new Map();
|
|
466
466
|
this.files = new Map();
|
|
@@ -478,6 +478,33 @@ export class TabbedEditorContainer extends TabbedEditorContainerBase {
|
|
|
478
478
|
Persistence.NetworkPersistenceManager.Events.REQUEST_FOR_HEADER_OVERRIDES_FILE_CHANGED,
|
|
479
479
|
this.#onRequestsForHeaderOverridesFileChanged, this);
|
|
480
480
|
}
|
|
481
|
+
|
|
482
|
+
override wasShown(): void {
|
|
483
|
+
super.wasShown();
|
|
484
|
+
UI.Context.Context.instance().setFlavor(TabbedEditorContainer, this);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
override willHide(): void {
|
|
488
|
+
UI.Context.Context.instance().setFlavor(TabbedEditorContainer, null);
|
|
489
|
+
super.willHide();
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
override onDetach(): void {
|
|
493
|
+
super.onDetach();
|
|
494
|
+
this.detachEditors();
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
static defaultUISourceCodeScores(): Map<Workspace.UISourceCode.UISourceCode, number> {
|
|
498
|
+
const defaultScores = new Map<Workspace.UISourceCode.UISourceCode, number>();
|
|
499
|
+
const editorContainer = UI.Context.Context.instance().flavor(TabbedEditorContainer);
|
|
500
|
+
if (editorContainer) {
|
|
501
|
+
const uiSourceCodes = editorContainer.historyUISourceCodes();
|
|
502
|
+
for (let i = 1; i < uiSourceCodes.length; ++i) { // Skip current element
|
|
503
|
+
defaultScores.set(uiSourceCodes[i], uiSourceCodes.length - i);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
return defaultScores;
|
|
507
|
+
}
|
|
481
508
|
#tabsHistory: string[] = [];
|
|
482
509
|
#appendHistory(tabId: string): void {
|
|
483
510
|
this.#tabsHistory.unshift(tabId);
|
|
@@ -556,16 +583,41 @@ export class TabbedEditorContainer extends TabbedEditorContainerBase {
|
|
|
556
583
|
return Array.from(this.files.values()).map(getViewByUISourceCode).filter(Boolean) as UI.Widget.Widget[];
|
|
557
584
|
}
|
|
558
585
|
|
|
586
|
+
showSourceLocation(uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
587
|
+
location?: SourceFrame.SourceFrame.RevealPosition, omitFocus?: boolean,
|
|
588
|
+
omitHighlight?: boolean): void {
|
|
589
|
+
const currentFrame = this.currentView instanceof UISourceCodeFrame ? this.currentView : null;
|
|
590
|
+
if (currentFrame) {
|
|
591
|
+
this.#historyManager.updateCurrentState(currentFrame.uiSourceCode(),
|
|
592
|
+
currentFrame.textEditor.state.selection.main.head);
|
|
593
|
+
}
|
|
594
|
+
this.showFile(uiSourceCode);
|
|
595
|
+
const currentSourceFrame = this.currentView instanceof UISourceCodeFrame ? this.currentView : null;
|
|
596
|
+
if (currentSourceFrame && location) {
|
|
597
|
+
currentSourceFrame.revealPosition(location, !omitHighlight);
|
|
598
|
+
}
|
|
599
|
+
if (!omitFocus && this.visibleView) {
|
|
600
|
+
this.visibleView.focus();
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
rollback(): void {
|
|
605
|
+
this.#historyManager.rollback();
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
rollover(): void {
|
|
609
|
+
this.#historyManager.rollover();
|
|
610
|
+
}
|
|
611
|
+
|
|
559
612
|
showFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
|
560
613
|
const binding = Persistence.Persistence.PersistenceImpl.instance().binding(uiSourceCode);
|
|
561
614
|
uiSourceCode = binding ? binding.fileSystem : uiSourceCode;
|
|
562
615
|
|
|
563
|
-
const frame = UI.Context.Context.instance().flavor(SourcesView);
|
|
564
616
|
// If the content has already been set and the current frame is showing
|
|
565
617
|
// the incoming uiSourceCode, then fire the event that the file has been loaded.
|
|
566
618
|
// Otherwise, this event will fire as soon as the content has been set.
|
|
567
|
-
if (
|
|
568
|
-
|
|
619
|
+
if (this.currentView instanceof UISourceCodeFrame && this.currentView.contentSet &&
|
|
620
|
+
this.#currentFile === uiSourceCode) {
|
|
569
621
|
window.dispatchEvent(new CustomEvent('source-file-loaded',
|
|
570
622
|
{bubbles: true, cancelable: true, detail: uiSourceCode.displayName(true)}));
|
|
571
623
|
} else {
|
|
@@ -872,6 +924,7 @@ export class TabbedEditorContainer extends TabbedEditorContainerBase {
|
|
|
872
924
|
removeUISourceCodes(uiSourceCodes: Workspace.UISourceCode.UISourceCode[]): void {
|
|
873
925
|
const tabIds = [];
|
|
874
926
|
for (const uiSourceCode of uiSourceCodes) {
|
|
927
|
+
this.#historyManager.removeHistoryForSourceCode(uiSourceCode);
|
|
875
928
|
const tabId = this.tabIds.get(uiSourceCode);
|
|
876
929
|
if (tabId) {
|
|
877
930
|
tabIds.push(tabId);
|
|
@@ -995,6 +1048,7 @@ export class TabbedEditorContainer extends TabbedEditorContainerBase {
|
|
|
995
1048
|
this.files.delete(tabId);
|
|
996
1049
|
|
|
997
1050
|
if (uiSourceCode) {
|
|
1051
|
+
this.#historyManager.removeHistoryForSourceCode(uiSourceCode);
|
|
998
1052
|
this.removeUISourceCodeListeners(uiSourceCode);
|
|
999
1053
|
this.removeSourceFrame(uiSourceCode);
|
|
1000
1054
|
|