chrome-devtools-frontend 1.0.1016075 → 1.0.1017408
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/gni/devtools_grd_files.gni +2 -0
- package/front_end/core/i18n/locales/en-US.json +3 -6
- package/front_end/core/i18n/locales/en-XL.json +3 -6
- package/front_end/core/sdk/DOMModel.ts +11 -0
- package/front_end/core/sdk/ResourceTreeModel.ts +59 -0
- package/front_end/core/sdk/Script.ts +1 -1
- package/front_end/core/sdk/SecurityOriginManager.ts +1 -1
- package/front_end/core/sdk/StorageKeyManager.ts +71 -0
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +4 -2
- package/front_end/models/timeline_model/TimelineModel.ts +8 -6
- package/front_end/panels/application/ApplicationPanelSidebar.ts +5 -1
- package/front_end/panels/application/DOMStorageModel.ts +138 -10
- package/front_end/panels/application/StorageView.ts +64 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +25 -37
- package/front_end/panels/elements/ElementsTreeOutline.ts +44 -8
- package/front_end/panels/elements/TopLayerContainer.ts +97 -0
- package/front_end/panels/elements/components/AdornerManager.ts +7 -0
- package/front_end/panels/elements/elements.ts +4 -0
- package/front_end/panels/lighthouse/LighthousePanel.ts +37 -9
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +5 -6
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +5 -3
- package/package.json +1 -1
@@ -654,6 +654,7 @@ grd_files_debug_sources = [
|
|
654
654
|
"front_end/core/sdk/ServiceWorkerManager.js",
|
655
655
|
"front_end/core/sdk/SourceMap.js",
|
656
656
|
"front_end/core/sdk/SourceMapManager.js",
|
657
|
+
"front_end/core/sdk/StorageKeyManager.js",
|
657
658
|
"front_end/core/sdk/Target.js",
|
658
659
|
"front_end/core/sdk/TargetManager.js",
|
659
660
|
"front_end/core/sdk/TracingManager.js",
|
@@ -961,6 +962,7 @@ grd_files_debug_sources = [
|
|
961
962
|
"front_end/panels/elements/StylePropertyTreeElement.js",
|
962
963
|
"front_end/panels/elements/StylePropertyUtils.js",
|
963
964
|
"front_end/panels/elements/StylesSidebarPane.js",
|
965
|
+
"front_end/panels/elements/TopLayerContainer.js",
|
964
966
|
"front_end/panels/elements/classesPaneWidget.css.js",
|
965
967
|
"front_end/panels/elements/components/AccessibilityTreeNode.js",
|
966
968
|
"front_end/panels/elements/components/AdornerManager.js",
|
@@ -4892,12 +4892,6 @@
|
|
4892
4892
|
"panels/elements/ElementsTreeElement.ts | enableScrollSnap": {
|
4893
4893
|
"message": "Enable scroll-snap overlay"
|
4894
4894
|
},
|
4895
|
-
"panels/elements/ElementsTreeElement.ts | enterIsolationMode": {
|
4896
|
-
"message": "Enter Isolation Mode"
|
4897
|
-
},
|
4898
|
-
"panels/elements/ElementsTreeElement.ts | exitIsolationMode": {
|
4899
|
-
"message": "Exit Isolation Mode"
|
4900
|
-
},
|
4901
4895
|
"panels/elements/ElementsTreeElement.ts | expandRecursively": {
|
4902
4896
|
"message": "Expand recursively"
|
4903
4897
|
},
|
@@ -5159,6 +5153,9 @@
|
|
5159
5153
|
"panels/elements/StylesSidebarPane.ts | unknownPropertyName": {
|
5160
5154
|
"message": "Unknown property name"
|
5161
5155
|
},
|
5156
|
+
"panels/elements/TopLayerContainer.ts | topLayer": {
|
5157
|
+
"message": "top-layer"
|
5158
|
+
},
|
5162
5159
|
"panels/emulation/DeviceModeToolbar.ts | addDevicePixelRatio": {
|
5163
5160
|
"message": "Add device pixel ratio"
|
5164
5161
|
},
|
@@ -4892,12 +4892,6 @@
|
|
4892
4892
|
"panels/elements/ElementsTreeElement.ts | enableScrollSnap": {
|
4893
4893
|
"message": "Êńâb́l̂é ŝćr̂ól̂ĺ-ŝńâṕ ôv́êŕl̂áŷ"
|
4894
4894
|
},
|
4895
|
-
"panels/elements/ElementsTreeElement.ts | enterIsolationMode": {
|
4896
|
-
"message": "Êńt̂ér̂ Íŝól̂át̂íôń M̂ód̂é"
|
4897
|
-
},
|
4898
|
-
"panels/elements/ElementsTreeElement.ts | exitIsolationMode": {
|
4899
|
-
"message": "Êx́ît́ Îśôĺât́îón̂ Ḿôd́ê"
|
4900
|
-
},
|
4901
4895
|
"panels/elements/ElementsTreeElement.ts | expandRecursively": {
|
4902
4896
|
"message": "Êx́p̂án̂d́ r̂éĉúr̂śîv́êĺŷ"
|
4903
4897
|
},
|
@@ -5159,6 +5153,9 @@
|
|
5159
5153
|
"panels/elements/StylesSidebarPane.ts | unknownPropertyName": {
|
5160
5154
|
"message": "Ûńk̂ńôẃn̂ ṕr̂óp̂ér̂t́ŷ ńâḿê"
|
5161
5155
|
},
|
5156
|
+
"panels/elements/TopLayerContainer.ts | topLayer": {
|
5157
|
+
"message": "t̂óp̂-ĺâýêŕ"
|
5158
|
+
},
|
5162
5159
|
"panels/emulation/DeviceModeToolbar.ts | addDevicePixelRatio": {
|
5163
5160
|
"message": "Âd́d̂ d́êv́îćê ṕîx́êĺ r̂át̂íô"
|
5164
5161
|
},
|
@@ -1410,6 +1410,10 @@ export class DOMModel extends SDKModel<EventTypes> {
|
|
1410
1410
|
this.scheduleMutationEvent(node);
|
1411
1411
|
}
|
1412
1412
|
|
1413
|
+
topLayerElementsUpdated(): void {
|
1414
|
+
this.dispatchEventToListeners(Events.TopLayerElementsChanged);
|
1415
|
+
}
|
1416
|
+
|
1413
1417
|
pseudoElementRemoved(parentId: Protocol.DOM.NodeId, pseudoElementId: Protocol.DOM.NodeId): void {
|
1414
1418
|
const parent = this.idToDOMNode.get(parentId);
|
1415
1419
|
if (!parent) {
|
@@ -1511,6 +1515,10 @@ export class DOMModel extends SDKModel<EventTypes> {
|
|
1511
1515
|
return this.agent.invoke_querySelectorAll({nodeId, selector}).then(({nodeIds}) => nodeIds);
|
1512
1516
|
}
|
1513
1517
|
|
1518
|
+
getTopLayerElements(): Promise<Protocol.DOM.NodeId[]|null> {
|
1519
|
+
return this.agent.invoke_getTopLayerElements().then(({nodeIds}) => nodeIds);
|
1520
|
+
}
|
1521
|
+
|
1514
1522
|
markUndoableState(minorChange?: boolean): void {
|
1515
1523
|
void DOMModelUndoStack.instance().markUndoableState(this, minorChange || false);
|
1516
1524
|
}
|
@@ -1574,6 +1582,7 @@ export enum Events {
|
|
1574
1582
|
ChildNodeCountUpdated = 'ChildNodeCountUpdated',
|
1575
1583
|
DistributedNodesChanged = 'DistributedNodesChanged',
|
1576
1584
|
MarkersChanged = 'MarkersChanged',
|
1585
|
+
TopLayerElementsChanged = 'TopLayerElementsChanged',
|
1577
1586
|
}
|
1578
1587
|
|
1579
1588
|
export type EventTypes = {
|
@@ -1587,6 +1596,7 @@ export type EventTypes = {
|
|
1587
1596
|
[Events.ChildNodeCountUpdated]: DOMNode,
|
1588
1597
|
[Events.DistributedNodesChanged]: DOMNode,
|
1589
1598
|
[Events.MarkersChanged]: DOMNode,
|
1599
|
+
[Events.TopLayerElementsChanged]: void,
|
1590
1600
|
};
|
1591
1601
|
|
1592
1602
|
class DOMDispatcher implements ProtocolProxyApi.DOMDispatcher {
|
@@ -1652,6 +1662,7 @@ class DOMDispatcher implements ProtocolProxyApi.DOMDispatcher {
|
|
1652
1662
|
}
|
1653
1663
|
|
1654
1664
|
topLayerElementsUpdated(): void {
|
1665
|
+
this.#domModel.topLayerElementsUpdated();
|
1655
1666
|
}
|
1656
1667
|
}
|
1657
1668
|
|
@@ -50,10 +50,13 @@ import {Capability} from './Target.js';
|
|
50
50
|
import {SDKModel} from './SDKModel.js';
|
51
51
|
import {TargetManager} from './TargetManager.js';
|
52
52
|
import {SecurityOriginManager} from './SecurityOriginManager.js';
|
53
|
+
import {StorageKeyManager} from './StorageKeyManager.js';
|
53
54
|
|
54
55
|
export class ResourceTreeModel extends SDKModel<EventTypes> {
|
55
56
|
readonly agent: ProtocolProxyApi.PageApi;
|
57
|
+
readonly storageAgent: ProtocolProxyApi.StorageApi;
|
56
58
|
readonly #securityOriginManager: SecurityOriginManager;
|
59
|
+
readonly #storageKeyManager: StorageKeyManager;
|
57
60
|
readonly framesInternal: Map<string, ResourceTreeFrame>;
|
58
61
|
#cachedResourcesProcessed: boolean;
|
59
62
|
#pendingReloadOptions: {
|
@@ -75,8 +78,10 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
75
78
|
networkManager.addEventListener(NetworkManagerEvents.RequestUpdateDropped, this.onRequestUpdateDropped, this);
|
76
79
|
}
|
77
80
|
this.agent = target.pageAgent();
|
81
|
+
this.storageAgent = target.storageAgent();
|
78
82
|
void this.agent.invoke_enable();
|
79
83
|
this.#securityOriginManager = (target.model(SecurityOriginManager) as SecurityOriginManager);
|
84
|
+
this.#storageKeyManager = (target.model(StorageKeyManager) as StorageKeyManager);
|
80
85
|
this.#pendingBackForwardCacheNotUsedEvents = new Set<Protocol.Page.BackForwardCacheNotUsedEvent>();
|
81
86
|
this.#pendingPrerenderAttemptCompletedEvents = new Set<Protocol.Page.PrerenderAttemptCompletedEvent>();
|
82
87
|
target.registerPageDispatcher(new PageDispatcher(this));
|
@@ -129,6 +134,14 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
129
134
|
}
|
130
135
|
}
|
131
136
|
|
137
|
+
async storageKeyForFrame(frameId: Protocol.Page.FrameId): Promise<string|null> {
|
138
|
+
const response = await this.storageAgent.invoke_getStorageKeyForFrame({frameId: frameId});
|
139
|
+
if (response.getError() === 'Frame tree node for given frame not found') {
|
140
|
+
return null;
|
141
|
+
}
|
142
|
+
return response.storageKey;
|
143
|
+
}
|
144
|
+
|
132
145
|
domModel(): DOMModel {
|
133
146
|
return this.target().model(DOMModel) as DOMModel;
|
134
147
|
}
|
@@ -164,6 +177,7 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
164
177
|
}
|
165
178
|
this.dispatchEventToListeners(Events.FrameAdded, frame);
|
166
179
|
this.updateSecurityOrigins();
|
180
|
+
void this.updateStorageKeys();
|
167
181
|
}
|
168
182
|
|
169
183
|
frameAttached(
|
@@ -233,6 +247,7 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
233
247
|
this.target().setInspectedURL(frame.url);
|
234
248
|
}
|
235
249
|
this.updateSecurityOrigins();
|
250
|
+
void this.updateStorageKeys();
|
236
251
|
}
|
237
252
|
|
238
253
|
documentOpened(framePayload: Protocol.Page.Frame): void {
|
@@ -265,6 +280,7 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
265
280
|
frame.remove(isSwap);
|
266
281
|
}
|
267
282
|
this.updateSecurityOrigins();
|
283
|
+
void this.updateStorageKeys();
|
268
284
|
}
|
269
285
|
|
270
286
|
private onRequestFinished(event: Common.EventTarget.EventTargetEvent<NetworkRequest>): void {
|
@@ -520,6 +536,26 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
520
536
|
};
|
521
537
|
}
|
522
538
|
|
539
|
+
private async getStorageKeyData(): Promise<StorageKeyData> {
|
540
|
+
const storageKeys = new Set<string>();
|
541
|
+
let mainStorageKey: string|null = null;
|
542
|
+
|
543
|
+
for (const {isMainFrame, storageKey} of await Promise.all(
|
544
|
+
[...this.framesInternal.values()].map(async f => f.storageKey.then(k => ({
|
545
|
+
isMainFrame: f.isMainFrame(),
|
546
|
+
storageKey: k,
|
547
|
+
}))))) {
|
548
|
+
if (isMainFrame) {
|
549
|
+
mainStorageKey = storageKey;
|
550
|
+
}
|
551
|
+
if (storageKey) {
|
552
|
+
storageKeys.add(storageKey);
|
553
|
+
}
|
554
|
+
}
|
555
|
+
|
556
|
+
return {storageKeys: storageKeys, mainStorageKey: mainStorageKey};
|
557
|
+
}
|
558
|
+
|
523
559
|
private updateSecurityOrigins(): void {
|
524
560
|
const data = this.getSecurityOriginData();
|
525
561
|
this.#securityOriginManager.setMainSecurityOrigin(
|
@@ -527,6 +563,16 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
527
563
|
this.#securityOriginManager.updateSecurityOrigins(data.securityOrigins);
|
528
564
|
}
|
529
565
|
|
566
|
+
private async updateStorageKeys(): Promise<void> {
|
567
|
+
const data = await this.getStorageKeyData();
|
568
|
+
this.#storageKeyManager.setMainStorageKey(data.mainStorageKey || '');
|
569
|
+
this.#storageKeyManager.updateStorageKeys(data.storageKeys);
|
570
|
+
}
|
571
|
+
|
572
|
+
async getMainStorageKey(): Promise<string|null> {
|
573
|
+
return this.mainFrame ? this.mainFrame.storageKey : null;
|
574
|
+
}
|
575
|
+
|
530
576
|
getMainSecurityOrigin(): string|null {
|
531
577
|
const data = this.getSecurityOriginData();
|
532
578
|
return data.mainSecurityOrigin || data.unreachableMainSecurityOrigin;
|
@@ -626,6 +672,7 @@ export class ResourceTreeFrame {
|
|
626
672
|
#urlInternal: Platform.DevToolsPath.UrlString;
|
627
673
|
#domainAndRegistryInternal: string;
|
628
674
|
#securityOriginInternal: string|null;
|
675
|
+
#storageKeyInternal?: Promise<string|null>;
|
629
676
|
#unreachableUrlInternal: Platform.DevToolsPath.UrlString;
|
630
677
|
#adFrameStatusInternal?: Protocol.Page.AdFrameStatus;
|
631
678
|
#secureContextType: Protocol.Page.SecureContextType|null;
|
@@ -758,6 +805,13 @@ export class ResourceTreeFrame {
|
|
758
805
|
return this.#securityOriginInternal;
|
759
806
|
}
|
760
807
|
|
808
|
+
get storageKey(): Promise<string|null> {
|
809
|
+
if (!this.#storageKeyInternal) {
|
810
|
+
this.#storageKeyInternal = this.#model.storageKeyForFrame(this.#idInternal);
|
811
|
+
}
|
812
|
+
return this.#storageKeyInternal;
|
813
|
+
}
|
814
|
+
|
761
815
|
unreachableUrl(): Platform.DevToolsPath.UrlString {
|
762
816
|
return this.#unreachableUrlInternal;
|
763
817
|
}
|
@@ -1122,3 +1176,8 @@ export interface SecurityOriginData {
|
|
1122
1176
|
mainSecurityOrigin: string|null;
|
1123
1177
|
unreachableMainSecurityOrigin: string|null;
|
1124
1178
|
}
|
1179
|
+
|
1180
|
+
export interface StorageKeyData {
|
1181
|
+
storageKeys: Set<string>;
|
1182
|
+
mainStorageKey: string|null;
|
1183
|
+
}
|
@@ -268,7 +268,7 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
|
|
268
268
|
return {status: Protocol.Debugger.SetScriptSourceResponseStatus.Ok};
|
269
269
|
}
|
270
270
|
const response = await this.debuggerModel.target().debuggerAgent().invoke_setScriptSource(
|
271
|
-
{scriptId: this.scriptId, scriptSource: newSource});
|
271
|
+
{scriptId: this.scriptId, scriptSource: newSource, allowTopFrameEditing: true});
|
272
272
|
if (response.getError()) {
|
273
273
|
// Something went seriously wrong, like the V8 inspector no longer knowing about this script without
|
274
274
|
// shutting down the Debugger agent etc.
|
@@ -81,5 +81,5 @@ export type EventTypes = {
|
|
81
81
|
[Events.MainSecurityOriginChanged]: MainSecurityOriginChangedEvent,
|
82
82
|
};
|
83
83
|
|
84
|
-
// TODO(jarhar): this is the
|
84
|
+
// TODO(jarhar): this is the one of the two usages of Capability.None. Do something about it!
|
85
85
|
SDKModel.register(SecurityOriginManager, {capabilities: Capability.None, autostart: false});
|
@@ -0,0 +1,71 @@
|
|
1
|
+
// Copyright 2022 The Chromium Authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
import type {Target} from './Target.js';
|
6
|
+
import {Capability} from './Target.js';
|
7
|
+
import {SDKModel} from './SDKModel.js';
|
8
|
+
|
9
|
+
export class StorageKeyManager extends SDKModel<EventTypes> {
|
10
|
+
#mainStorageKeyInternal: string;
|
11
|
+
#storageKeysInternal: Set<string>;
|
12
|
+
constructor(target: Target) {
|
13
|
+
super(target);
|
14
|
+
|
15
|
+
this.#mainStorageKeyInternal = '';
|
16
|
+
this.#storageKeysInternal = new Set();
|
17
|
+
}
|
18
|
+
|
19
|
+
updateStorageKeys(storageKeys: Set<string>): void {
|
20
|
+
const oldStorageKeys = this.#storageKeysInternal;
|
21
|
+
this.#storageKeysInternal = storageKeys;
|
22
|
+
|
23
|
+
for (const storageKey of oldStorageKeys) {
|
24
|
+
if (!this.#storageKeysInternal.has(storageKey)) {
|
25
|
+
this.dispatchEventToListeners(Events.StorageKeyRemoved, storageKey);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
for (const storageKey of this.#storageKeysInternal) {
|
30
|
+
if (!oldStorageKeys.has(storageKey)) {
|
31
|
+
this.dispatchEventToListeners(Events.StorageKeyAdded, storageKey);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
storageKeys(): string[] {
|
37
|
+
return [...this.#storageKeysInternal];
|
38
|
+
}
|
39
|
+
|
40
|
+
mainStorageKey(): string {
|
41
|
+
return this.#mainStorageKeyInternal;
|
42
|
+
}
|
43
|
+
|
44
|
+
setMainStorageKey(storageKey: string): void {
|
45
|
+
this.#mainStorageKeyInternal = storageKey;
|
46
|
+
this.dispatchEventToListeners(Events.MainStorageKeyChanged, {
|
47
|
+
mainStorageKey: this.#mainStorageKeyInternal,
|
48
|
+
});
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
// TODO(crbug.com/1167717): Make this a const enum again
|
53
|
+
// eslint-disable-next-line rulesdir/const_enum
|
54
|
+
export enum Events {
|
55
|
+
StorageKeyAdded = 'StorageKeyAdded',
|
56
|
+
StorageKeyRemoved = 'StorageKeyRemoved',
|
57
|
+
MainStorageKeyChanged = 'MainStorageKeyChanged',
|
58
|
+
}
|
59
|
+
|
60
|
+
export interface MainStorageKeyChangedEvent {
|
61
|
+
mainStorageKey: string;
|
62
|
+
}
|
63
|
+
|
64
|
+
export type EventTypes = {
|
65
|
+
[Events.StorageKeyAdded]: string,
|
66
|
+
[Events.StorageKeyRemoved]: string,
|
67
|
+
[Events.MainStorageKeyChanged]: MainStorageKeyChangedEvent,
|
68
|
+
};
|
69
|
+
|
70
|
+
// TODO(jarhar): this is the one of the two usages of Capability.None. Do something about it!
|
71
|
+
SDKModel.register(StorageKeyManager, {capabilities: Capability.None, autostart: false});
|
@@ -72,6 +72,7 @@ import * as ServiceWorkerCacheModel from './ServiceWorkerCacheModel.js';
|
|
72
72
|
import * as ServiceWorkerManager from './ServiceWorkerManager.js';
|
73
73
|
import * as SourceMap from './SourceMap.js';
|
74
74
|
import * as SourceMapManager from './SourceMapManager.js';
|
75
|
+
import * as StorageKeyManager from './StorageKeyManager.js';
|
75
76
|
import * as Target from './Target.js';
|
76
77
|
import * as TargetManager from './TargetManager.js';
|
77
78
|
import * as TracingManager from './TracingManager.js';
|
@@ -141,6 +142,7 @@ export {
|
|
141
142
|
ServiceWorkerManager,
|
142
143
|
SourceMap,
|
143
144
|
SourceMapManager,
|
145
|
+
StorageKeyManager,
|
144
146
|
Target,
|
145
147
|
TargetManager,
|
146
148
|
TracingManager,
|
@@ -312,8 +312,9 @@ export class ScopeVariableAnalysis {
|
|
312
312
|
break;
|
313
313
|
case 'Property':
|
314
314
|
if (node.shorthand) {
|
315
|
-
console.assert(node.value === node.key);
|
316
315
|
console.assert(node.value.type === 'Identifier');
|
316
|
+
console.assert(node.key.type === 'Identifier');
|
317
|
+
console.assert((node.value as Acorn.ESTree.Identifier).name === (node.key as Acorn.ESTree.Identifier).name);
|
317
318
|
this.#addVariable((node.value as Acorn.ESTree.Identifier).name, node.value.start, DefinitionKind.None, true);
|
318
319
|
} else {
|
319
320
|
if (node.computed) {
|
@@ -469,8 +470,9 @@ export class ScopeVariableAnalysis {
|
|
469
470
|
case 'Property':
|
470
471
|
// This is AssignmentProperty inside an object pattern.
|
471
472
|
if (node.shorthand) {
|
472
|
-
console.assert(node.value === node.key);
|
473
473
|
console.assert(node.value.type === 'Identifier');
|
474
|
+
console.assert(node.key.type === 'Identifier');
|
475
|
+
console.assert((node.value as Acorn.ESTree.Identifier).name === (node.key as Acorn.ESTree.Identifier).name);
|
474
476
|
this.#addVariable((node.value as Acorn.ESTree.Identifier).name, node.value.start, definitionKind, true);
|
475
477
|
} else {
|
476
478
|
if (node.computed) {
|
@@ -181,7 +181,7 @@ export class TimelineModelImpl {
|
|
181
181
|
case RecordType.MarkLoad:
|
182
182
|
case RecordType.MarkLCPCandidate:
|
183
183
|
case RecordType.MarkLCPInvalidate:
|
184
|
-
return Boolean(event.args['data']['isMainFrame']);
|
184
|
+
return Boolean(event.args['data']['isOutermostMainFrame'] ?? event.args['data']['isMainFrame']);
|
185
185
|
default:
|
186
186
|
return false;
|
187
187
|
}
|
@@ -203,11 +203,13 @@ export class TimelineModelImpl {
|
|
203
203
|
}
|
204
204
|
|
205
205
|
isLCPCandidateEvent(event: SDK.TracingModel.Event): boolean {
|
206
|
-
return event.name === RecordType.MarkLCPCandidate &&
|
206
|
+
return event.name === RecordType.MarkLCPCandidate &&
|
207
|
+
Boolean(event.args['data']['isOutermostMainFrame'] ?? event.args['data']['isMainFrame']);
|
207
208
|
}
|
208
209
|
|
209
210
|
isLCPInvalidateEvent(event: SDK.TracingModel.Event): boolean {
|
210
|
-
return event.name === RecordType.MarkLCPInvalidate &&
|
211
|
+
return event.name === RecordType.MarkLCPInvalidate &&
|
212
|
+
Boolean(event.args['data']['isOutermostMainFrame'] ?? event.args['data']['isMainFrame']);
|
211
213
|
}
|
212
214
|
|
213
215
|
isFCPEvent(event: SDK.TracingModel.Event): boolean {
|
@@ -1133,7 +1135,7 @@ export class TimelineModelImpl {
|
|
1133
1135
|
break;
|
1134
1136
|
}
|
1135
1137
|
const frameId = TimelineModelImpl.eventFrameId(event);
|
1136
|
-
const
|
1138
|
+
const isOutermostMainFrame = Boolean(eventData['isOutermostMainFrame'] ?? eventData['isMainFrame']);
|
1137
1139
|
const pageFrame = frameId ? this.pageFrames.get(frameId) : null;
|
1138
1140
|
if (pageFrame) {
|
1139
1141
|
pageFrame.update(event.startTime, eventData);
|
@@ -1144,13 +1146,13 @@ export class TimelineModelImpl {
|
|
1144
1146
|
if (eventData['page'] && eventData['page'] !== this.legacyCurrentPage) {
|
1145
1147
|
return false;
|
1146
1148
|
}
|
1147
|
-
} else if (
|
1149
|
+
} else if (isOutermostMainFrame) {
|
1148
1150
|
return false;
|
1149
1151
|
} else if (!this.addPageFrame(event, eventData)) {
|
1150
1152
|
return false;
|
1151
1153
|
}
|
1152
1154
|
}
|
1153
|
-
if (
|
1155
|
+
if (isOutermostMainFrame && frameId) {
|
1154
1156
|
const frame = this.pageFrames.get(frameId);
|
1155
1157
|
if (frame) {
|
1156
1158
|
this.mainFrame = frame;
|
@@ -603,6 +603,7 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
603
603
|
|
604
604
|
private addDOMStorage(domStorage: DOMStorage): void {
|
605
605
|
console.assert(!this.domStorageTreeElements.get(domStorage));
|
606
|
+
console.assert(Boolean(domStorage.storageKey) || Boolean(domStorage.securityOrigin));
|
606
607
|
|
607
608
|
const domStorageTreeElement = new DOMStorageTreeElement(this.panel, domStorage);
|
608
609
|
this.domStorageTreeElements.set(domStorage, domStorageTreeElement);
|
@@ -1422,7 +1423,10 @@ export class DOMStorageTreeElement extends ApplicationPanelTreeElement {
|
|
1422
1423
|
private readonly domStorage: DOMStorage;
|
1423
1424
|
constructor(storagePanel: ResourcesPanel, domStorage: DOMStorage) {
|
1424
1425
|
super(
|
1425
|
-
storagePanel,
|
1426
|
+
storagePanel,
|
1427
|
+
domStorage.securityOrigin ? domStorage.securityOrigin :
|
1428
|
+
(domStorage.storageKey ? domStorage.storageKey : i18nString(UIStrings.localFiles)),
|
1429
|
+
false);
|
1426
1430
|
this.domStorage = domStorage;
|
1427
1431
|
const icon = UI.Icon.Icon.create('mediumicon-table', 'resource-tree-item');
|
1428
1432
|
this.setLeadingIcons([icon]);
|