chrome-devtools-frontend 1.0.1602348 → 1.0.1602543
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/front_end/core/common/Settings.ts +1 -871
- package/front_end/core/common/VersionController.ts +880 -0
- package/front_end/core/common/common.ts +2 -0
- package/front_end/core/platform/HostRuntime.ts +9 -3
- package/front_end/core/protocol_client/InspectorBackend.ts +8 -0
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/Target.ts +5 -0
- package/front_end/core/sdk/WebMCPModel.ts +98 -0
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +13 -19
- package/front_end/models/ai_assistance/AiConversation.ts +3 -3
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +50 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +14 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +19 -4
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +7 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +14 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -23
- package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +7 -7
- package/front_end/models/lighthouse/RunTypes.ts +3 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +9 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +69 -8
- package/front_end/panels/ai_assistance/components/chatMessage.css +31 -2
- package/front_end/panels/application/AppManifestView.ts +2 -2
- package/front_end/panels/application/BackgroundServiceView.ts +9 -9
- package/front_end/panels/application/FrameDetailsView.ts +4 -13
- package/front_end/panels/application/IndexedDBViews.ts +1 -1
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +3 -3
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/permissionsPolicySection.css +54 -52
- package/front_end/panels/application/frameDetailsReportView.css +13 -1
- package/front_end/panels/elements/CSSValueTraceView.ts +9 -1
- package/front_end/panels/elements/PropertiesWidget.ts +14 -13
- package/front_end/panels/elements/PropertyRenderer.ts +10 -9
- package/front_end/panels/elements/StandaloneStylesContainer.ts +15 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +20 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +34 -25
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +5 -0
- package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseController.ts +4 -1
- package/front_end/panels/media/EventDisplayTable.ts +3 -2
- package/front_end/panels/network/EventSourceMessagesView.ts +2 -2
- package/front_end/panels/network/ResourceChunkView.ts +1 -1
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +9 -4
- package/front_end/panels/profiler/HeapProfileView.ts +8 -4
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +40 -33
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +12 -18
- package/front_end/panels/profiler/LiveHeapProfileView.ts +3 -4
- package/front_end/panels/profiler/ProfileHeader.ts +5 -11
- package/front_end/panels/profiler/ProfileView.ts +1 -1
- package/front_end/panels/sensors/SensorsView.ts +24 -43
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +2 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +19 -17
- package/front_end/panels/timeline/components/timelineRangeSummaryView.css +3 -1
- package/front_end/panels/webauthn/WebauthnPane.ts +52 -0
- package/front_end/ui/legacy/Treeoutline.ts +7 -3
- package/front_end/ui/legacy/UIUtils.ts +13 -11
- package/front_end/ui/legacy/Widget.ts +5 -0
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/SortableDataGrid.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +39 -23
- package/front_end/ui/legacy/components/perf_ui/GCActionDelegate.ts +20 -4
- package/front_end/ui/legacy/treeoutline.css +4 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +1 -1
|
@@ -964,8 +964,6 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
|
|
|
964
964
|
}
|
|
965
965
|
let objectPopoverHelper: ObjectUI.ObjectPopoverHelper.ObjectPopoverHelper|null;
|
|
966
966
|
return {
|
|
967
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
|
968
|
-
// @ts-expect-error
|
|
969
967
|
box: span.boxInWindow(),
|
|
970
968
|
show: async (popover: UI.GlassPane.GlassPane) => {
|
|
971
969
|
if (!heapProfilerModel) {
|
|
@@ -1364,7 +1362,7 @@ export class HeapSnapshotProfileType extends
|
|
|
1364
1362
|
return;
|
|
1365
1363
|
}
|
|
1366
1364
|
|
|
1367
|
-
let profile
|
|
1365
|
+
let profile = new HeapProfileHeader(heapProfilerModel, this);
|
|
1368
1366
|
this.setProfileBeingRecorded(profile);
|
|
1369
1367
|
this.addProfile(profile);
|
|
1370
1368
|
profile.updateStatus(i18nString(UIStrings.snapshotting));
|
|
@@ -1649,33 +1647,29 @@ export interface TrackingHeapSnapshotProfileTypeEventTypes {
|
|
|
1649
1647
|
|
|
1650
1648
|
export class HeapProfileHeader extends ProfileHeader {
|
|
1651
1649
|
readonly heapProfilerModelInternal: SDK.HeapProfilerModel.HeapProfilerModel|null;
|
|
1652
|
-
maxJSObjectId
|
|
1653
|
-
workerProxy: HeapSnapshotWorkerProxy|null;
|
|
1654
|
-
receiver: Common.StringOutputStream.OutputStream|null;
|
|
1655
|
-
snapshotProxy: HeapSnapshotProxy|null;
|
|
1650
|
+
maxJSObjectId = -1;
|
|
1651
|
+
workerProxy: HeapSnapshotWorkerProxy|null = null;
|
|
1652
|
+
receiver: Common.StringOutputStream.OutputStream|null = null;
|
|
1653
|
+
snapshotProxy: HeapSnapshotProxy|null = null;
|
|
1656
1654
|
readonly loadPromise: Promise<HeapSnapshotProxy>;
|
|
1657
1655
|
fulfillLoad: (value: HeapSnapshotProxy|PromiseLike<HeapSnapshotProxy>) => void;
|
|
1658
|
-
totalNumberOfChunks
|
|
1659
|
-
bufferedWriter: Bindings.TempFile.TempFile|null;
|
|
1660
|
-
onTempFileReady: (() => void)|null;
|
|
1656
|
+
totalNumberOfChunks = 0;
|
|
1657
|
+
bufferedWriter: Bindings.TempFile.TempFile|null = null;
|
|
1658
|
+
onTempFileReady: (() => void)|null = null;
|
|
1661
1659
|
failedToCreateTempFile?: boolean;
|
|
1662
1660
|
wasDisposed?: boolean;
|
|
1663
1661
|
fileName?: Platform.DevToolsPath.RawPathString;
|
|
1664
1662
|
|
|
1665
1663
|
constructor(
|
|
1666
|
-
heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null,
|
|
1664
|
+
heapProfilerModel: SDK.HeapProfilerModel.HeapProfilerModel|null,
|
|
1665
|
+
type: HeapSnapshotProfileType,
|
|
1666
|
+
title?: string,
|
|
1667
|
+
) {
|
|
1667
1668
|
super(type, title || i18nString(UIStrings.snapshotD, {PH1: type.nextProfileUid()}));
|
|
1668
1669
|
this.heapProfilerModelInternal = heapProfilerModel;
|
|
1669
|
-
this.maxJSObjectId = -1;
|
|
1670
|
-
this.workerProxy = null;
|
|
1671
|
-
this.receiver = null;
|
|
1672
|
-
this.snapshotProxy = null;
|
|
1673
1670
|
const {promise, resolve} = Promise.withResolvers<HeapSnapshotProxy>();
|
|
1674
1671
|
this.loadPromise = promise;
|
|
1675
1672
|
this.fulfillLoad = resolve;
|
|
1676
|
-
this.totalNumberOfChunks = 0;
|
|
1677
|
-
this.bufferedWriter = null;
|
|
1678
|
-
this.onTempFileReady = null;
|
|
1679
1673
|
}
|
|
1680
1674
|
|
|
1681
1675
|
heapProfilerModel(): SDK.HeapProfilerModel.HeapProfilerModel|null {
|
|
@@ -103,15 +103,14 @@ export class LiveHeapProfileView extends UI.Widget.VBox {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
createDataGrid(): DataGrid.SortableDataGrid.SortableDataGrid<GridNode> {
|
|
106
|
-
const defaultColumnConfig
|
|
107
|
-
id: '',
|
|
106
|
+
const defaultColumnConfig = {
|
|
108
107
|
title: Common.UIString.LocalizedEmptyString,
|
|
109
108
|
fixedWidth: true,
|
|
110
109
|
sortable: true,
|
|
111
110
|
align: DataGrid.DataGrid.Align.RIGHT,
|
|
112
111
|
sort: DataGrid.DataGrid.Order.Descending,
|
|
113
112
|
};
|
|
114
|
-
const columns = [
|
|
113
|
+
const columns: Array<{tooltip: Common.UIString.LocalizedString}&DataGrid.DataGrid.ColumnDescriptor> = [
|
|
115
114
|
{
|
|
116
115
|
...defaultColumnConfig,
|
|
117
116
|
id: 'size',
|
|
@@ -140,7 +139,7 @@ export class LiveHeapProfileView extends UI.Widget.VBox {
|
|
|
140
139
|
sortable: true,
|
|
141
140
|
tooltip: i18nString(UIStrings.urlOfTheScriptSource),
|
|
142
141
|
},
|
|
143
|
-
]
|
|
142
|
+
];
|
|
144
143
|
const dataGrid = new DataGrid.SortableDataGrid.SortableDataGrid({
|
|
145
144
|
displayName: i18nString(UIStrings.heapProfile),
|
|
146
145
|
columns,
|
|
@@ -11,17 +11,14 @@ export class ProfileHeader extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
11
11
|
readonly #profileType: ProfileType;
|
|
12
12
|
title: string;
|
|
13
13
|
uid: number;
|
|
14
|
-
#fromFile
|
|
15
|
-
tempFile: Bindings.TempFile.TempFile|null;
|
|
14
|
+
#fromFile = false;
|
|
15
|
+
tempFile: Bindings.TempFile.TempFile|null = null;
|
|
16
16
|
|
|
17
17
|
constructor(profileType: ProfileType, title: string) {
|
|
18
18
|
super();
|
|
19
19
|
this.#profileType = profileType;
|
|
20
20
|
this.title = title;
|
|
21
21
|
this.uid = profileType.incrementProfileUid();
|
|
22
|
-
this.#fromFile = false;
|
|
23
|
-
|
|
24
|
-
this.tempFile = null;
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
setTitle(title: string): void {
|
|
@@ -103,17 +100,14 @@ export interface EventTypes {
|
|
|
103
100
|
export class ProfileType extends Common.ObjectWrapper.ObjectWrapper<ProfileEventTypes> {
|
|
104
101
|
readonly #id: string;
|
|
105
102
|
readonly #name: string;
|
|
106
|
-
profiles: ProfileHeader[];
|
|
107
|
-
#profileBeingRecorded: ProfileHeader|null;
|
|
108
|
-
#nextProfileUid
|
|
103
|
+
profiles: ProfileHeader[] = [];
|
|
104
|
+
#profileBeingRecorded: ProfileHeader|null = null;
|
|
105
|
+
#nextProfileUid = 1;
|
|
109
106
|
|
|
110
107
|
constructor(id: string, name: string) {
|
|
111
108
|
super();
|
|
112
109
|
this.#id = id;
|
|
113
110
|
this.#name = name;
|
|
114
|
-
this.profiles = [];
|
|
115
|
-
this.#profileBeingRecorded = null;
|
|
116
|
-
this.#nextProfileUid = 1;
|
|
117
111
|
|
|
118
112
|
if (!window.opener) {
|
|
119
113
|
window.addEventListener('pagehide', this.clearTempStorage.bind(this), false);
|
|
@@ -138,7 +138,7 @@ export class ProfileView extends UI.View.SimpleView implements UI.SearchableView
|
|
|
138
138
|
this.searchableViewInternal.setPlaceholder(i18nString(UIStrings.findByCostMsNameOrFile));
|
|
139
139
|
this.searchableViewInternal.show(this.element);
|
|
140
140
|
|
|
141
|
-
const columns
|
|
141
|
+
const columns: DataGrid.DataGrid.ColumnDescriptor[] = [];
|
|
142
142
|
columns.push({
|
|
143
143
|
id: 'self',
|
|
144
144
|
title: this.columnHeader('self'),
|
|
@@ -660,10 +660,12 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
660
660
|
<input
|
|
661
661
|
id="alpha-input"
|
|
662
662
|
type="number"
|
|
663
|
+
min="0"
|
|
664
|
+
max="359.9999"
|
|
663
665
|
step="any"
|
|
666
|
+
required
|
|
664
667
|
${Directives.ref((el: Element | undefined) => { if (el) { this.alphaElement = el as HTMLInputElement; } })}
|
|
665
668
|
@change=${this.#onOrientationChange.bind(this)}
|
|
666
|
-
@input=${this.#onOrientationInput.bind(this)}
|
|
667
669
|
@keydown=${this.#onOrientationKeyDown.bind(this)}
|
|
668
670
|
@focus=${this.#onOrientationFocus.bind(this)}
|
|
669
671
|
>
|
|
@@ -674,10 +676,12 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
674
676
|
<input
|
|
675
677
|
id="beta-input"
|
|
676
678
|
type="number"
|
|
679
|
+
min="-180"
|
|
680
|
+
max="179.9999"
|
|
677
681
|
step="any"
|
|
682
|
+
required
|
|
678
683
|
${Directives.ref((el: Element | undefined) => { if (el) { this.betaElement = el as HTMLInputElement; } })}
|
|
679
684
|
@change=${this.#onOrientationChange.bind(this)}
|
|
680
|
-
@input=${this.#onOrientationInput.bind(this)}
|
|
681
685
|
@keydown=${this.#onOrientationKeyDown.bind(this)}
|
|
682
686
|
@focus=${this.#onOrientationFocus.bind(this)}
|
|
683
687
|
>
|
|
@@ -688,10 +692,12 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
688
692
|
<input
|
|
689
693
|
id="gamma-input"
|
|
690
694
|
type="number"
|
|
695
|
+
min="-90"
|
|
696
|
+
max="89.9999"
|
|
691
697
|
step="any"
|
|
698
|
+
required
|
|
692
699
|
${Directives.ref((el: Element | undefined) => { if (el) { this.gammaElement = el as HTMLInputElement; } })}
|
|
693
700
|
@change=${this.#onOrientationChange.bind(this)}
|
|
694
|
-
@input=${this.#onOrientationInput.bind(this)}
|
|
695
701
|
@keydown=${this.#onOrientationKeyDown.bind(this)}
|
|
696
702
|
@focus=${this.#onOrientationFocus.bind(this)}
|
|
697
703
|
>
|
|
@@ -745,9 +751,9 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
745
751
|
this.enableOrientationFields(true);
|
|
746
752
|
this.setBoxOrientation(this.deviceOrientation, false);
|
|
747
753
|
|
|
748
|
-
this
|
|
749
|
-
this
|
|
750
|
-
this
|
|
754
|
+
this.alphaElement.value = String(this.deviceOrientation.alpha);
|
|
755
|
+
this.betaElement.value = String(this.deviceOrientation.beta);
|
|
756
|
+
this.gammaElement.value = String(this.deviceOrientation.gamma);
|
|
751
757
|
}
|
|
752
758
|
|
|
753
759
|
private createPressureSection(): void {
|
|
@@ -837,9 +843,9 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
837
843
|
// Even though the angles in |deviceOrientation| will not be rounded
|
|
838
844
|
// here, their precision will be rounded by CSS when we change
|
|
839
845
|
// |this.orientationLayer.style| in setBoxOrientation().
|
|
840
|
-
this
|
|
841
|
-
this
|
|
842
|
-
this
|
|
846
|
+
this.alphaElement.value = String(roundAngle(deviceOrientation.alpha));
|
|
847
|
+
this.betaElement.value = String(roundAngle(deviceOrientation.beta));
|
|
848
|
+
this.gammaElement.value = String(roundAngle(deviceOrientation.gamma));
|
|
843
849
|
}
|
|
844
850
|
|
|
845
851
|
const animate = modificationSource !== DeviceOrientationModificationSource.USER_DRAG;
|
|
@@ -853,17 +859,9 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
853
859
|
{PH1: deviceOrientation.alpha, PH2: deviceOrientation.beta, PH3: deviceOrientation.gamma}));
|
|
854
860
|
}
|
|
855
861
|
|
|
856
|
-
#onOrientationInput(event: Event): void {
|
|
857
|
-
const input = event.currentTarget as HTMLInputElement;
|
|
858
|
-
const valid = this.#validateOrientationInput(input, input.value);
|
|
859
|
-
input.classList.toggle('error-input', !valid);
|
|
860
|
-
}
|
|
861
|
-
|
|
862
862
|
#onOrientationChange(event: Event): void {
|
|
863
863
|
const input = event.currentTarget as HTMLInputElement;
|
|
864
|
-
|
|
865
|
-
input.classList.toggle('error-input', !valid);
|
|
866
|
-
if (valid) {
|
|
864
|
+
if (input.checkValidity()) {
|
|
867
865
|
this.applyDeviceOrientationUserInput();
|
|
868
866
|
}
|
|
869
867
|
}
|
|
@@ -871,8 +869,7 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
871
869
|
#onOrientationKeyDown(event: KeyboardEvent): void {
|
|
872
870
|
const input = event.currentTarget as HTMLInputElement;
|
|
873
871
|
if (event.key === 'Enter') {
|
|
874
|
-
|
|
875
|
-
if (valid) {
|
|
872
|
+
if (input.checkValidity()) {
|
|
876
873
|
this.applyDeviceOrientationUserInput();
|
|
877
874
|
}
|
|
878
875
|
event.preventDefault();
|
|
@@ -883,10 +880,13 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
883
880
|
if (value === null) {
|
|
884
881
|
return;
|
|
885
882
|
}
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
if (
|
|
889
|
-
this
|
|
883
|
+
const prevValue = input.value;
|
|
884
|
+
input.value = String(value);
|
|
885
|
+
if (input.checkValidity()) {
|
|
886
|
+
this.applyDeviceOrientationUserInput();
|
|
887
|
+
} else {
|
|
888
|
+
// If ArrowUp/ArrowDown adjusts the value out of bounds, we reset it.
|
|
889
|
+
input.value = prevValue;
|
|
890
890
|
}
|
|
891
891
|
event.preventDefault();
|
|
892
892
|
}
|
|
@@ -896,25 +896,6 @@ export class SensorsView extends UI.Widget.VBox {
|
|
|
896
896
|
input.select();
|
|
897
897
|
}
|
|
898
898
|
|
|
899
|
-
#validateOrientationInput(input: HTMLInputElement, value: string): boolean {
|
|
900
|
-
if (input === this.alphaElement) {
|
|
901
|
-
return SDK.EmulationModel.DeviceOrientation.alphaAngleValidator(value);
|
|
902
|
-
}
|
|
903
|
-
if (input === this.betaElement) {
|
|
904
|
-
return SDK.EmulationModel.DeviceOrientation.betaAngleValidator(value);
|
|
905
|
-
}
|
|
906
|
-
if (input === this.gammaElement) {
|
|
907
|
-
return SDK.EmulationModel.DeviceOrientation.gammaAngleValidator(value);
|
|
908
|
-
}
|
|
909
|
-
return false;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
#setOrientationInputValue(input: HTMLInputElement, value: string): void {
|
|
913
|
-
input.value = value;
|
|
914
|
-
const valid = this.#validateOrientationInput(input, value);
|
|
915
|
-
input.classList.toggle('error-input', !valid);
|
|
916
|
-
}
|
|
917
|
-
|
|
918
899
|
private setBoxOrientation(deviceOrientation: SDK.EmulationModel.DeviceOrientation, animate: boolean): void {
|
|
919
900
|
if (animate) {
|
|
920
901
|
this.stageElement.classList.add('is-animating');
|
|
@@ -87,13 +87,13 @@ export class EventsTimelineTreeView extends TimelineTreeView {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
override populateColumns(columns: DataGrid.DataGrid.ColumnDescriptor[]): void {
|
|
90
|
-
columns.push(
|
|
90
|
+
columns.push({
|
|
91
91
|
id: 'start-time',
|
|
92
92
|
title: i18nString(UIStrings.startTime),
|
|
93
93
|
width: '80px',
|
|
94
94
|
fixedWidth: true,
|
|
95
95
|
sortable: true,
|
|
96
|
-
}
|
|
96
|
+
});
|
|
97
97
|
super.populateColumns(columns);
|
|
98
98
|
columns.filter(c => c.fixedWidth).forEach(c => {
|
|
99
99
|
c.width = '80px';
|
|
@@ -264,9 +264,9 @@ export class TimelineTreeView extends
|
|
|
264
264
|
this.textFilterInternal = new TimelineRegExp();
|
|
265
265
|
|
|
266
266
|
this.currentThreadSetting = Common.Settings.Settings.instance().createSetting('timeline-tree-current-thread', 0);
|
|
267
|
-
this.currentThreadSetting.addChangeListener(this.refreshTree
|
|
267
|
+
this.currentThreadSetting.addChangeListener(() => this.refreshTree());
|
|
268
268
|
|
|
269
|
-
const columns
|
|
269
|
+
const columns: DataGrid.DataGrid.ColumnDescriptor[] = [];
|
|
270
270
|
this.populateColumns(columns);
|
|
271
271
|
|
|
272
272
|
this.splitWidget = new UI.SplitWidget.SplitWidget(true, true, 'timeline-tree-view-details-split-widget');
|
|
@@ -403,8 +403,15 @@ export class TimelineTreeView extends
|
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
-
|
|
407
|
-
|
|
406
|
+
/**
|
|
407
|
+
* Refreshes the tree. By default, it will only do this
|
|
408
|
+
* if the tree is mounted into the DOM - as in the UI we
|
|
409
|
+
* have multiple trees and we only want to refresh the
|
|
410
|
+
* active one. Pass `true` into this function to force a
|
|
411
|
+
* refresh regardless.
|
|
412
|
+
*/
|
|
413
|
+
refreshTree(forceRefresh = false): void {
|
|
414
|
+
if (!this.element.parentElement && !forceRefresh) {
|
|
408
415
|
// This function can be called in different views (Bottom-Up and
|
|
409
416
|
// Call Tree) by the same single event whenever the group-by
|
|
410
417
|
// dropdown changes value. Thus, we bail out whenever the view is
|
|
@@ -462,15 +469,10 @@ export class TimelineTreeView extends
|
|
|
462
469
|
}
|
|
463
470
|
|
|
464
471
|
populateColumns(columns: DataGrid.DataGrid.ColumnDescriptor[]): void {
|
|
472
|
+
columns.push({id: 'self', title: i18nString(UIStrings.selfTime), width: '120px', fixedWidth: true, sortable: true});
|
|
465
473
|
columns.push(
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
columns.push(
|
|
469
|
-
({id: 'total', title: i18nString(UIStrings.totalTime), width: '120px', fixedWidth: true, sortable: true} as
|
|
470
|
-
DataGrid.DataGrid.ColumnDescriptor));
|
|
471
|
-
columns.push(
|
|
472
|
-
({id: 'activity', title: i18nString(UIStrings.activity), disclosure: true, sortable: true} as
|
|
473
|
-
DataGrid.DataGrid.ColumnDescriptor));
|
|
474
|
+
{id: 'total', title: i18nString(UIStrings.totalTime), width: '120px', fixedWidth: true, sortable: true});
|
|
475
|
+
columns.push({id: 'activity', title: i18nString(UIStrings.activity), disclosure: true, sortable: true});
|
|
474
476
|
}
|
|
475
477
|
|
|
476
478
|
sortingChanged(): void {
|
|
@@ -959,7 +961,7 @@ export class AggregatedTimelineTreeView extends TimelineTreeView {
|
|
|
959
961
|
super();
|
|
960
962
|
this.groupBySetting = Common.Settings.Settings.instance().createSetting(
|
|
961
963
|
'timeline-tree-group-by', AggregatedTimelineTreeView.GroupBy.None);
|
|
962
|
-
this.groupBySetting.addChangeListener(this.refreshTree
|
|
964
|
+
this.groupBySetting.addChangeListener(() => this.refreshTree());
|
|
963
965
|
this.init();
|
|
964
966
|
this.stackView = new TimelineStackView(this);
|
|
965
967
|
this.stackView.addEventListener(TimelineStackView.Events.SELECTION_CHANGED, this.onStackViewSelectionChanged, this);
|
|
@@ -1297,10 +1299,10 @@ export class TimelineStackView extends
|
|
|
1297
1299
|
const header = this.element.createChild('div', 'timeline-stack-view-header');
|
|
1298
1300
|
header.textContent = i18nString(UIStrings.heaviestStack);
|
|
1299
1301
|
this.treeView = treeView;
|
|
1300
|
-
const columns =
|
|
1301
|
-
{id: 'total', title: i18nString(UIStrings.totalTime), fixedWidth: true, width: '110px'},
|
|
1302
|
-
{id: 'activity', title: i18nString(UIStrings.activity)},
|
|
1303
|
-
]
|
|
1302
|
+
const columns: DataGrid.DataGrid.ColumnDescriptor[] = [
|
|
1303
|
+
{id: 'total', title: i18nString(UIStrings.totalTime), fixedWidth: true, width: '110px', sortable: false},
|
|
1304
|
+
{id: 'activity', title: i18nString(UIStrings.activity), sortable: false},
|
|
1305
|
+
];
|
|
1304
1306
|
this.dataGrid = new DataGrid.ViewportDataGrid.ViewportDataGrid({
|
|
1305
1307
|
displayName: i18nString(UIStrings.timelineStack),
|
|
1306
1308
|
columns,
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
|
|
19
19
|
@container (max-width: 450px) {
|
|
20
20
|
.timeline-details-range-summary {
|
|
21
|
-
|
|
21
|
+
display: grid;
|
|
22
|
+
/* Make sure the 3P table is only as large as the range summary at most */
|
|
23
|
+
grid-template-rows: 1fr minmax(50px, 1fr);
|
|
22
24
|
gap: var(--sys-size-4);
|
|
23
25
|
}
|
|
24
26
|
|
|
@@ -99,6 +99,18 @@ const UIStrings = {
|
|
|
99
99
|
* See https://w3c.github.io/webauthn/#sctn-large-blob-extension
|
|
100
100
|
*/
|
|
101
101
|
supportsLargeBlob: 'Supports large blob',
|
|
102
|
+
/**
|
|
103
|
+
* @description Label for checkbox that toggles hmac-secret support on virtual authenticators. hmac-secret is the CTAP 2 extension
|
|
104
|
+
* that computes HMAC outputs using a credential secret and caller-provided salts, enabling the WebAuthn PRF extension.
|
|
105
|
+
* See https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-hmac-secret-extension
|
|
106
|
+
*/
|
|
107
|
+
supportsHmacSecret: 'Supports hmac-secret',
|
|
108
|
+
/**
|
|
109
|
+
* @description Label for checkbox that toggles hmac-secret-mc support on virtual authenticators. hmac-secret-mc is a CTAP 2.2
|
|
110
|
+
* extension that allows retrieving HMAC secret outputs during credential creation without a separate assertion step.
|
|
111
|
+
* See https://fidoalliance.org/specs/fido-v2.2-rd-20241003/fido-client-to-authenticator-protocol-v2.2-rd-20241003.html#sctn-hmac-secret-make-cred-extension
|
|
112
|
+
*/
|
|
113
|
+
supportsHmacSecretMc: 'Supports hmac-secret-mc',
|
|
102
114
|
/**
|
|
103
115
|
* @description Text to add something
|
|
104
116
|
*/
|
|
@@ -369,6 +381,30 @@ function renderNewAuthenticatorSection(
|
|
|
369
381
|
.checked=${Boolean(options.hasLargeBlob && isCtap2 && options.hasResidentKey)}
|
|
370
382
|
.disabled=${!options.hasResidentKey || !isCtap2}>
|
|
371
383
|
</div>
|
|
384
|
+
<div class="authenticator-option">
|
|
385
|
+
<label for="hmac-secret" class="authenticator-option-label">
|
|
386
|
+
${i18nString(UIStrings.supportsHmacSecret)}
|
|
387
|
+
</label>
|
|
388
|
+
<input id="hmac-secret" class="authenticator-option-checkbox" type="checkbox"
|
|
389
|
+
jslog=${VisualLogging.toggle('hmac-secret').track({change: true})}
|
|
390
|
+
@change=${(e: Event) => onUpdate({hasHmacSecret: (e.target as HTMLInputElement).checked})}
|
|
391
|
+
.checked=${Boolean((options.hasHmacSecret || options.hasHmacSecretMc) && isCtap2)}
|
|
392
|
+
.disabled=${!isCtap2 || Boolean(options.hasHmacSecretMc)}>
|
|
393
|
+
</div>
|
|
394
|
+
<div class="authenticator-option">
|
|
395
|
+
<label for="hmac-secret-mc" class="authenticator-option-label">
|
|
396
|
+
${i18nString(UIStrings.supportsHmacSecretMc)}
|
|
397
|
+
</label>
|
|
398
|
+
<input id="hmac-secret-mc" class="authenticator-option-checkbox" type="checkbox"
|
|
399
|
+
jslog=${VisualLogging.toggle('hmac-secret-mc').track({change: true})}
|
|
400
|
+
@change=${(e: Event) => {
|
|
401
|
+
onUpdate((e.target as HTMLInputElement).checked
|
|
402
|
+
? {hasHmacSecretMc: true, hasHmacSecret: true}
|
|
403
|
+
: {hasHmacSecretMc: false});
|
|
404
|
+
}}
|
|
405
|
+
.checked=${Boolean(options.hasHmacSecretMc && isCtap2)}
|
|
406
|
+
.disabled=${!isCtap2}>
|
|
407
|
+
</div>
|
|
372
408
|
<div class="authenticator-option">
|
|
373
409
|
<div class="authenticator-option-label"></div>
|
|
374
410
|
<devtools-button @click=${onAdd}
|
|
@@ -492,6 +528,22 @@ function renderAuthenticatorFields(
|
|
|
492
528
|
${options.hasUserVerification ? i18nString(UIStrings.yes) : i18nString(UIStrings.no)}
|
|
493
529
|
</div>
|
|
494
530
|
</div>
|
|
531
|
+
<div class="authenticator-field">
|
|
532
|
+
<label class="authenticator-option-label">
|
|
533
|
+
${i18nString(UIStrings.supportsHmacSecret)}
|
|
534
|
+
</label>
|
|
535
|
+
<div class="authenticator-field-value">
|
|
536
|
+
${options.hasHmacSecret ? i18nString(UIStrings.yes) : i18nString(UIStrings.no)}
|
|
537
|
+
</div>
|
|
538
|
+
</div>
|
|
539
|
+
<div class="authenticator-field">
|
|
540
|
+
<label class="authenticator-option-label">
|
|
541
|
+
${i18nString(UIStrings.supportsHmacSecretMc)}
|
|
542
|
+
</label>
|
|
543
|
+
<div class="authenticator-field-value">
|
|
544
|
+
${options.hasHmacSecretMc ? i18nString(UIStrings.yes) : i18nString(UIStrings.no)}
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
495
547
|
</div>`;
|
|
496
548
|
// clang-format on
|
|
497
549
|
}
|
|
@@ -1779,20 +1779,21 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1779
1779
|
return this.#treeOutline;
|
|
1780
1780
|
}
|
|
1781
1781
|
|
|
1782
|
-
#getParentTreeElement(element: HTMLLIElement|TreeElementWrapper):
|
|
1782
|
+
#getParentTreeElement(element: HTMLLIElement|TreeElementWrapper):
|
|
1783
|
+
{treeElement: TreeElement, expanded: boolean, classes: DOMTokenList}|null {
|
|
1783
1784
|
const subtreeRoot = element.parentElement;
|
|
1784
1785
|
if (!(subtreeRoot instanceof HTMLUListElement)) {
|
|
1785
1786
|
return null;
|
|
1786
1787
|
}
|
|
1787
1788
|
if (subtreeRoot.role === 'tree') {
|
|
1788
|
-
return {treeElement: this.#treeOutline.rootElement(), expanded: false};
|
|
1789
|
+
return {treeElement: this.#treeOutline.rootElement(), expanded: false, classes: subtreeRoot.classList};
|
|
1789
1790
|
}
|
|
1790
1791
|
if (subtreeRoot.role !== 'group' || !subtreeRoot.parentElement) {
|
|
1791
1792
|
return null;
|
|
1792
1793
|
}
|
|
1793
1794
|
const treeElement = TreeViewTreeElement.get(subtreeRoot.parentElement);
|
|
1794
1795
|
const expanded = treeElement ? treeElement.expanded : hasBooleanAttribute(subtreeRoot.parentElement, 'open');
|
|
1795
|
-
return treeElement ? {expanded, treeElement} : null;
|
|
1796
|
+
return treeElement ? {expanded, treeElement, classes: subtreeRoot.classList} : null;
|
|
1796
1797
|
}
|
|
1797
1798
|
|
|
1798
1799
|
protected override updateNode(node: Node, attributeName: string|null): void {
|
|
@@ -1825,6 +1826,9 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1825
1826
|
if (!parent) {
|
|
1826
1827
|
continue;
|
|
1827
1828
|
}
|
|
1829
|
+
if (parent.treeElement.childCount() === 0) {
|
|
1830
|
+
parent.treeElement.childrenListElement.classList.add(...parent.classes.values());
|
|
1831
|
+
}
|
|
1828
1832
|
while (nextSibling && nextSibling.nodeType !== Node.ELEMENT_NODE) {
|
|
1829
1833
|
nextSibling = nextSibling.nextSibling;
|
|
1830
1834
|
}
|
|
@@ -1691,19 +1691,21 @@ export function createSVGChild<K extends keyof SVGElementTagNameMap>(
|
|
|
1691
1691
|
return child;
|
|
1692
1692
|
}
|
|
1693
1693
|
|
|
1694
|
-
export const enclosingNodeOrSelfWithNodeNameInArray =
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1694
|
+
export const enclosingNodeOrSelfWithNodeNameInArray =
|
|
1695
|
+
<T extends keyof HTMLElementTagNameMap>(initialNode: Node, nameArray: T[]): HTMLElementTagNameMap[T]|null => {
|
|
1696
|
+
let node: (Node|null)|Node = initialNode;
|
|
1697
|
+
for (; node && node !== initialNode.ownerDocument; node = node.parentNodeOrShadowHost()) {
|
|
1698
|
+
for (let i = 0; i < nameArray.length; ++i) {
|
|
1699
|
+
if (node.nodeName.toLowerCase() === nameArray[i].toLowerCase()) {
|
|
1700
|
+
return node as HTMLElementTagNameMap[T];
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1700
1703
|
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
return null;
|
|
1704
|
-
};
|
|
1704
|
+
return null;
|
|
1705
|
+
};
|
|
1705
1706
|
|
|
1706
|
-
export const enclosingNodeOrSelfWithNodeName = function
|
|
1707
|
+
export const enclosingNodeOrSelfWithNodeName = function<T extends keyof HTMLElementTagNameMap>(
|
|
1708
|
+
node: Node, nodeName: T): HTMLElementTagNameMap[T]|null {
|
|
1707
1709
|
return enclosingNodeOrSelfWithNodeNameInArray(node, [nodeName]);
|
|
1708
1710
|
};
|
|
1709
1711
|
|
|
@@ -129,6 +129,10 @@ function runNextUpdate(): void {
|
|
|
129
129
|
const controller = new AbortController();
|
|
130
130
|
widget.addUpdateController(controller);
|
|
131
131
|
await widget.performUpdate(controller.signal);
|
|
132
|
+
} catch (e) {
|
|
133
|
+
if (e.name !== 'AbortError') {
|
|
134
|
+
throw e;
|
|
135
|
+
}
|
|
132
136
|
} finally {
|
|
133
137
|
resolve();
|
|
134
138
|
}
|
|
@@ -1055,6 +1059,7 @@ export class Widget {
|
|
|
1055
1059
|
}
|
|
1056
1060
|
|
|
1057
1061
|
addUpdateController(controller: AbortController): void {
|
|
1062
|
+
this.#updateController?.abort();
|
|
1058
1063
|
this.#updateController = controller;
|
|
1059
1064
|
}
|
|
1060
1065
|
|
|
@@ -2552,7 +2552,7 @@ export interface Parameters {
|
|
|
2552
2552
|
refreshCallback?: (() => void);
|
|
2553
2553
|
}
|
|
2554
2554
|
export interface ColumnDescriptor {
|
|
2555
|
-
id:
|
|
2555
|
+
id: string;
|
|
2556
2556
|
title?: Common.UIString.LocalizedString;
|
|
2557
2557
|
titleDOMFragment?: DocumentFragment|null;
|
|
2558
2558
|
sortable: boolean;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
6
|
-
|
|
6
|
+
import type * as Common from '../../../../core/common/common.js';
|
|
7
7
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
8
8
|
|
|
9
9
|
import {type ColumnDescriptor, type DataGridData, Events, type Parameters} from './DataGrid.js';
|
|
@@ -61,7 +61,7 @@ export class SortableDataGrid<T> extends ViewportDataGrid<SortableDataGridNode<T
|
|
|
61
61
|
const columns: ColumnDescriptor[] = [];
|
|
62
62
|
for (let i = 0; i < columnNames.length; ++i) {
|
|
63
63
|
const id = String(i);
|
|
64
|
-
columns.push(({id, title: columnNames[i], sortable: true}
|
|
64
|
+
columns.push(({id, title: columnNames[i] as Common.UIString.LocalizedString, sortable: true}));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
const nodes = [];
|