chrome-devtools-frontend 1.0.1661063 → 1.0.1662289
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/.agents/skills/evaluate-ai-css-completion/SKILL.md +19 -9
- package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +44 -16
- package/.agents/skills/migrate-chromium-test/SKILL.md +7 -2
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +7 -1
- package/docs/ui_engineering.md +75 -42
- package/front_end/core/common/SettingRegistration.ts +0 -5
- package/front_end/core/platform/ArrayUtilities.ts +10 -0
- package/front_end/foundation/README.md +86 -0
- package/front_end/generated/InspectorBackendCommands.ts +4 -5
- package/front_end/generated/protocol.ts +20 -38
- package/front_end/models/bindings/CompilerScriptMapping.ts +5 -4
- package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -3
- package/front_end/models/bindings/DefaultScriptMapping.ts +3 -3
- package/front_end/models/bindings/NetworkProject.ts +10 -1
- package/front_end/models/bindings/ResourceMapping.ts +4 -3
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +4 -3
- package/front_end/models/bindings/StylesSourceMapping.ts +3 -3
- package/front_end/models/extensions/RecorderExtensionEndpoint.ts +7 -5
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +14 -5
- package/front_end/models/issues_manager/CheckFormsIssuesTrigger.ts +8 -9
- package/front_end/models/issues_manager/RelatedIssue.ts +10 -8
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/logs/RequestResolver.ts +2 -2
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +0 -5
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +1 -1
- package/front_end/models/trace/handlers/FramesHandler.ts +4 -7
- package/front_end/models/trace/handlers/ModelHandlers.ts +0 -1
- package/front_end/models/trace/handlers/RendererHandler.ts +2 -15
- package/front_end/models/trace/handlers/Threads.ts +4 -11
- package/front_end/models/trace/insights/DOMSize.ts +1 -1
- package/front_end/models/workspace/WorkspaceImpl.ts +1 -10
- package/front_end/panels/application/ApplicationPanelSidebar.ts +0 -44
- package/front_end/panels/application/CookieItemsView.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +494 -411
- package/front_end/panels/application/application.ts +0 -6
- package/front_end/panels/application/components/components.ts +0 -2
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +1 -1
- package/front_end/panels/application/serviceWorkersView.css +40 -4
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +147 -123
- package/front_end/panels/common/ExtensionServer.ts +3 -3
- package/front_end/panels/console/ConsoleView.ts +1 -1
- package/front_end/panels/emulation/DeviceModeView.ts +139 -70
- package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +53 -12
- package/front_end/panels/network/RequestPayloadView.ts +77 -39
- package/front_end/panels/network/components/ResponseHeaderSection.ts +5 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +2 -2
- package/front_end/panels/recorder/RecorderController.ts +213 -49
- package/front_end/panels/recorder/RecorderPanel.ts +1 -1
- package/front_end/panels/sources/SourcesNavigator.ts +3 -2
- package/front_end/panels/sources/SourcesView.ts +0 -17
- package/front_end/panels/sources/UISourceCodeFrame.ts +42 -0
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +0 -17
- package/front_end/panels/timeline/ThreadAppender.ts +0 -106
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/report_view/ReportView.ts +11 -5
- package/front_end/ui/components/report_view/report.css +4 -1
- package/front_end/ui/legacy/TextPrompt.ts +49 -1
- package/front_end/ui/legacy/UIUtils.ts +11 -1
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -2
- package/front_end/ui/legacy/textPrompt.css +10 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
- package/front_end/panels/application/InterestGroupStorageModel.ts +0 -81
- package/front_end/panels/application/InterestGroupStorageView.ts +0 -151
- package/front_end/panels/application/InterestGroupTreeElement.ts +0 -65
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +0 -135
- package/front_end/panels/application/components/interestGroupAccessGrid.css +0 -27
- package/front_end/panels/application/interestGroupStorageView.css +0 -9
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +0 -149
|
@@ -6,7 +6,6 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import * as Root from '../../core/root/root.js';
|
|
9
|
-
import type * as SDK from '../../core/sdk/sdk.js';
|
|
10
9
|
import type {ContentDataOrError} from '../text_utils/ContentData.js';
|
|
11
10
|
import type {SearchMatch} from '../text_utils/ContentProvider.js';
|
|
12
11
|
import * as Workspace from '../workspace/workspace.js';
|
|
@@ -169,10 +168,6 @@ export class FileSystem implements Workspace.Workspace.Project {
|
|
|
169
168
|
uiSourceCodes(): Iterable<Workspace.UISourceCode.UISourceCode> {
|
|
170
169
|
return [];
|
|
171
170
|
}
|
|
172
|
-
|
|
173
|
-
target(): SDK.Target.Target|null {
|
|
174
|
-
return null;
|
|
175
|
-
}
|
|
176
171
|
}
|
|
177
172
|
|
|
178
173
|
/**
|
|
@@ -226,7 +226,7 @@ export async function getFunctionCodeFromLocation(
|
|
|
226
226
|
const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();
|
|
227
227
|
const projects = debuggerWorkspaceBinding.workspace.projectsForType(Workspace.Workspace.projectTypes.Network);
|
|
228
228
|
for (const project of projects) {
|
|
229
|
-
if (
|
|
229
|
+
if (Bindings.NetworkProject.NetworkProject.getTargetForProject(project) !== target) {
|
|
230
230
|
continue;
|
|
231
231
|
}
|
|
232
232
|
uiSourceCode = project.uiSourceCodeForURL(url);
|
|
@@ -6,7 +6,6 @@ import * as Platform from '../../../core/platform/platform.js';
|
|
|
6
6
|
import * as Helpers from '../helpers/helpers.js';
|
|
7
7
|
import * as Types from '../types/types.js';
|
|
8
8
|
|
|
9
|
-
import {type AuctionWorkletsData, data as auctionWorkletsData} from './AuctionWorkletsHandler.js';
|
|
10
9
|
import {data as layerTreeHandlerData, type LayerTreeData} from './LayerTreeHandler.js';
|
|
11
10
|
import {data as metaHandlerData, type MetaHandlerData} from './MetaHandler.js';
|
|
12
11
|
import {data as rendererHandlerData, type RendererHandlerData} from './RendererHandler.js';
|
|
@@ -81,7 +80,6 @@ export async function finalize(): Promise<void> {
|
|
|
81
80
|
const modelForTrace = new TimelineFrameModel(
|
|
82
81
|
relevantFrameEvents,
|
|
83
82
|
rendererHandlerData(),
|
|
84
|
-
auctionWorkletsData(),
|
|
85
83
|
metaHandlerData(),
|
|
86
84
|
layerTreeHandlerData(),
|
|
87
85
|
);
|
|
@@ -101,7 +99,7 @@ export function data(): FramesData {
|
|
|
101
99
|
}
|
|
102
100
|
|
|
103
101
|
export function deps(): HandlerName[] {
|
|
104
|
-
return ['Meta', 'Renderer', '
|
|
102
|
+
return ['Meta', 'Renderer', 'LayerTree'];
|
|
105
103
|
}
|
|
106
104
|
|
|
107
105
|
export class TimelineFrameModel {
|
|
@@ -122,13 +120,12 @@ export class TimelineFrameModel {
|
|
|
122
120
|
#activeThreadId: Types.Events.ThreadID|null = null;
|
|
123
121
|
#layerTreeData: LayerTreeData;
|
|
124
122
|
|
|
125
|
-
constructor(
|
|
126
|
-
|
|
127
|
-
auctionWorkletsData: AuctionWorkletsData, metaData: MetaHandlerData, layerTreeData: LayerTreeData) {
|
|
123
|
+
constructor(allEvents: readonly Types.Events.Event[], rendererData: RendererHandlerData, metaData: MetaHandlerData,
|
|
124
|
+
layerTreeData: LayerTreeData) {
|
|
128
125
|
// We only care about getting threads from the Renderer, not Samples,
|
|
129
126
|
// because Frames don't exist in a CPU Profile (which won't have Renderer
|
|
130
127
|
// threads.)
|
|
131
|
-
const mainThreads = Threads.threadsInRenderer(rendererData
|
|
128
|
+
const mainThreads = Threads.threadsInRenderer(rendererData).filter(thread => {
|
|
132
129
|
return thread.type === Threads.ThreadType.MAIN_THREAD && thread.processIsOnMainFrame;
|
|
133
130
|
});
|
|
134
131
|
const threadData = mainThreads.map(thread => {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
export * as AnimationFrames from './AnimationFramesHandler.js';
|
|
6
6
|
export * as Animations from './AnimationHandler.js';
|
|
7
7
|
export * as AsyncJSCalls from './AsyncJSCallsHandler.js';
|
|
8
|
-
export * as AuctionWorklets from './AuctionWorkletsHandler.js';
|
|
9
8
|
export * as DOMStats from './DOMStatsHandler.js';
|
|
10
9
|
export * as ExtensionTraceData from './ExtensionTraceDataHandler.js';
|
|
11
10
|
export * as Flows from './FlowsHandler.js';
|
|
@@ -6,7 +6,6 @@ import * as Platform from '../../../core/platform/platform.js';
|
|
|
6
6
|
import * as Helpers from '../helpers/helpers.js';
|
|
7
7
|
import * as Types from '../types/types.js';
|
|
8
8
|
|
|
9
|
-
import {data as auctionWorkletsData} from './AuctionWorkletsHandler.js';
|
|
10
9
|
import * as HandlerHelpers from './helpers.js';
|
|
11
10
|
import {data as metaHandlerData, type FrameProcessData} from './MetaHandler.js';
|
|
12
11
|
import {data as networkRequestHandlerData} from './NetworkRequestsHandler.js';
|
|
@@ -248,7 +247,6 @@ export function assignThreadName(
|
|
|
248
247
|
* - Deletes processes with an unknown origin.
|
|
249
248
|
*/
|
|
250
249
|
export function sanitizeProcesses(processes: Map<Types.Events.ProcessID, RendererProcess>): void {
|
|
251
|
-
const auctionWorklets = auctionWorkletsData().worklets;
|
|
252
250
|
const metaData = metaHandlerData();
|
|
253
251
|
if (metaData.traceIsGeneric) {
|
|
254
252
|
return;
|
|
@@ -258,19 +256,8 @@ export function sanitizeProcesses(processes: Map<Types.Events.ProcessID, Rendere
|
|
|
258
256
|
// parsed for some reason, or if it's an "about:" origin, delete it.
|
|
259
257
|
// This is done because we don't really care about processes for which we
|
|
260
258
|
// can't provide actionable insights to the user (e.g. about:blank pages).
|
|
261
|
-
//
|
|
262
|
-
// There is one exception; AuctionWorklet processes get parsed in a
|
|
263
|
-
// separate handler, so at this point we check to see if the process has
|
|
264
|
-
// been found by the AuctionWorkletsHandler, and if so we update the URL.
|
|
265
|
-
// This ensures that we keep this process around and do not drop it due to
|
|
266
|
-
// the lack of a URL.
|
|
267
259
|
if (process.url === null) {
|
|
268
|
-
|
|
269
|
-
if (maybeWorklet) {
|
|
270
|
-
process.url = maybeWorklet.host;
|
|
271
|
-
} else {
|
|
272
|
-
processes.delete(pid);
|
|
273
|
-
}
|
|
260
|
+
processes.delete(pid);
|
|
274
261
|
continue;
|
|
275
262
|
}
|
|
276
263
|
}
|
|
@@ -392,7 +379,7 @@ export function makeCompleteEvent(event: Types.Events.Begin|Types.Events.End): T
|
|
|
392
379
|
}
|
|
393
380
|
|
|
394
381
|
export function deps(): HandlerName[] {
|
|
395
|
-
return ['Meta', 'Samples', '
|
|
382
|
+
return ['Meta', 'Samples', 'NetworkRequests'];
|
|
396
383
|
}
|
|
397
384
|
|
|
398
385
|
export interface RendererHandlerData {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import type * as Helpers from '../helpers/helpers.js';
|
|
6
6
|
import type * as Types from '../types/types.js';
|
|
7
7
|
|
|
8
|
-
import type {AuctionWorkletsData} from './AuctionWorkletsHandler.js';
|
|
9
8
|
import type * as Renderer from './RendererHandler.js';
|
|
10
9
|
import type {HandlerData} from './types.js';
|
|
11
10
|
|
|
@@ -24,15 +23,12 @@ export const enum ThreadType {
|
|
|
24
23
|
MAIN_THREAD = 'MAIN_THREAD',
|
|
25
24
|
WORKER = 'WORKER',
|
|
26
25
|
RASTERIZER = 'RASTERIZER',
|
|
27
|
-
AUCTION_WORKLET = 'AUCTION_WORKLET',
|
|
28
26
|
OTHER = 'OTHER',
|
|
29
27
|
CPU_PROFILE = 'CPU_PROFILE',
|
|
30
28
|
THREAD_POOL = 'THREAD_POOL',
|
|
31
29
|
}
|
|
32
30
|
|
|
33
|
-
function getThreadTypeForRendererThread(
|
|
34
|
-
pid: Types.Events.ProcessID, thread: Renderer.RendererThread,
|
|
35
|
-
auctionWorkletsData: AuctionWorkletsData): ThreadType {
|
|
31
|
+
function getThreadTypeForRendererThread(pid: Types.Events.ProcessID, thread: Renderer.RendererThread): ThreadType {
|
|
36
32
|
let threadType = ThreadType.OTHER;
|
|
37
33
|
if (thread.name === 'CrRendererMain') {
|
|
38
34
|
threadType = ThreadType.MAIN_THREAD;
|
|
@@ -40,8 +36,6 @@ function getThreadTypeForRendererThread(
|
|
|
40
36
|
threadType = ThreadType.WORKER;
|
|
41
37
|
} else if (thread.name?.startsWith('CompositorTileWorker')) {
|
|
42
38
|
threadType = ThreadType.RASTERIZER;
|
|
43
|
-
} else if (auctionWorkletsData.worklets.has(pid)) {
|
|
44
|
-
threadType = ThreadType.AUCTION_WORKLET;
|
|
45
39
|
} else if (thread.name?.startsWith('ThreadPool')) {
|
|
46
40
|
// TODO(paulirish): perhaps exclude ThreadPoolServiceThread entirely
|
|
47
41
|
threadType = ThreadType.THREAD_POOL;
|
|
@@ -49,8 +43,7 @@ function getThreadTypeForRendererThread(
|
|
|
49
43
|
return threadType;
|
|
50
44
|
}
|
|
51
45
|
|
|
52
|
-
export function threadsInRenderer(
|
|
53
|
-
rendererData: Renderer.RendererHandlerData, auctionWorkletsData: AuctionWorkletsData): readonly ThreadData[] {
|
|
46
|
+
export function threadsInRenderer(rendererData: Renderer.RendererHandlerData): readonly ThreadData[] {
|
|
54
47
|
const foundThreads: ThreadData[] = [];
|
|
55
48
|
// If we have Renderer threads, we prefer to use those. In the event that a
|
|
56
49
|
// trace is a CPU Profile trace, we will never have Renderer threads, so we
|
|
@@ -65,7 +58,7 @@ export function threadsInRenderer(
|
|
|
65
58
|
// filtering we need.
|
|
66
59
|
continue;
|
|
67
60
|
}
|
|
68
|
-
const threadType = getThreadTypeForRendererThread(pid, thread
|
|
61
|
+
const threadType = getThreadTypeForRendererThread(pid, thread);
|
|
69
62
|
foundThreads.push({
|
|
70
63
|
name: thread.name,
|
|
71
64
|
pid,
|
|
@@ -99,7 +92,7 @@ export function threadsInTrace(handlerData: HandlerData): readonly ThreadData[]
|
|
|
99
92
|
}
|
|
100
93
|
|
|
101
94
|
// If we have Renderer threads, we prefer to use those.
|
|
102
|
-
const threadsFromRenderer = threadsInRenderer(handlerData.Renderer
|
|
95
|
+
const threadsFromRenderer = threadsInRenderer(handlerData.Renderer);
|
|
103
96
|
if (threadsFromRenderer.length) {
|
|
104
97
|
threadsInHandlerDataCache.set(handlerData, threadsFromRenderer);
|
|
105
98
|
return threadsFromRenderer;
|
|
@@ -117,7 +117,7 @@ export function generateInsight(data: Handlers.Types.HandlerData, context: Insig
|
|
|
117
117
|
const largeLayoutUpdates: Types.Events.Layout[] = [];
|
|
118
118
|
const largeStyleRecalcs: Types.Events.RecalcStyle[] = [];
|
|
119
119
|
|
|
120
|
-
const threads = Handlers.Threads.threadsInRenderer(data.Renderer
|
|
120
|
+
const threads = Handlers.Threads.threadsInRenderer(data.Renderer);
|
|
121
121
|
for (const thread of threads) {
|
|
122
122
|
if (thread.type !== Handlers.Threads.ThreadType.MAIN_THREAD) {
|
|
123
123
|
continue;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as Root from '../../core/root/root.js';
|
|
8
|
-
import type * as SDK from '../../core/sdk/sdk.js';
|
|
9
8
|
import type * as TextUtils from '../text_utils/text_utils.js';
|
|
10
9
|
|
|
11
10
|
import type {SearchConfig} from './SearchConfig.js';
|
|
@@ -55,7 +54,6 @@ export interface Project {
|
|
|
55
54
|
* @returns an iterator for the sources provided by this project.
|
|
56
55
|
*/
|
|
57
56
|
uiSourceCodes(): Iterable<UISourceCode>;
|
|
58
|
-
target(): SDK.Target.Target|null;
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
/* eslint-disable @typescript-eslint/naming-convention -- Used by web_tests. */
|
|
@@ -76,15 +74,12 @@ export abstract class ProjectStore implements Project {
|
|
|
76
74
|
readonly #type: projectTypes;
|
|
77
75
|
readonly #displayName: string;
|
|
78
76
|
readonly #uiSourceCodes = new Map<Platform.DevToolsPath.UrlString, UISourceCode>();
|
|
79
|
-
readonly #target: SDK.Target.Target|null = null;
|
|
80
77
|
|
|
81
|
-
constructor(workspace: WorkspaceImpl, id: string, type: projectTypes, displayName: string
|
|
82
|
-
target: SDK.Target.Target|null = null) {
|
|
78
|
+
constructor(workspace: WorkspaceImpl, id: string, type: projectTypes, displayName: string) {
|
|
83
79
|
this.#workspace = workspace;
|
|
84
80
|
this.#id = id;
|
|
85
81
|
this.#type = type;
|
|
86
82
|
this.#displayName = displayName;
|
|
87
|
-
this.#target = target;
|
|
88
83
|
}
|
|
89
84
|
|
|
90
85
|
id(): string {
|
|
@@ -140,10 +135,6 @@ export abstract class ProjectStore implements Project {
|
|
|
140
135
|
return this.#uiSourceCodes.values();
|
|
141
136
|
}
|
|
142
137
|
|
|
143
|
-
target(): SDK.Target.Target|null {
|
|
144
|
-
return this.#target;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
138
|
renameUISourceCode(uiSourceCode: UISourceCode, newName: string): void {
|
|
148
139
|
const oldPath = uiSourceCode.url();
|
|
149
140
|
const newPath = uiSourceCode.parentURL() ?
|
|
@@ -70,8 +70,6 @@ import {
|
|
|
70
70
|
type ObjectStore,
|
|
71
71
|
} from './IndexedDBModel.js';
|
|
72
72
|
import {IDBDatabaseView, IDBDataView} from './IndexedDBViews.js';
|
|
73
|
-
import {Events as InterestGroupModelEvents, InterestGroupStorageModel} from './InterestGroupStorageModel.js';
|
|
74
|
-
import {InterestGroupTreeElement} from './InterestGroupTreeElement.js';
|
|
75
73
|
import {OpenedWindowDetailsView, WorkerDetailsView} from './OpenedWindowDetailsView.js';
|
|
76
74
|
import type * as PreloadingHelper from './preloading/helper/helper.js';
|
|
77
75
|
import {
|
|
@@ -347,7 +345,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
347
345
|
sessionStorageListTreeElement: ExpandableApplicationPanelTreeElement;
|
|
348
346
|
extensionStorageListTreeElement: ExpandableApplicationPanelTreeElement;
|
|
349
347
|
indexedDBListTreeElement: IndexedDBTreeElement;
|
|
350
|
-
interestGroupTreeElement: InterestGroupTreeElement;
|
|
351
348
|
cookieListTreeElement: ExpandableApplicationPanelTreeElement;
|
|
352
349
|
trustTokensTreeElement: TrustTokensTreeElement;
|
|
353
350
|
cacheStorageListTreeElement: ServiceWorkerCacheTreeElement;
|
|
@@ -484,9 +481,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
484
481
|
this.trustTokensTreeElement = new TrustTokensTreeElement(panel);
|
|
485
482
|
storageTreeElement.appendChild(this.trustTokensTreeElement);
|
|
486
483
|
|
|
487
|
-
this.interestGroupTreeElement = new InterestGroupTreeElement(panel);
|
|
488
|
-
storageTreeElement.appendChild(this.interestGroupTreeElement);
|
|
489
|
-
|
|
490
484
|
this.sharedStorageListTreeElement = new SharedStorageListTreeElement(panel);
|
|
491
485
|
storageTreeElement.appendChild(this.sharedStorageListTreeElement);
|
|
492
486
|
|
|
@@ -582,12 +576,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
582
576
|
modelRemoved: (model: IndexedDBModel) => this.indexedDBModelRemoved(model),
|
|
583
577
|
},
|
|
584
578
|
{scoped: true});
|
|
585
|
-
SDK.TargetManager.TargetManager.instance().observeModels(
|
|
586
|
-
InterestGroupStorageModel, {
|
|
587
|
-
modelAdded: (model: InterestGroupStorageModel) => this.interestGroupModelAdded(model),
|
|
588
|
-
modelRemoved: (model: InterestGroupStorageModel) => this.interestGroupModelRemoved(model),
|
|
589
|
-
},
|
|
590
|
-
{scoped: true});
|
|
591
579
|
SDK.TargetManager.TargetManager.instance().observeModels(
|
|
592
580
|
SharedStorageModel, {
|
|
593
581
|
modelAdded: (model: SharedStorageModel) => this.sharedStorageModelAdded(model).catch(err => {
|
|
@@ -627,12 +615,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
627
615
|
|
|
628
616
|
this.target = target;
|
|
629
617
|
|
|
630
|
-
const interestGroupModel = target.model(InterestGroupStorageModel);
|
|
631
|
-
if (interestGroupModel) {
|
|
632
|
-
interestGroupModel.addEventListener(
|
|
633
|
-
InterestGroupModelEvents.INTEREST_GROUP_ACCESS, this.interestGroupAccess, this);
|
|
634
|
-
}
|
|
635
|
-
|
|
636
618
|
const resourceTreeModel = target.model(SDK.ResourceTreeModel.ResourceTreeModel);
|
|
637
619
|
if (!resourceTreeModel) {
|
|
638
620
|
return;
|
|
@@ -660,12 +642,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
660
642
|
SDK.ResourceTreeModel.Events.WillLoadCachedResources, this.resetWithFrames, this);
|
|
661
643
|
}
|
|
662
644
|
|
|
663
|
-
const interestGroupModel = target.model(InterestGroupStorageModel);
|
|
664
|
-
if (interestGroupModel) {
|
|
665
|
-
interestGroupModel.removeEventListener(
|
|
666
|
-
InterestGroupModelEvents.INTEREST_GROUP_ACCESS, this.interestGroupAccess, this);
|
|
667
|
-
}
|
|
668
|
-
|
|
669
645
|
this.resetWithFrames();
|
|
670
646
|
}
|
|
671
647
|
|
|
@@ -678,10 +654,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
678
654
|
SDK.TargetManager.TargetManager.instance())) {
|
|
679
655
|
this.addCookieDocument(frame);
|
|
680
656
|
}
|
|
681
|
-
const interestGroupModel = this.target?.model(InterestGroupStorageModel);
|
|
682
|
-
if (interestGroupModel) {
|
|
683
|
-
interestGroupModel.enable();
|
|
684
|
-
}
|
|
685
657
|
|
|
686
658
|
this.cacheStorageListTreeElement.initialize();
|
|
687
659
|
const backgroundServiceModel = this.target?.model(BackgroundServiceModel) || null;
|
|
@@ -738,16 +710,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
738
710
|
this.indexedDBListTreeElement.removeIndexedDBForModel(model);
|
|
739
711
|
}
|
|
740
712
|
|
|
741
|
-
private interestGroupModelAdded(model: InterestGroupStorageModel): void {
|
|
742
|
-
model.enable();
|
|
743
|
-
model.addEventListener(InterestGroupModelEvents.INTEREST_GROUP_ACCESS, this.interestGroupAccess, this);
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
private interestGroupModelRemoved(model: InterestGroupStorageModel): void {
|
|
747
|
-
model.disable();
|
|
748
|
-
model.removeEventListener(InterestGroupModelEvents.INTEREST_GROUP_ACCESS, this.interestGroupAccess, this);
|
|
749
|
-
}
|
|
750
|
-
|
|
751
713
|
private async sharedStorageModelAdded(model: SharedStorageModel): Promise<void> {
|
|
752
714
|
await model.enable();
|
|
753
715
|
for (const storage of model.storages()) {
|
|
@@ -817,7 +779,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
817
779
|
private reset(): void {
|
|
818
780
|
this.domains = {};
|
|
819
781
|
this.cookieListTreeElement.removeChildren();
|
|
820
|
-
this.interestGroupTreeElement.clearEvents();
|
|
821
782
|
this.deviceBoundSessionsModel?.clearVisibleSites();
|
|
822
783
|
this.deviceBoundSessionsModel?.clearEvents();
|
|
823
784
|
}
|
|
@@ -831,11 +792,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
831
792
|
this.addCookieDocument(frame);
|
|
832
793
|
}
|
|
833
794
|
|
|
834
|
-
private interestGroupAccess(event: Common.EventTarget.EventTargetEvent<Protocol.Storage.InterestGroupAccessedEvent>):
|
|
835
|
-
void {
|
|
836
|
-
this.interestGroupTreeElement.addEvent(event.data);
|
|
837
|
-
}
|
|
838
|
-
|
|
839
795
|
private addCookieDocument(frame: SDK.ResourceTreeModel.ResourceTreeFrame): void {
|
|
840
796
|
// In case the current frame was unreachable, show its cookies
|
|
841
797
|
// instead of the error interstitials because they might help to
|
|
@@ -402,7 +402,7 @@ export class CookieItemsView extends UI.Widget.VBox {
|
|
|
402
402
|
return true;
|
|
403
403
|
}
|
|
404
404
|
if (object instanceof SDK.Cookie.Cookie) {
|
|
405
|
-
return IssuesManager.RelatedIssue.hasIssues(object);
|
|
405
|
+
return IssuesManager.RelatedIssue.hasIssues(object, IssuesManager.IssuesManager.IssuesManager.instance());
|
|
406
406
|
}
|
|
407
407
|
return false;
|
|
408
408
|
};
|
|
@@ -932,7 +932,7 @@ export class FrameDetailsReportView extends UI.Widget.Widget {
|
|
|
932
932
|
|
|
933
933
|
#uiSourceCodeForFrame(frame: SDK.ResourceTreeModel.ResourceTreeFrame): Workspace.UISourceCode.UISourceCode|null {
|
|
934
934
|
for (const project of Workspace.Workspace.WorkspaceImpl.instance().projects()) {
|
|
935
|
-
const projectTarget =
|
|
935
|
+
const projectTarget = Bindings.NetworkProject.NetworkProject.getTargetForProject(project);
|
|
936
936
|
if (projectTarget && projectTarget === frame.resourceTreeModel().target()) {
|
|
937
937
|
const uiSourceCode = project.uiSourceCodeForURL(frame.url);
|
|
938
938
|
if (uiSourceCode) {
|