chrome-devtools-frontend 1.0.1001419 → 1.0.1002867
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 +5 -6
- package/front_end/core/common/ParsedURL.ts +3 -3
- package/front_end/core/host/InspectorFrontendHost.ts +30 -1
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +155 -11
- package/front_end/core/i18n/locales/en-XL.json +155 -11
- package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
- package/front_end/core/root/Runtime.ts +7 -3
- package/front_end/core/sdk/ServiceWorkerManager.ts +6 -5
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +14 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +491 -0
- package/front_end/entrypoints/formatter_worker/Substitute.ts +4 -440
- package/front_end/entrypoints/formatter_worker/formatter_worker.ts +2 -0
- package/front_end/entrypoints/main/MainImpl.ts +1 -0
- package/front_end/generated/InspectorBackendCommands.js +42 -12
- package/front_end/generated/SupportedCSSProperties.js +3 -5
- package/front_end/generated/protocol-mapping.d.ts +5 -1
- package/front_end/generated/protocol-proxy-api.d.ts +4 -1
- package/front_end/generated/protocol.ts +68 -14
- package/front_end/models/bindings/BreakpointManager.ts +12 -11
- package/front_end/models/bindings/CompilerScriptMapping.ts +1 -1
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +6 -34
- package/front_end/models/issues_manager/DeprecationIssue.ts +313 -399
- package/front_end/models/issues_manager/Issue.ts +8 -4
- package/front_end/models/issues_manager/descriptions/arInvalidHeader.md +3 -0
- package/front_end/models/persistence/PersistenceImpl.ts +2 -2
- package/front_end/models/timeline_model/TimelineModel.ts +0 -48
- package/front_end/panels/application/AppManifestView.ts +3 -3
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +3 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +11 -6
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +2 -2
- package/front_end/panels/application/BackgroundServiceView.ts +5 -4
- package/front_end/panels/application/ResourcesPanel.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +6 -3
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +3 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +19 -13
- package/front_end/panels/elements/StylesSidebarPane.ts +53 -0
- package/front_end/panels/elements/stylesSidebarPane.css +3 -0
- package/front_end/panels/issues/AffectedResourcesView.ts +4 -3
- package/front_end/panels/issues/AffectedSourcesView.ts +2 -1
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +9 -38
- package/front_end/panels/issues/IssueView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +6 -3
- package/front_end/panels/lighthouse/LighthouseReporterTypes.ts +2 -1
- package/front_end/panels/lighthouse/lighthousePanel.css +4 -0
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +2 -2
- package/front_end/panels/profiler/HeapSnapshotView.ts +2 -1
- package/front_end/panels/profiler/ProfileDataGrid.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +6 -5
- package/front_end/panels/settings/SettingsScreen.ts +2 -3
- package/front_end/panels/sources/DebuggerPlugin.ts +10 -9
- package/front_end/panels/sources/JavaScriptBreakpointsSidebarPane.ts +3 -3
- package/front_end/panels/timeline/PerformanceModel.ts +2 -6
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -14
- package/front_end/panels/timeline/TimelineUIUtils.ts +14 -12
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1036 -1088
- package/front_end/third_party/lighthouse/locales/en-US.json +244 -4
- package/front_end/third_party/lighthouse/locales/en-XL.json +244 -4
- package/front_end/third_party/lighthouse/report/bundle.d.ts +4 -22
- package/front_end/third_party/lighthouse/report/bundle.js +23 -366
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/ui/components/docs/linkifier/simple-url.ts +2 -1
- package/front_end/ui/components/docs/panel_feedback/basic.ts +3 -2
- package/front_end/ui/components/docs/panel_feedback/button.ts +2 -1
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +4 -3
- package/front_end/ui/components/linkifier/LinkifierUtils.ts +2 -3
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +4 -6
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +5 -4
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +3 -3
- package/front_end/ui/components/text_editor/javascript.ts +2 -2
- package/front_end/ui/legacy/EmptyWidget.ts +2 -1
- package/front_end/ui/legacy/UIUtils.ts +4 -4
- package/front_end/ui/legacy/XLink.ts +12 -13
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +2 -4
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +0 -2
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +3 -7
- package/front_end/ui/legacy/components/utils/Linkifier.ts +23 -23
- package/front_end/ui/legacy/toolbar.css +1 -1
- package/package.json +1 -1
- package/scripts/whitespaces.txt +1 -0
- package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourceEventId.md +0 -3
- package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourceExpiry.md +0 -4
- package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourcePriority.md +0 -4
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
7
|
+
import type * as Platform from '../../core/platform/platform.js';
|
7
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
8
9
|
import * as Protocol from '../../generated/protocol.js';
|
9
10
|
|
@@ -508,7 +509,8 @@ export const RuntimeSettings: RuntimeSetting[] = [
|
|
508
509
|
value: 'snapshot',
|
509
510
|
},
|
510
511
|
],
|
511
|
-
learnMore: 'https://
|
512
|
+
learnMore: 'https://github.com/GoogleChrome/lighthouse/blob/HEAD/docs/user-flows.md' as
|
513
|
+
Platform.DevToolsPath.UrlString,
|
512
514
|
},
|
513
515
|
{
|
514
516
|
// This setting is disabled, but we keep it around to show in the UI.
|
@@ -517,7 +519,8 @@ export const RuntimeSettings: RuntimeSetting[] = [
|
|
517
519
|
title: i18nLazyString(UIStrings.simulatedThrottling),
|
518
520
|
// We will disable this when we have a Lantern trace viewer within DevTools.
|
519
521
|
learnMore:
|
520
|
-
'https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#devtools-lighthouse-panel-throttling'
|
522
|
+
'https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#devtools-lighthouse-panel-throttling' as
|
523
|
+
Platform.DevToolsPath.UrlString,
|
521
524
|
description: i18nLazyString(UIStrings.simulateASlowerPageLoadBasedOn),
|
522
525
|
setFlags: (flags: Flags, value: string|boolean): void => {
|
523
526
|
flags.throttlingMethod = value ? 'simulate' : 'devtools';
|
@@ -600,5 +603,5 @@ export interface RuntimeSetting {
|
|
600
603
|
tooltip?: () => Common.UIString.LocalizedString,
|
601
604
|
}[];
|
602
605
|
title?: () => Common.UIString.LocalizedString;
|
603
|
-
learnMore?:
|
606
|
+
learnMore?: Platform.DevToolsPath.UrlString;
|
604
607
|
}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
|
+
import type * as Platform from '../../core/platform/platform.js';
|
5
6
|
import type * as SDK from '../../core/sdk/sdk.js';
|
6
7
|
|
7
8
|
export class LighthouseReportGenerator {
|
@@ -80,7 +81,7 @@ export interface NodeDetailsJSON {
|
|
80
81
|
snippet?: string;
|
81
82
|
}
|
82
83
|
export interface SourceLocationDetailsJSON {
|
83
|
-
sourceUrl?:
|
84
|
+
sourceUrl?: Platform.DevToolsPath.UrlString;
|
84
85
|
sourceLine?: string;
|
85
86
|
sourceColumn?: string;
|
86
87
|
}
|
@@ -1299,8 +1299,8 @@ export class AllocationGridNode extends HeapSnapshotGridNode {
|
|
1299
1299
|
const linkifier = (this.dataGridInternal as AllocationDataGrid).linkifier;
|
1300
1300
|
const urlElement = linkifier.linkifyScriptLocation(
|
1301
1301
|
heapProfilerModel ? heapProfilerModel.target() : null,
|
1302
|
-
String(allocationNode.scriptId) as Protocol.Runtime.ScriptId,
|
1303
|
-
allocationNode.line - 1, {
|
1302
|
+
String(allocationNode.scriptId) as Protocol.Runtime.ScriptId,
|
1303
|
+
allocationNode.scriptName as Platform.DevToolsPath.UrlString, allocationNode.line - 1, {
|
1304
1304
|
columnNumber: allocationNode.column - 1,
|
1305
1305
|
inlineFrameIndex: 0,
|
1306
1306
|
className: 'profile-node-file',
|
@@ -1904,7 +1904,8 @@ export class HeapAllocationStackView extends UI.Widget.Widget {
|
|
1904
1904
|
const target = this.heapProfilerModel ? this.heapProfilerModel.target() : null;
|
1905
1905
|
const options = {columnNumber: frame.column - 1, inlineFrameIndex: 0};
|
1906
1906
|
const urlElement = this.linkifier.linkifyScriptLocation(
|
1907
|
-
target, String(frame.scriptId) as Protocol.Runtime.ScriptId,
|
1907
|
+
target, String(frame.scriptId) as Protocol.Runtime.ScriptId,
|
1908
|
+
frame.scriptName as Platform.DevToolsPath.UrlString, frame.line - 1, options);
|
1908
1909
|
frameDiv.appendChild(urlElement);
|
1909
1910
|
stackFrameToURLElement.set(frameDiv, urlElement);
|
1910
1911
|
frameDiv.addEventListener('contextmenu', this.onContextMenu.bind(this, urlElement));
|
@@ -65,7 +65,7 @@ export class ProfileDataGridNode extends DataGrid.DataGrid.DataGridNode<unknown>
|
|
65
65
|
total: number;
|
66
66
|
functionName: string;
|
67
67
|
readonly deoptReason: string;
|
68
|
-
url:
|
68
|
+
url: Platform.DevToolsPath.UrlString;
|
69
69
|
linkElement: Element|null;
|
70
70
|
populated: boolean;
|
71
71
|
savedSelf?: number;
|
@@ -5,6 +5,7 @@
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
6
|
import * as Host from '../../core/host/host.js';
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
8
|
+
import type * as Platform from '../../core/platform/platform.js';
|
8
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
9
10
|
import * as Protocol from '../../generated/protocol.js';
|
10
11
|
import * as NetworkForward from '../../panels/network/forward/forward.js';
|
@@ -513,7 +514,7 @@ export class SecurityPanel extends UI.Panel.PanelWithSidebar implements
|
|
513
514
|
return certificateButton;
|
514
515
|
}
|
515
516
|
|
516
|
-
static createHighlightedUrl(url:
|
517
|
+
static createHighlightedUrl(url: Platform.DevToolsPath.UrlString, securityState: string): Element {
|
517
518
|
const schemeSeparator = '://';
|
518
519
|
const index = url.indexOf(schemeSeparator);
|
519
520
|
|
@@ -548,7 +549,7 @@ export class SecurityPanel extends UI.Panel.PanelWithSidebar implements
|
|
548
549
|
// The sidebar element will trigger displaying the main view. Rather than making a redundant call to display the main view, we rely on this.
|
549
550
|
this.sidebarMainViewElement.select(true);
|
550
551
|
}
|
551
|
-
showOrigin(origin:
|
552
|
+
showOrigin(origin: Platform.DevToolsPath.UrlString): void {
|
552
553
|
const originState = this.origins.get(origin);
|
553
554
|
if (!originState) {
|
554
555
|
return;
|
@@ -820,7 +821,7 @@ export class SecurityPanelSidebarTree extends UI.TreeOutline.TreeOutlineInShadow
|
|
820
821
|
}
|
821
822
|
}
|
822
823
|
|
823
|
-
addOrigin(origin:
|
824
|
+
addOrigin(origin: Platform.DevToolsPath.UrlString, securityState: Protocol.Security.SecurityState): void {
|
824
825
|
const originElement = new SecurityPanelSidebarTreeElement(
|
825
826
|
SecurityPanel.createHighlightedUrl(origin, securityState), this.showOriginInPanel.bind(this, origin),
|
826
827
|
'security-sidebar-tree-item', 'security-property');
|
@@ -1394,7 +1395,7 @@ export class SecurityMainView extends UI.Widget.VBox {
|
|
1394
1395
|
export class SecurityOriginView extends UI.Widget.VBox {
|
1395
1396
|
private readonly panel: SecurityPanel;
|
1396
1397
|
private readonly originLockIcon: HTMLElement;
|
1397
|
-
constructor(panel: SecurityPanel, origin:
|
1398
|
+
constructor(panel: SecurityPanel, origin: Platform.DevToolsPath.UrlString, originState: OriginState) {
|
1398
1399
|
super();
|
1399
1400
|
this.panel = panel;
|
1400
1401
|
this.setMinimumSize(200, 100);
|
@@ -1657,4 +1658,4 @@ export interface OriginState {
|
|
1657
1658
|
originView?: SecurityOriginView|null;
|
1658
1659
|
}
|
1659
1660
|
|
1660
|
-
export type Origin =
|
1661
|
+
export type Origin = Platform.DevToolsPath.UrlString;
|
@@ -511,9 +511,8 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
511
511
|
return true;
|
512
512
|
// TODO(crbug.com/1253323): Cast to UrlString will be removed when migration to branded types is complete.
|
513
513
|
case 'settings.documentation':
|
514
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(
|
515
|
-
|
516
|
-
Platform.DevToolsPath.UrlString);
|
514
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(UI.UIUtils.addReferrerToURL(
|
515
|
+
'https://developer.chrome.com/docs/devtools/' as Platform.DevToolsPath.UrlString));
|
517
516
|
return true;
|
518
517
|
case 'settings.shortcuts':
|
519
518
|
void SettingsScreen.showSettingsScreen({name: 'keybinds', focusTabHeader: true});
|
@@ -441,7 +441,7 @@ export class DebuggerPlugin extends Plugin {
|
|
441
441
|
} else {
|
442
442
|
const removeTitle = i18nString(UIStrings.removeBreakpoint, {n: breakpoints.length});
|
443
443
|
contextMenu.debugSection().appendItem(
|
444
|
-
removeTitle, () => breakpoints.forEach(breakpoint => breakpoint.remove(false)));
|
444
|
+
removeTitle, () => breakpoints.forEach(breakpoint => void breakpoint.remove(false)));
|
445
445
|
if (breakpoints.length === 1 && supportsConditionalBreakpoints) {
|
446
446
|
// Editing breakpoints only make sense for conditional breakpoints
|
447
447
|
// and logpoints and both are currently only available for JavaScript
|
@@ -520,7 +520,7 @@ export class DebuggerPlugin extends Plugin {
|
|
520
520
|
if (value !== this.muted) {
|
521
521
|
this.muted = value;
|
522
522
|
if (!value) {
|
523
|
-
this.restoreBreakpointsAfterEditing();
|
523
|
+
void this.restoreBreakpointsAfterEditing();
|
524
524
|
} else if (this.editor) {
|
525
525
|
this.editor.dispatch({effects: muteBreakpoints.of(null)});
|
526
526
|
}
|
@@ -1221,18 +1221,19 @@ export class DebuggerPlugin extends Plugin {
|
|
1221
1221
|
// breakpoints the breakpoint manager might have (which point into
|
1222
1222
|
// the old file) with the breakpoints we have, which had their
|
1223
1223
|
// positions tracked through the changes.
|
1224
|
-
private restoreBreakpointsAfterEditing(): void {
|
1224
|
+
private async restoreBreakpointsAfterEditing(): Promise<void> {
|
1225
1225
|
const {breakpoints} = this;
|
1226
1226
|
const editor = this.editor as TextEditor.TextEditor.TextEditor;
|
1227
1227
|
this.breakpoints = [];
|
1228
|
-
|
1228
|
+
await Promise.all(breakpoints.map(async description => {
|
1229
|
+
const {breakpoint, position} = description;
|
1229
1230
|
const condition = breakpoint.condition(), enabled = breakpoint.enabled();
|
1230
|
-
breakpoint.remove(false);
|
1231
|
+
await breakpoint.remove(false);
|
1231
1232
|
const editorLocation = editor.toLineColumn(position);
|
1232
1233
|
const uiLocation =
|
1233
1234
|
this.transformer.editorLocationToUILocation(editorLocation.lineNumber, editorLocation.columnNumber);
|
1234
|
-
|
1235
|
-
}
|
1235
|
+
await this.setBreakpoint(uiLocation.lineNumber, uiLocation.columnNumber, condition, enabled);
|
1236
|
+
}));
|
1236
1237
|
}
|
1237
1238
|
|
1238
1239
|
private async refreshBreakpoints(): Promise<void> {
|
@@ -1269,7 +1270,7 @@ export class DebuggerPlugin extends Plugin {
|
|
1269
1270
|
if (event.shiftKey) {
|
1270
1271
|
breakpoint.setEnabled(!breakpoint.enabled());
|
1271
1272
|
} else {
|
1272
|
-
breakpoint.remove(false);
|
1273
|
+
void breakpoint.remove(false);
|
1273
1274
|
}
|
1274
1275
|
} else if (this.editor) {
|
1275
1276
|
const editorLocation = this.editor.editor.posAtDOM(event.target as unknown as HTMLElement);
|
@@ -1444,7 +1445,7 @@ export class DebuggerPlugin extends Plugin {
|
|
1444
1445
|
if (onlyDisable) {
|
1445
1446
|
breakpoint.setEnabled(hasDisabled);
|
1446
1447
|
} else {
|
1447
|
-
breakpoint.remove(false);
|
1448
|
+
void breakpoint.remove(false);
|
1448
1449
|
}
|
1449
1450
|
}
|
1450
1451
|
}
|
@@ -426,7 +426,7 @@ export class JavaScriptBreakpointsSidebarPane extends UI.ThrottledWidget.Throttl
|
|
426
426
|
const removeEntryTitle = breakpoints.length > 1 ? i18nString(UIStrings.removeAllBreakpointsInLine) :
|
427
427
|
i18nString(UIStrings.removeBreakpoint);
|
428
428
|
contextMenu.defaultSection().appendItem(
|
429
|
-
removeEntryTitle, () => breakpoints.map(breakpoint => breakpoint.remove(false /* keepInStorage */)));
|
429
|
+
removeEntryTitle, () => breakpoints.map(breakpoint => void breakpoint.remove(false /* keepInStorage */)));
|
430
430
|
if (event.target instanceof Element) {
|
431
431
|
contextMenu.defaultSection().appendItem(
|
432
432
|
i18nString(UIStrings.revealLocation), this.revealLocation.bind(this, event.target));
|
@@ -487,14 +487,14 @@ export class JavaScriptBreakpointsSidebarPane extends UI.ThrottledWidget.Throttl
|
|
487
487
|
|
488
488
|
private removeAllBreakpoints(): void {
|
489
489
|
for (const breakpointLocation of this.breakpointManager.allBreakpointLocations()) {
|
490
|
-
breakpointLocation.breakpoint.remove(false /* keepInStorage */);
|
490
|
+
void breakpointLocation.breakpoint.remove(false /* keepInStorage */);
|
491
491
|
}
|
492
492
|
}
|
493
493
|
|
494
494
|
private removeOtherBreakpoints(selectedBreakpoints: Set<Bindings.BreakpointManager.Breakpoint>): void {
|
495
495
|
for (const breakpointLocation of this.breakpointManager.allBreakpointLocations()) {
|
496
496
|
if (!selectedBreakpoints.has(breakpointLocation.breakpoint)) {
|
497
|
-
breakpointLocation.breakpoint.remove(false /* keepInStorage */);
|
497
|
+
void breakpointLocation.breakpoint.remove(false /* keepInStorage */);
|
498
498
|
}
|
499
499
|
}
|
500
500
|
}
|
@@ -75,18 +75,14 @@ export class PerformanceModel extends Common.ObjectWrapper.ObjectWrapper<EventTy
|
|
75
75
|
this.tracingModelInternal = model;
|
76
76
|
this.timelineModelInternal.setEvents(model);
|
77
77
|
|
78
|
-
let inputEvents: SDK.TracingModel.AsyncEvent[]|null = null;
|
79
78
|
let animationEvents: SDK.TracingModel.AsyncEvent[]|null = null;
|
80
79
|
for (const track of this.timelineModelInternal.tracks()) {
|
81
|
-
if (track.type === TimelineModel.TimelineModel.TrackType.Input) {
|
82
|
-
inputEvents = track.asyncEvents;
|
83
|
-
}
|
84
80
|
if (track.type === TimelineModel.TimelineModel.TrackType.Animation) {
|
85
81
|
animationEvents = track.asyncEvents;
|
86
82
|
}
|
87
83
|
}
|
88
|
-
if (
|
89
|
-
this.irModel.populate(
|
84
|
+
if (animationEvents) {
|
85
|
+
this.irModel.populate([], animationEvents || []);
|
90
86
|
}
|
91
87
|
|
92
88
|
const mainTracks = this.timelineModelInternal.tracks().filter(
|
@@ -54,10 +54,6 @@ const UIStrings = {
|
|
54
54
|
*/
|
55
55
|
onIgnoreList: 'On ignore list',
|
56
56
|
/**
|
57
|
-
*@description Text in Timeline Flame Chart Data Provider of the Performance panel
|
58
|
-
*/
|
59
|
-
input: 'Input',
|
60
|
-
/**
|
61
57
|
*@description Text that refers to the animation of the web page
|
62
58
|
*/
|
63
59
|
animation: 'Animation',
|
@@ -428,10 +424,8 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
428
424
|
|
429
425
|
const eventEntryType = EntryType.Event;
|
430
426
|
|
431
|
-
const weight = (track: TimelineModel.TimelineModel.Track):
|
427
|
+
const weight = (track: TimelineModel.TimelineModel.Track): 1|2|3|4|5|6|7|8|9|10|- 1 => {
|
432
428
|
switch (track.type) {
|
433
|
-
case TimelineModel.TimelineModel.TrackType.Input:
|
434
|
-
return 0;
|
435
429
|
case TimelineModel.TimelineModel.TrackType.Animation:
|
436
430
|
return 1;
|
437
431
|
case TimelineModel.TimelineModel.TrackType.Timings:
|
@@ -464,13 +458,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
464
458
|
let rasterCount = 0;
|
465
459
|
for (const track of tracks) {
|
466
460
|
switch (track.type) {
|
467
|
-
case TimelineModel.TimelineModel.TrackType.Input: {
|
468
|
-
this.appendAsyncEventsGroup(
|
469
|
-
track, i18nString(UIStrings.input), track.asyncEvents, this.interactionsHeaderLevel2, eventEntryType,
|
470
|
-
false /* selectable */);
|
471
|
-
break;
|
472
|
-
}
|
473
|
-
|
474
461
|
case TimelineModel.TimelineModel.TrackType.Animation: {
|
475
462
|
this.appendAsyncEventsGroup(
|
476
463
|
track, i18nString(UIStrings.animation), track.asyncEvents, this.interactionsHeaderLevel2, eventEntryType,
|
@@ -1918,7 +1918,8 @@ export class TimelineUIUtils {
|
|
1918
1918
|
null {
|
1919
1919
|
const options =
|
1920
1920
|
{columnNumber, showColumnNumber: true, inlineFrameIndex: 0, className: 'timeline-details', tabStop: true};
|
1921
|
-
return linkifier.linkifyScriptLocation(
|
1921
|
+
return linkifier.linkifyScriptLocation(
|
1922
|
+
target, scriptId, url as Platform.DevToolsPath.UrlString, lineNumber, options);
|
1922
1923
|
}
|
1923
1924
|
|
1924
1925
|
function linkifyTopCallFrame(): Element|null {
|
@@ -1931,7 +1932,7 @@ export class TimelineUIUtils {
|
|
1931
1932
|
}
|
1932
1933
|
|
1933
1934
|
static buildDetailsNodeForPerformanceEvent(event: SDK.TracingModel.Event): Element {
|
1934
|
-
let link
|
1935
|
+
let link = 'https://web.dev/user-centric-performance-metrics/';
|
1935
1936
|
let name = 'page performance metrics';
|
1936
1937
|
const recordType = TimelineModel.TimelineModel.RecordType;
|
1937
1938
|
switch (event.name) {
|
@@ -2029,7 +2030,7 @@ export class TimelineUIUtils {
|
|
2029
2030
|
const eventData = event.args['data'];
|
2030
2031
|
const timelineData = TimelineModel.TimelineModel.TimelineData.forEvent(event);
|
2031
2032
|
const initiator = timelineData.initiator();
|
2032
|
-
let url:
|
2033
|
+
let url: Platform.DevToolsPath.UrlString|null = null;
|
2033
2034
|
|
2034
2035
|
if (timelineData.warning) {
|
2035
2036
|
contentHelper.appendWarningRow(event);
|
@@ -2137,7 +2138,7 @@ export class TimelineUIUtils {
|
|
2137
2138
|
}
|
2138
2139
|
|
2139
2140
|
case recordTypes.CompileScript: {
|
2140
|
-
url = eventData && eventData['url'];
|
2141
|
+
url = eventData && eventData['url'] as Platform.DevToolsPath.UrlString;
|
2141
2142
|
if (url) {
|
2142
2143
|
contentHelper.appendLocationRow(
|
2143
2144
|
i18nString(UIStrings.script), url, eventData['lineNumber'], eventData['columnNumber']);
|
@@ -2154,7 +2155,7 @@ export class TimelineUIUtils {
|
|
2154
2155
|
}
|
2155
2156
|
|
2156
2157
|
case recordTypes.CacheModule: {
|
2157
|
-
url = eventData && eventData['url'];
|
2158
|
+
url = eventData && eventData['url'] as Platform.DevToolsPath.UrlString;
|
2158
2159
|
contentHelper.appendTextRow(
|
2159
2160
|
i18nString(UIStrings.compilationCacheSize),
|
2160
2161
|
Platform.NumberUtilities.bytesToString(eventData['producedCacheSize']));
|
@@ -2162,7 +2163,7 @@ export class TimelineUIUtils {
|
|
2162
2163
|
}
|
2163
2164
|
|
2164
2165
|
case recordTypes.CacheScript: {
|
2165
|
-
url = eventData && eventData['url'];
|
2166
|
+
url = eventData && eventData['url'] as Platform.DevToolsPath.UrlString;
|
2166
2167
|
if (url) {
|
2167
2168
|
contentHelper.appendLocationRow(
|
2168
2169
|
i18nString(UIStrings.script), url, eventData['lineNumber'], eventData['columnNumber']);
|
@@ -2174,7 +2175,7 @@ export class TimelineUIUtils {
|
|
2174
2175
|
}
|
2175
2176
|
|
2176
2177
|
case recordTypes.EvaluateScript: {
|
2177
|
-
url = eventData && eventData['url'];
|
2178
|
+
url = eventData && eventData['url'] as Platform.DevToolsPath.UrlString;
|
2178
2179
|
if (url) {
|
2179
2180
|
contentHelper.appendLocationRow(
|
2180
2181
|
i18nString(UIStrings.script), url, eventData['lineNumber'], eventData['columnNumber']);
|
@@ -2188,7 +2189,7 @@ export class TimelineUIUtils {
|
|
2188
2189
|
case recordTypes.WasmModuleCacheHit:
|
2189
2190
|
case recordTypes.WasmModuleCacheInvalid: {
|
2190
2191
|
if (eventData) {
|
2191
|
-
url = event.args['url'];
|
2192
|
+
url = event.args['url'] as Platform.DevToolsPath.UrlString;
|
2192
2193
|
if (url) {
|
2193
2194
|
contentHelper.appendTextRow(i18nString(UIStrings.url), url);
|
2194
2195
|
}
|
@@ -2242,7 +2243,7 @@ export class TimelineUIUtils {
|
|
2242
2243
|
}
|
2243
2244
|
|
2244
2245
|
case recordTypes.ParseAuthorStyleSheet: {
|
2245
|
-
url = eventData['styleSheetUrl'];
|
2246
|
+
url = eventData['styleSheetUrl'] as Platform.DevToolsPath.UrlString;
|
2246
2247
|
if (url) {
|
2247
2248
|
const options = {
|
2248
2249
|
tabStop: true,
|
@@ -2911,7 +2912,7 @@ export class TimelineUIUtils {
|
|
2911
2912
|
}
|
2912
2913
|
const imageURLPromise = snapshotWithRect.snapshot.replay();
|
2913
2914
|
snapshotWithRect.snapshot.release();
|
2914
|
-
const imageURL = await imageURLPromise;
|
2915
|
+
const imageURL = await imageURLPromise as Platform.DevToolsPath.UrlString;
|
2915
2916
|
if (!imageURL) {
|
2916
2917
|
return null;
|
2917
2918
|
}
|
@@ -3662,14 +3663,15 @@ export class TimelineDetailsContentHelper {
|
|
3662
3663
|
showColumnNumber: true,
|
3663
3664
|
inlineFrameIndex: 0,
|
3664
3665
|
};
|
3665
|
-
const link = this.linkifierInternal.maybeLinkifyScriptLocation(
|
3666
|
+
const link = this.linkifierInternal.maybeLinkifyScriptLocation(
|
3667
|
+
this.target, null, url as Platform.DevToolsPath.UrlString, startLine, options);
|
3666
3668
|
if (!link) {
|
3667
3669
|
return;
|
3668
3670
|
}
|
3669
3671
|
this.appendElementRow(title, link);
|
3670
3672
|
}
|
3671
3673
|
|
3672
|
-
appendLocationRange(title: string, url:
|
3674
|
+
appendLocationRange(title: string, url: Platform.DevToolsPath.UrlString, startLine: number, endLine?: number): void {
|
3673
3675
|
if (!this.linkifierInternal || !this.target) {
|
3674
3676
|
return;
|
3675
3677
|
}
|