chrome-devtools-frontend 1.0.1603822 → 1.0.1604514
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/front_end/core/host/AidaClient.ts +39 -462
- package/front_end/core/host/AidaClientTypes.ts +470 -0
- package/front_end/core/host/AidaGcaTranslation.ts +225 -122
- package/front_end/core/host/GcaTypes.ts +107 -155
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +24 -22
- package/front_end/core/sdk/EmulationModel.ts +21 -23
- package/front_end/core/sdk/HeapProfilerModel.ts +4 -7
- package/front_end/core/sdk/NetworkManager.ts +35 -28
- package/front_end/core/sdk/OverlayModel.ts +10 -10
- package/front_end/core/sdk/PreloadingModel.ts +3 -4
- package/front_end/core/sdk/ServiceWorkerManager.ts +2 -3
- package/front_end/core/sdk/SourceMapScopesInfo.ts +93 -63
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -3
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +22 -48
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +1 -1
- package/front_end/generated/InspectorBackendCommands.ts +4 -0
- package/front_end/generated/SupportedCSSProperties.js +68 -2
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +14 -0
- package/front_end/generated/protocol.ts +22 -0
- package/front_end/models/bindings/TempFile.ts +1 -4
- package/front_end/models/extensions/ExtensionAPI.ts +1 -1
- package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +34 -47
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -6
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +88 -19
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +14 -20
- package/front_end/panels/ai_assistance/components/ChatView.ts +3 -2
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +35 -7
- package/front_end/panels/elements/ElementsTreeElement.ts +91 -13
- package/front_end/panels/elements/elementsTreeOutline.css +18 -0
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +15 -19
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +4 -2
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +12 -16
- package/front_end/panels/profiler/HeapSnapshotView.ts +3 -10
- package/front_end/panels/profiler/ProfilesPanel.ts +5 -7
- package/front_end/panels/sensors/SensorsView.ts +0 -2
- package/front_end/panels/timeline/TimelinePanel.ts +1 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +35 -63
- package/front_end/panels/timeline/components/liveMetricsView.css +4 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/package.json +1 -1
|
@@ -21,8 +21,6 @@ import * as EmulationModel from '../../../models/emulation/emulation.js';
|
|
|
21
21
|
import * as LiveMetrics from '../../../models/live-metrics/live-metrics.js';
|
|
22
22
|
import * as Trace from '../../../models/trace/trace.js';
|
|
23
23
|
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
24
|
-
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
|
25
|
-
import * as LegacyWrapper from '../../../ui/components/legacy_wrapper/legacy_wrapper.js';
|
|
26
24
|
import type * as Menus from '../../../ui/components/menus/menus.js';
|
|
27
25
|
import * as RenderCoordinator from '../../../ui/components/render_coordinator/render_coordinator.js';
|
|
28
26
|
import type * as Settings from '../../../ui/components/settings/settings.js';
|
|
@@ -40,7 +38,7 @@ import metricValueStyles from './metricValueStyles.css.js';
|
|
|
40
38
|
import {CLS_THRESHOLDS, INP_THRESHOLDS, renderMetricValue} from './Utils.js';
|
|
41
39
|
|
|
42
40
|
const {html, nothing} = Lit;
|
|
43
|
-
const {widget} = UI.Widget;
|
|
41
|
+
const {widget, widgetRef} = UI.Widget;
|
|
44
42
|
|
|
45
43
|
type DeviceOption = CrUXManager.DeviceScope|'AUTO';
|
|
46
44
|
|
|
@@ -305,9 +303,7 @@ const UIStrings = {
|
|
|
305
303
|
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/LiveMetricsView.ts', UIStrings);
|
|
306
304
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
307
305
|
|
|
308
|
-
export class LiveMetricsView extends
|
|
309
|
-
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
310
|
-
|
|
306
|
+
export class LiveMetricsView extends UI.Widget.Widget {
|
|
311
307
|
isNode = Root.Runtime.Runtime.isNode();
|
|
312
308
|
|
|
313
309
|
#lcpValue?: LiveMetrics.LcpValue;
|
|
@@ -328,8 +324,8 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
328
324
|
#listIsScrolling = false;
|
|
329
325
|
#deviceModeModel = EmulationModel.DeviceModeModel.DeviceModeModel.tryInstance();
|
|
330
326
|
|
|
331
|
-
constructor() {
|
|
332
|
-
super();
|
|
327
|
+
constructor(element?: HTMLElement) {
|
|
328
|
+
super(element, {useShadowDom: true});
|
|
333
329
|
|
|
334
330
|
this.#toggleRecordAction = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.toggle-recording');
|
|
335
331
|
this.#recordReloadAction = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.record-reload');
|
|
@@ -346,14 +342,14 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
346
342
|
const hasNewInteraction = this.#interactions.size < event.data.interactions.size;
|
|
347
343
|
this.#interactions = new Map(event.data.interactions);
|
|
348
344
|
|
|
349
|
-
|
|
345
|
+
this.requestUpdate();
|
|
350
346
|
|
|
351
347
|
if (hasNewInteraction && this.#interactionsListEl) {
|
|
352
|
-
this.#keepScrolledToBottom(
|
|
348
|
+
this.#keepScrolledToBottom(this.updateComplete, this.#interactionsListEl);
|
|
353
349
|
}
|
|
354
350
|
|
|
355
351
|
if (hasNewLS && this.#layoutShiftsListEl) {
|
|
356
|
-
this.#keepScrolledToBottom(
|
|
352
|
+
this.#keepScrolledToBottom(this.updateComplete, this.#layoutShiftsListEl);
|
|
357
353
|
}
|
|
358
354
|
}
|
|
359
355
|
|
|
@@ -384,21 +380,22 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
384
380
|
}
|
|
385
381
|
|
|
386
382
|
#onFieldDataChanged(): void {
|
|
387
|
-
|
|
383
|
+
this.requestUpdate();
|
|
388
384
|
}
|
|
389
385
|
|
|
390
386
|
#onEmulationChanged(): void {
|
|
391
|
-
|
|
387
|
+
this.requestUpdate();
|
|
392
388
|
}
|
|
393
389
|
|
|
394
390
|
async #refreshFieldDataForCurrentPage(): Promise<void> {
|
|
395
391
|
if (!this.isNode) {
|
|
396
392
|
await this.#cruxManager.refresh();
|
|
397
393
|
}
|
|
398
|
-
|
|
394
|
+
this.requestUpdate();
|
|
399
395
|
}
|
|
400
396
|
|
|
401
|
-
|
|
397
|
+
override wasShown(): void {
|
|
398
|
+
super.wasShown();
|
|
402
399
|
const liveMetrics = LiveMetrics.LiveMetrics.instance();
|
|
403
400
|
liveMetrics.addEventListener(LiveMetrics.Events.STATUS, this.#onMetricStatus, this);
|
|
404
401
|
|
|
@@ -417,10 +414,11 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
417
414
|
this.#inpValue = liveMetrics.inpValue;
|
|
418
415
|
this.#interactions = liveMetrics.interactions;
|
|
419
416
|
this.#layoutShifts = liveMetrics.layoutShifts;
|
|
420
|
-
|
|
417
|
+
this.requestUpdate();
|
|
421
418
|
}
|
|
422
419
|
|
|
423
|
-
|
|
420
|
+
override willHide(): void {
|
|
421
|
+
super.willHide();
|
|
424
422
|
LiveMetrics.LiveMetrics.instance().removeEventListener(LiveMetrics.Events.STATUS, this.#onMetricStatus, this);
|
|
425
423
|
|
|
426
424
|
const cruxManager = CrUXManager.CrUXManager.instance();
|
|
@@ -683,7 +681,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
683
681
|
} else {
|
|
684
682
|
this.#cruxManager.fieldPageScope = 'origin';
|
|
685
683
|
}
|
|
686
|
-
|
|
684
|
+
this.requestUpdate();
|
|
687
685
|
}
|
|
688
686
|
|
|
689
687
|
#renderPageScopeSetting(): Lit.LitTemplate {
|
|
@@ -768,7 +766,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
768
766
|
|
|
769
767
|
#onDeviceOptionMenuItemSelected(event: Menus.SelectMenu.SelectMenuItemSelectedEvent): void {
|
|
770
768
|
this.#cruxManager.fieldDeviceOption = event.itemValue as DeviceOption;
|
|
771
|
-
|
|
769
|
+
this.requestUpdate();
|
|
772
770
|
}
|
|
773
771
|
|
|
774
772
|
#renderDeviceScopeSetting(): Lit.LitTemplate {
|
|
@@ -922,23 +920,21 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
922
920
|
class="logs-section"
|
|
923
921
|
aria-label=${i18nString(UIStrings.eventLogs)}
|
|
924
922
|
>
|
|
925
|
-
<devtools-
|
|
926
|
-
${
|
|
927
|
-
|
|
928
|
-
this.#logsEl = el as LiveMetricsLogs;
|
|
929
|
-
}
|
|
923
|
+
<devtools-widget ${widget(LiveMetricsLogs)}
|
|
924
|
+
${widgetRef(LiveMetricsLogs, widget => {
|
|
925
|
+
this.#logsEl = widget;
|
|
930
926
|
})}
|
|
931
927
|
>
|
|
932
928
|
${this.#renderInteractionsLog()}
|
|
933
929
|
${this.#renderLayoutShiftsLog()}
|
|
934
|
-
</devtools-
|
|
930
|
+
</devtools-widget>
|
|
935
931
|
</section>
|
|
936
932
|
`;
|
|
937
933
|
// clang-format on
|
|
938
934
|
}
|
|
939
935
|
|
|
940
936
|
async #revealInteraction(interaction: LiveMetrics.Interaction): Promise<void> {
|
|
941
|
-
const interactionEl = this
|
|
937
|
+
const interactionEl = this.contentElement.querySelector<HTMLElement>('#' + CSS.escape(interaction.interactionId));
|
|
942
938
|
if (!interactionEl || !this.#logsEl) {
|
|
943
939
|
return;
|
|
944
940
|
}
|
|
@@ -1052,7 +1048,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
1052
1048
|
|
|
1053
1049
|
const layoutShiftEls: HTMLElement[] = [];
|
|
1054
1050
|
for (const shiftId of clusterIds) {
|
|
1055
|
-
const layoutShiftEl = this
|
|
1051
|
+
const layoutShiftEl = this.contentElement.querySelector<HTMLElement>('#' + CSS.escape(shiftId));
|
|
1056
1052
|
if (layoutShiftEl) {
|
|
1057
1053
|
layoutShiftEls.push(layoutShiftEl);
|
|
1058
1054
|
}
|
|
@@ -1136,9 +1132,9 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
1136
1132
|
`;
|
|
1137
1133
|
}
|
|
1138
1134
|
|
|
1139
|
-
|
|
1135
|
+
override performUpdate(): void {
|
|
1140
1136
|
if (this.isNode) {
|
|
1141
|
-
Lit.render(this.#renderNodeView(), this
|
|
1137
|
+
Lit.render(this.#renderNodeView(), this.contentElement, {host: this});
|
|
1142
1138
|
return;
|
|
1143
1139
|
}
|
|
1144
1140
|
|
|
@@ -1205,33 +1201,25 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
1205
1201
|
</div>
|
|
1206
1202
|
</div>
|
|
1207
1203
|
`;
|
|
1208
|
-
Lit.render(output, this
|
|
1209
|
-
}
|
|
1204
|
+
Lit.render(output, this.contentElement, {host: this});
|
|
1205
|
+
}
|
|
1210
1206
|
// clang-format on
|
|
1211
1207
|
}
|
|
1212
1208
|
|
|
1213
|
-
class LiveMetricsLogs extends UI.Widget.
|
|
1214
|
-
#tabbedPane
|
|
1215
|
-
|
|
1216
|
-
constructor() {
|
|
1217
|
-
super();
|
|
1218
|
-
this.style.display = 'contents';
|
|
1219
|
-
}
|
|
1209
|
+
class LiveMetricsLogs extends UI.Widget.Widget {
|
|
1210
|
+
#tabbedPane: UI.TabbedPane.TabbedPane;
|
|
1220
1211
|
|
|
1221
1212
|
/**
|
|
1222
1213
|
* Returns `true` if selecting the tab was successful.
|
|
1223
1214
|
*/
|
|
1224
1215
|
selectTab(tabId: string): boolean {
|
|
1225
|
-
if (!this.#tabbedPane) {
|
|
1226
|
-
return false;
|
|
1227
|
-
}
|
|
1228
1216
|
return this.#tabbedPane.selectTab(tabId);
|
|
1229
1217
|
}
|
|
1230
1218
|
|
|
1231
1219
|
#clearCurrentLog(): void {
|
|
1232
1220
|
const liveMetrics = LiveMetrics.LiveMetrics.instance();
|
|
1233
1221
|
|
|
1234
|
-
switch (this.#tabbedPane
|
|
1222
|
+
switch (this.#tabbedPane.selectedTabId) {
|
|
1235
1223
|
case 'interactions':
|
|
1236
1224
|
liveMetrics.clearInteractions();
|
|
1237
1225
|
break;
|
|
@@ -1240,16 +1228,12 @@ class LiveMetricsLogs extends UI.Widget.WidgetElement<UI.Widget.Widget> {
|
|
|
1240
1228
|
break;
|
|
1241
1229
|
}
|
|
1242
1230
|
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
// of web component slots. Passing `this` into the container widget will make `this` the root element
|
|
1247
|
-
// of that widget.
|
|
1248
|
-
//
|
|
1231
|
+
constructor(element: HTMLElement) {
|
|
1232
|
+
super(element, {useShadowDom: true});
|
|
1233
|
+
this.element.style.display = 'contents';
|
|
1249
1234
|
// Any children of the root element `this` will be matched to the slots defined within the container
|
|
1250
1235
|
// widget's shadow DOM.
|
|
1251
|
-
|
|
1252
|
-
containerWidget.contentElement.style.display = 'contents';
|
|
1236
|
+
this.contentElement.style.display = 'contents';
|
|
1253
1237
|
|
|
1254
1238
|
this.#tabbedPane = new UI.TabbedPane.TabbedPane();
|
|
1255
1239
|
|
|
@@ -1273,18 +1257,6 @@ class LiveMetricsLogs extends UI.Widget.WidgetElement<UI.Widget.Widget> {
|
|
|
1273
1257
|
i18nString(UIStrings.clearCurrentLog), 'clear', undefined, 'timeline.landing.clear-log');
|
|
1274
1258
|
clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, this.#clearCurrentLog, this);
|
|
1275
1259
|
this.#tabbedPane.rightToolbar().appendToolbarItem(clearButton);
|
|
1276
|
-
this.#tabbedPane.show(
|
|
1277
|
-
|
|
1278
|
-
return containerWidget;
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
customElements.define('devtools-live-metrics-view', LiveMetricsView);
|
|
1283
|
-
customElements.define('devtools-live-metrics-logs', LiveMetricsLogs);
|
|
1284
|
-
|
|
1285
|
-
declare global {
|
|
1286
|
-
interface HTMLElementTagNameMap {
|
|
1287
|
-
'devtools-live-metrics-view': LiveMetricsView;
|
|
1288
|
-
'devtools-live-metrics-logs': LiveMetricsLogs;
|
|
1260
|
+
this.#tabbedPane.show(this.contentElement);
|
|
1289
1261
|
}
|
|
1290
1262
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: Internal
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: c9e49d7cdbbc11a6a70bb2573f5a18cb23c1789b
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
package/package.json
CHANGED