chrome-devtools-frontend 1.0.1031822 → 1.0.1032471
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 +1 -0
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +20 -5
- package/front_end/core/i18n/locales/en-XL.json +20 -5
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/entrypoints/main/MainImpl.ts +3 -0
- package/front_end/generated/InspectorBackendCommands.js +3 -3
- package/front_end/generated/SupportedCSSProperties.js +2 -4
- package/front_end/generated/protocol.ts +2 -1
- package/front_end/models/issues_manager/DeprecationIssue.ts +3 -1
- package/front_end/models/text_utils/CodeMirrorUtils.ts +1 -2
- package/front_end/models/timeline_model/TimelineModel.ts +52 -0
- package/front_end/panels/elements/CSSRuleValidator.ts +12 -13
- package/front_end/panels/network/NetworkItemView.ts +15 -2
- package/front_end/panels/network/components/RequestHeadersView.css +13 -0
- package/front_end/panels/network/components/RequestHeadersView.ts +59 -57
- package/front_end/panels/sources/BreakpointsSidebarPane.ts +37 -0
- package/front_end/panels/sources/sources-meta.ts +3 -0
- package/front_end/panels/sources/sources.ts +2 -0
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +21 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +16 -0
- package/front_end/third_party/codemirror.next/bundle.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/json.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +342 -1314
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +21 -21
- package/front_end/ui/legacy/InspectorView.ts +6 -0
- package/package.json +1 -1
@@ -12,6 +12,7 @@ import * as Protocol from '../../../generated/protocol.js';
|
|
12
12
|
import * as IssuesManager from '../../../models/issues_manager/issues_manager.js';
|
13
13
|
import * as Persistence from '../../../models/persistence/persistence.js';
|
14
14
|
import * as Workspace from '../../../models/workspace/workspace.js';
|
15
|
+
import * as NetworkForward from '../../../panels/network/forward/forward.js';
|
15
16
|
import * as ClientVariations from '../../../third_party/chromium/client-variations/client-variations.js';
|
16
17
|
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
17
18
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
@@ -199,10 +200,18 @@ export class RequestHeadersView extends UI.Widget.VBox {
|
|
199
200
|
request: this.#request,
|
200
201
|
};
|
201
202
|
}
|
203
|
+
|
204
|
+
revealHeader(section: NetworkForward.UIRequestLocation.UIHeaderSection, header?: string): void {
|
205
|
+
this.#headersView.data = {
|
206
|
+
request: this.#request,
|
207
|
+
toReveal: {section, header: header},
|
208
|
+
};
|
209
|
+
}
|
202
210
|
}
|
203
211
|
|
204
212
|
export interface RequestHeadersComponentData {
|
205
213
|
request: SDK.NetworkRequest.NetworkRequest;
|
214
|
+
toReveal?: {section: NetworkForward.UIRequestLocation.UIHeaderSection, header?: string};
|
206
215
|
}
|
207
216
|
|
208
217
|
export class RequestHeadersComponent extends HTMLElement {
|
@@ -213,10 +222,12 @@ export class RequestHeadersComponent extends HTMLElement {
|
|
213
222
|
#showRequestHeadersText = false;
|
214
223
|
#showResponseHeadersTextFull = false;
|
215
224
|
#showRequestHeadersTextFull = false;
|
225
|
+
#toReveal?: {section: NetworkForward.UIRequestLocation.UIHeaderSection, header?: string} = undefined;
|
216
226
|
readonly #workspace = Workspace.Workspace.WorkspaceImpl.instance();
|
217
227
|
|
218
228
|
set data(data: RequestHeadersComponentData) {
|
219
229
|
this.#request = data.request;
|
230
|
+
this.#toReveal = data.toReveal;
|
220
231
|
this.#render();
|
221
232
|
}
|
222
233
|
|
@@ -326,12 +337,13 @@ export class RequestHeadersComponent extends HTMLElement {
|
|
326
337
|
headerCount: this.#request.sortedResponseHeaders.length,
|
327
338
|
checked: this.#request.responseHeadersText ? this.#showResponseHeadersText : undefined,
|
328
339
|
additionalContent: this.#renderHeaderOverridesLink(),
|
340
|
+
forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.Response,
|
329
341
|
} as CategoryData}
|
330
342
|
aria-label=${i18nString(UIStrings.responseHeaders)}
|
331
343
|
>
|
332
344
|
${this.#showResponseHeadersText ?
|
333
345
|
this.#renderRawHeaders(this.#request.responseHeadersText, true) : html`
|
334
|
-
${mergedHeaders.map(header => this.#renderHeader(header))}
|
346
|
+
${mergedHeaders.map(header => this.#renderHeader(header, NetworkForward.UIRequestLocation.UIHeaderSection.Response))}
|
335
347
|
`}
|
336
348
|
</${Category.litTagName}>
|
337
349
|
`;
|
@@ -418,13 +430,14 @@ export class RequestHeadersComponent extends HTMLElement {
|
|
418
430
|
title: i18nString(UIStrings.requestHeaders),
|
419
431
|
headerCount: this.#request.requestHeaders().length,
|
420
432
|
checked: requestHeadersText? this.#showRequestHeadersText : undefined,
|
433
|
+
forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.Request,
|
421
434
|
} as CategoryData}
|
422
435
|
aria-label=${i18nString(UIStrings.requestHeaders)}
|
423
436
|
>
|
424
437
|
${(this.#showRequestHeadersText && requestHeadersText) ?
|
425
438
|
this.#renderRawHeaders(requestHeadersText, false) : html`
|
426
439
|
${this.#maybeRenderProvisionalHeadersWarning()}
|
427
|
-
${headers.map(header => this.#renderHeader({...header, headerNotSet: false}))}
|
440
|
+
${headers.map(header => this.#renderHeader({...header, headerNotSet: false}, NetworkForward.UIRequestLocation.UIHeaderSection.Request))}
|
428
441
|
`}
|
429
442
|
</${Category.litTagName}>
|
430
443
|
`;
|
@@ -464,11 +477,14 @@ export class RequestHeadersComponent extends HTMLElement {
|
|
464
477
|
// clang-format on
|
465
478
|
}
|
466
479
|
|
467
|
-
#renderHeader(header: HeaderDescriptor
|
480
|
+
#renderHeader(header: HeaderDescriptor, section: NetworkForward.UIRequestLocation.UIHeaderSection):
|
481
|
+
LitHtml.TemplateResult {
|
482
|
+
const isHighlighted =
|
483
|
+
section === this.#toReveal?.section && header.name.toUpperCase() === this.#toReveal?.header?.toUpperCase();
|
468
484
|
// Disabled until https://crbug.com/1079231 is fixed.
|
469
485
|
// clang-format off
|
470
486
|
return html`
|
471
|
-
<div class="row">
|
487
|
+
<div class="row ${isHighlighted ? 'header-highlight' : ''}">
|
472
488
|
<div class="header-name">
|
473
489
|
${header.headerNotSet ?
|
474
490
|
html`<div class="header-badge header-badge-text">${i18n.i18n.lockedString('not-set')}</div>` :
|
@@ -637,87 +653,70 @@ export class RequestHeadersComponent extends HTMLElement {
|
|
637
653
|
return LitHtml.nothing;
|
638
654
|
}
|
639
655
|
|
640
|
-
|
656
|
+
const statusClasses = [];
|
641
657
|
if (this.#request.statusCode < 300 || this.#request.statusCode === 304) {
|
642
|
-
|
658
|
+
statusClasses.push('green-circle');
|
643
659
|
} else if (this.#request.statusCode < 400) {
|
644
|
-
|
660
|
+
statusClasses.push('yellow-circle');
|
661
|
+
} else {
|
662
|
+
statusClasses.push('red-circle');
|
645
663
|
}
|
646
664
|
|
647
665
|
let statusText = this.#request.statusCode + ' ' + this.#request.statusText;
|
648
|
-
let statusTextHasComment = false;
|
649
666
|
if (this.#request.cachedInMemory()) {
|
650
667
|
statusText += ' ' + i18nString(UIStrings.fromMemoryCache);
|
651
|
-
|
668
|
+
statusClasses.push('status-with-comment');
|
652
669
|
} else if (this.#request.fetchedViaServiceWorker) {
|
653
670
|
statusText += ' ' + i18nString(UIStrings.fromServiceWorker);
|
654
|
-
|
671
|
+
statusClasses.push('status-with-comment');
|
655
672
|
} else if (this.#request.redirectSourceSignedExchangeInfoHasNoErrors()) {
|
656
673
|
statusText += ' ' + i18nString(UIStrings.fromSignedexchange);
|
657
|
-
|
674
|
+
statusClasses.push('status-with-comment');
|
658
675
|
} else if (this.#request.webBundleInnerRequestInfo()) {
|
659
676
|
statusText += ' ' + i18nString(UIStrings.fromWebBundle);
|
660
|
-
|
677
|
+
statusClasses.push('status-with-comment');
|
661
678
|
} else if (this.#request.fromPrefetchCache()) {
|
662
679
|
statusText += ' ' + i18nString(UIStrings.fromPrefetchCache);
|
663
|
-
|
680
|
+
statusClasses.push('status-with-comment');
|
664
681
|
} else if (this.#request.cached()) {
|
665
682
|
statusText += ' ' + i18nString(UIStrings.fromDiskCache);
|
666
|
-
|
683
|
+
statusClasses.push('status-with-comment');
|
667
684
|
}
|
668
685
|
|
669
686
|
// Disabled until https://crbug.com/1079231 is fixed.
|
670
687
|
// clang-format off
|
671
688
|
return html`
|
672
689
|
<${Category.litTagName}
|
673
|
-
.data=${{
|
690
|
+
.data=${{
|
691
|
+
name: 'general',
|
692
|
+
title: i18nString(UIStrings.general),
|
693
|
+
forceOpen: this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.General,
|
694
|
+
} as CategoryData}
|
674
695
|
aria-label=${i18nString(UIStrings.general)}
|
675
696
|
>
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
>${this.#request.url()}</div>
|
682
|
-
</div>
|
683
|
-
${this.#request.statusCode? html`
|
684
|
-
<div class="row">
|
685
|
-
<div class="header-name">${i18nString(UIStrings.requestMethod)}:</div>
|
686
|
-
<div
|
687
|
-
class="header-value"
|
688
|
-
@copy=${():void => Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue)}
|
689
|
-
>${this.#request.requestMethod}</div>
|
690
|
-
</div>
|
691
|
-
<div class="row">
|
692
|
-
<div class="header-name">${i18nString(UIStrings.statusCode)}:</div>
|
693
|
-
<div
|
694
|
-
class="header-value ${coloredCircleClassName} ${statusTextHasComment ? 'status-with-comment' : ''}"
|
695
|
-
@copy=${():void => Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue)}
|
696
|
-
>${statusText}</div>
|
697
|
-
</div>
|
698
|
-
` : ''}
|
699
|
-
${this.#request.remoteAddress()? html`
|
700
|
-
<div class="row">
|
701
|
-
<div class="header-name">${i18nString(UIStrings.remoteAddress)}:</div>
|
702
|
-
<div
|
703
|
-
class="header-value"
|
704
|
-
@copy=${():void => Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue)}
|
705
|
-
>${this.#request.remoteAddress()}</div>
|
706
|
-
</div>
|
707
|
-
` : ''}
|
708
|
-
${this.#request.referrerPolicy()? html`
|
709
|
-
<div class="row">
|
710
|
-
<div class="header-name">${i18nString(UIStrings.referrerPolicy)}:</div>
|
711
|
-
<div
|
712
|
-
class="header-value"
|
713
|
-
@copy=${():void => Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue)}
|
714
|
-
>${this.#request.referrerPolicy()}</div>
|
715
|
-
</div>
|
716
|
-
` : ''}
|
697
|
+
${this.#renderGeneralRow(i18nString(UIStrings.requestUrl), this.#request.url())}
|
698
|
+
${this.#request.statusCode? this.#renderGeneralRow(i18nString(UIStrings.requestMethod), this.#request.requestMethod) : LitHtml.nothing}
|
699
|
+
${this.#request.statusCode? this.#renderGeneralRow(i18nString(UIStrings.statusCode), statusText, statusClasses) : LitHtml.nothing}
|
700
|
+
${this.#request.remoteAddress()? this.#renderGeneralRow(i18nString(UIStrings.remoteAddress), this.#request.remoteAddress()) : LitHtml.nothing}
|
701
|
+
${this.#request.referrerPolicy()? this.#renderGeneralRow(i18nString(UIStrings.referrerPolicy), String(this.#request.referrerPolicy())) : LitHtml.nothing}
|
717
702
|
</${Category.litTagName}>
|
718
703
|
`;
|
719
704
|
// clang-format on
|
720
705
|
}
|
706
|
+
|
707
|
+
#renderGeneralRow(name: Common.UIString.LocalizedString, value: string, classNames?: string[]): LitHtml.LitTemplate {
|
708
|
+
const isHighlighted = this.#toReveal?.section === NetworkForward.UIRequestLocation.UIHeaderSection.General &&
|
709
|
+
name.toUpperCase() === this.#toReveal?.header?.toUpperCase();
|
710
|
+
return html`
|
711
|
+
<div class="row ${isHighlighted ? 'header-highlight' : ''}">
|
712
|
+
<div class="header-name">${name}:</div>
|
713
|
+
<div
|
714
|
+
class="header-value ${classNames?.join(' ')}"
|
715
|
+
@copy=${(): void => Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue)}
|
716
|
+
>${value}</div>
|
717
|
+
</div>
|
718
|
+
`;
|
719
|
+
}
|
721
720
|
}
|
722
721
|
|
723
722
|
export class ToggleRawHeadersEvent extends Event {
|
@@ -734,6 +733,7 @@ export interface CategoryData {
|
|
734
733
|
headerCount?: number;
|
735
734
|
checked?: boolean;
|
736
735
|
additionalContent?: LitHtml.LitTemplate;
|
736
|
+
forceOpen?: boolean;
|
737
737
|
}
|
738
738
|
|
739
739
|
export class Category extends HTMLElement {
|
@@ -744,6 +744,7 @@ export class Category extends HTMLElement {
|
|
744
744
|
#headerCount?: number = undefined;
|
745
745
|
#checked: boolean|undefined = undefined;
|
746
746
|
#additionalContent: LitHtml.LitTemplate|undefined = undefined;
|
747
|
+
#forceOpen: boolean|undefined = undefined;
|
747
748
|
|
748
749
|
connectedCallback(): void {
|
749
750
|
this.#shadow.adoptedStyleSheets = [requestHeadersViewStyles, Input.checkboxStyles];
|
@@ -756,6 +757,7 @@ export class Category extends HTMLElement {
|
|
756
757
|
this.#headerCount = data.headerCount;
|
757
758
|
this.#checked = data.checked;
|
758
759
|
this.#additionalContent = data.additionalContent;
|
760
|
+
this.#forceOpen = data.forceOpen;
|
759
761
|
this.#render();
|
760
762
|
}
|
761
763
|
|
@@ -764,7 +766,7 @@ export class Category extends HTMLElement {
|
|
764
766
|
}
|
765
767
|
|
766
768
|
#render(): void {
|
767
|
-
const isOpen = this.#expandedSetting ? this.#expandedSetting.get() : true;
|
769
|
+
const isOpen = (this.#expandedSetting ? this.#expandedSetting.get() : true) || this.#forceOpen;
|
768
770
|
// Disabled until https://crbug.com/1079231 is fixed.
|
769
771
|
// clang-format off
|
770
772
|
render(html`
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// Copyright (c) 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 * as i18n from '../../core/i18n/i18n.js';
|
6
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
7
|
+
|
8
|
+
const UIStrings = {
|
9
|
+
/**
|
10
|
+
*@description Text to indicate that there are no breakpoints
|
11
|
+
*/
|
12
|
+
noBreakpoints: 'No breakpoints',
|
13
|
+
};
|
14
|
+
|
15
|
+
const str_ = i18n.i18n.registerUIStrings('panels/sources/BreakpointsSidebarPane.ts', UIStrings);
|
16
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
17
|
+
|
18
|
+
let breakpointsSidebarPaneInstance: BreakpointsSidebarPane;
|
19
|
+
|
20
|
+
export class BreakpointsSidebarPane extends UI.ThrottledWidget.ThrottledWidget {
|
21
|
+
readonly #noBreakpointsView: HTMLElement;
|
22
|
+
|
23
|
+
static instance(): BreakpointsSidebarPane {
|
24
|
+
if (!breakpointsSidebarPaneInstance) {
|
25
|
+
breakpointsSidebarPaneInstance = new BreakpointsSidebarPane();
|
26
|
+
}
|
27
|
+
return breakpointsSidebarPaneInstance;
|
28
|
+
}
|
29
|
+
|
30
|
+
constructor() {
|
31
|
+
super(true);
|
32
|
+
|
33
|
+
this.#noBreakpointsView = this.contentElement.createChild('div', 'gray-info-message');
|
34
|
+
this.#noBreakpointsView.textContent = i18nString(UIStrings.noBreakpoints);
|
35
|
+
this.#noBreakpointsView.tabIndex = -1;
|
36
|
+
}
|
37
|
+
}
|
@@ -512,6 +512,9 @@ UI.ViewManager.registerViewExtension({
|
|
512
512
|
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
|
513
513
|
async loadView() {
|
514
514
|
const Sources = await loadSourcesModule();
|
515
|
+
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.BREAKPOINT_VIEW)) {
|
516
|
+
return Sources.BreakpointsSidebarPane.BreakpointsSidebarPane.instance();
|
517
|
+
}
|
515
518
|
return Sources.JavaScriptBreakpointsSidebarPane.JavaScriptBreakpointsSidebarPane.instance();
|
516
519
|
},
|
517
520
|
});
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as AddSourceMapURLDialog from './AddSourceMapURLDialog.js';
|
6
6
|
import * as BreakpointEditDialog from './BreakpointEditDialog.js';
|
7
|
+
import * as BreakpointsSidebarPane from './BreakpointsSidebarPane.js';
|
7
8
|
import * as CallStackSidebarPane from './CallStackSidebarPane.js';
|
8
9
|
import * as CoveragePlugin from './CoveragePlugin.js';
|
9
10
|
import * as DebuggerPausedMessage from './DebuggerPausedMessage.js';
|
@@ -36,6 +37,7 @@ import * as WatchExpressionsSidebarPane from './WatchExpressionsSidebarPane.js';
|
|
36
37
|
export {
|
37
38
|
AddSourceMapURLDialog,
|
38
39
|
BreakpointEditDialog,
|
40
|
+
BreakpointsSidebarPane,
|
39
41
|
CallStackSidebarPane,
|
40
42
|
CoveragePlugin,
|
41
43
|
DebuggerPausedMessage,
|
@@ -58,6 +58,10 @@ const UIStrings = {
|
|
58
58
|
*/
|
59
59
|
animation: 'Animation',
|
60
60
|
/**
|
61
|
+
*@description Text that refers to the interactions on the page shown in the timeline
|
62
|
+
*/
|
63
|
+
userInteractions: 'Interactions',
|
64
|
+
/**
|
61
65
|
*@description Text in Timeline Flame Chart Data Provider of the Performance panel
|
62
66
|
*/
|
63
67
|
timings: 'Timings',
|
@@ -175,6 +179,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
175
179
|
private readonly timingsHeader: PerfUI.FlameChart.GroupStyle;
|
176
180
|
private readonly screenshotsHeader: PerfUI.FlameChart.GroupStyle;
|
177
181
|
private readonly animationsHeader: PerfUI.FlameChart.GroupStyle;
|
182
|
+
private readonly userInteractionsHeader: PerfUI.FlameChart.GroupStyle;
|
178
183
|
private readonly experienceHeader: PerfUI.FlameChart.GroupStyle;
|
179
184
|
private readonly flowEventIndexById: Map<string, number>;
|
180
185
|
private entryData!: TimelineFlameChartEntry[];
|
@@ -235,6 +240,8 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
235
240
|
this.screenshotsHeader =
|
236
241
|
this.buildGroupStyle({useFirstLineForOverview: true, nestingLevel: 1, collapsible: false, itemsHeight: 150});
|
237
242
|
this.animationsHeader = this.buildGroupStyle({useFirstLineForOverview: false});
|
243
|
+
this.userInteractionsHeader =
|
244
|
+
this.buildGroupStyle({shareHeaderLine: false, useFirstLineForOverview: true, collapsible: false});
|
238
245
|
this.experienceHeader = this.buildGroupStyle({collapsible: false});
|
239
246
|
|
240
247
|
ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {
|
@@ -247,6 +254,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
247
254
|
this.timingsHeader,
|
248
255
|
this.screenshotsHeader,
|
249
256
|
this.animationsHeader,
|
257
|
+
this.userInteractionsHeader,
|
250
258
|
this.experienceHeader,
|
251
259
|
];
|
252
260
|
for (const header of headers) {
|
@@ -417,11 +425,13 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
417
425
|
|
418
426
|
const eventEntryType = EntryType.Event;
|
419
427
|
|
420
|
-
const weight = (track: TimelineModel.TimelineModel.Track): 1|2|3|4|5|6|7|8|9|10|- 1 => {
|
428
|
+
const weight = (track: TimelineModel.TimelineModel.Track): 0|1|2|3|4|5|6|7|8|9|10|- 1 => {
|
421
429
|
switch (track.type) {
|
422
430
|
case TimelineModel.TimelineModel.TrackType.Animation:
|
423
|
-
return
|
431
|
+
return 0;
|
424
432
|
case TimelineModel.TimelineModel.TrackType.Timings:
|
433
|
+
return 1;
|
434
|
+
case TimelineModel.TimelineModel.TrackType.UserInteractions:
|
425
435
|
return 2;
|
426
436
|
case TimelineModel.TimelineModel.TrackType.Console:
|
427
437
|
return 3;
|
@@ -451,6 +461,12 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
451
461
|
let rasterCount = 0;
|
452
462
|
for (const track of tracks) {
|
453
463
|
switch (track.type) {
|
464
|
+
case TimelineModel.TimelineModel.TrackType.UserInteractions: {
|
465
|
+
this.appendAsyncEventsGroup(
|
466
|
+
track, i18nString(UIStrings.userInteractions), track.asyncEvents, this.userInteractionsHeader,
|
467
|
+
eventEntryType, false);
|
468
|
+
break;
|
469
|
+
}
|
454
470
|
case TimelineModel.TimelineModel.TrackType.Animation: {
|
455
471
|
this.appendAsyncEventsGroup(
|
456
472
|
track, i18nString(UIStrings.animation), track.asyncEvents, this.animationsHeader, eventEntryType,
|
@@ -1048,6 +1064,9 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
1048
1064
|
if (!SDK.TracingModel.TracingModel.isAsyncPhase(event.phase) && this.colorForEvent) {
|
1049
1065
|
return this.colorForEvent(event);
|
1050
1066
|
}
|
1067
|
+
if (this.model.isEventTimingInteractionEvent(event)) {
|
1068
|
+
return this.consoleColorGenerator.colorForID(event.args.data.type + ':' + event.args.data.interactionId);
|
1069
|
+
}
|
1051
1070
|
if (event.hasCategory(TimelineModel.TimelineModel.TimelineModelImpl.Category.Console) ||
|
1052
1071
|
event.hasCategory(TimelineModel.TimelineModel.TimelineModelImpl.Category.UserTiming)) {
|
1053
1072
|
return this.consoleColorGenerator.colorForID(event.name);
|
@@ -467,6 +467,10 @@ const UIStrings = {
|
|
467
467
|
*/
|
468
468
|
layoutShift: 'Layout Shift',
|
469
469
|
/**
|
470
|
+
*@description Text in Timeline for an Event Timing record
|
471
|
+
*/
|
472
|
+
eventTiming: 'Event Timing',
|
473
|
+
/**
|
470
474
|
*@description Text in Timeline UIUtils of the Performance panel
|
471
475
|
*/
|
472
476
|
keyCharacter: 'Key — Character',
|
@@ -579,6 +583,12 @@ const UIStrings = {
|
|
579
583
|
*/
|
580
584
|
parse: 'Parse',
|
581
585
|
/**
|
586
|
+
*@description Text shown when rendering an interaction/
|
587
|
+
*@example {click} PH1
|
588
|
+
*@example {1200} PH2
|
589
|
+
*/
|
590
|
+
interactionEvent: 'Interaction type:{PH1} id:{PH2}',
|
591
|
+
/**
|
582
592
|
*@description Text with two placeholders separated by a colon
|
583
593
|
*@example {Node removed} PH1
|
584
594
|
*@example {div#id1} PH2
|
@@ -1382,6 +1392,8 @@ export class TimelineUIUtils {
|
|
1382
1392
|
|
1383
1393
|
eventStyles[type.LayoutShift] = new TimelineRecordStyle(i18nString(UIStrings.layoutShift), experience);
|
1384
1394
|
|
1395
|
+
eventStyles[type.EventTiming] = new TimelineRecordStyle(UIStrings.eventTiming, experience);
|
1396
|
+
|
1385
1397
|
eventStylesMap = eventStyles;
|
1386
1398
|
return eventStyles;
|
1387
1399
|
}
|
@@ -1561,6 +1573,10 @@ export class TimelineUIUtils {
|
|
1561
1573
|
if (event.name === recordType.JSFrame) {
|
1562
1574
|
return TimelineUIUtils.frameDisplayName(eventData);
|
1563
1575
|
}
|
1576
|
+
|
1577
|
+
if (event.name === 'EventTiming' && event.args.data && event.args.data.interactionId) {
|
1578
|
+
return i18nString(UIStrings.interactionEvent, {PH1: event.args.data.type, PH2: event.args.data.interactionId});
|
1579
|
+
}
|
1564
1580
|
const title = TimelineUIUtils.eventStyle(event).title;
|
1565
1581
|
if (event.hasCategory(TimelineModel.TimelineModel.TimelineModelImpl.Category.Console)) {
|
1566
1582
|
return title;
|
@@ -78,7 +78,7 @@ export async function shell() {
|
|
78
78
|
return StreamLanguage.define((await import('@codemirror/legacy-modes/mode/shell')).shell);
|
79
79
|
}
|
80
80
|
export async function cssStreamParser() {
|
81
|
-
return (await import('@codemirror/legacy-modes/mode/css') as any).
|
81
|
+
return (await import('@codemirror/legacy-modes/mode/css') as any).sCSS;
|
82
82
|
}
|
83
83
|
export function wast() {
|
84
84
|
return import('@codemirror/lang-wast');
|