chrome-devtools-frontend 1.0.1602543 → 1.0.1603822
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/.agents/skills/version-control/SKILL.md +17 -2
- package/front_end/core/sdk/OverlayModel.ts +13 -13
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +13 -10
- package/front_end/core/sdk/RuntimeModel.ts +5 -5
- package/front_end/core/sdk/ServiceWorkerManager.ts +4 -2
- package/front_end/core/sdk/TargetManager.ts +5 -0
- package/front_end/core/sdk/WebMCPModel.ts +6 -0
- package/front_end/generated/InspectorBackendCommands.ts +3 -0
- package/front_end/generated/protocol-mapping.d.ts +8 -0
- package/front_end/generated/protocol-proxy-api.d.ts +10 -0
- package/front_end/generated/protocol.ts +57 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +16 -5
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +60 -9
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +71 -15
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -2
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +10 -8
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +4 -3
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +83 -19
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +30 -10
- package/front_end/panels/ai_assistance/components/chatMessage.css +33 -7
- package/front_end/panels/ai_assistance/components/walkthroughView.css +35 -5
- package/front_end/panels/common/ThrottlingUtils.ts +46 -0
- package/front_end/panels/common/common.ts +1 -0
- package/front_end/panels/elements/ComputedStyleWidget.ts +11 -1
- package/front_end/panels/elements/StandaloneStylesContainer.ts +0 -3
- package/front_end/panels/elements/StylePropertiesSection.ts +0 -49
- package/front_end/panels/elements/StylesContainer.ts +0 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +32 -7
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +14 -0
- package/front_end/panels/profiler/ProfileView.ts +0 -9
- package/front_end/panels/settings/keybindsSettingsTab.css +25 -31
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +8 -0
- package/front_end/panels/timeline/TimelinePanel.ts +14 -2
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +5 -9
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -2
- package/front_end/panels/timeline/components/OriginMap.ts +176 -159
- package/front_end/panels/timeline/components/originMap.css +4 -51
- package/front_end/panels/timeline/thirdPartyTreeView.css +6 -0
- package/front_end/panels/timeline/timeline-meta.ts +11 -0
- package/front_end/panels/timeline/utils/Helpers.ts +5 -25
- package/front_end/third_party/acorn/README.chromium +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/{list → lists}/List.ts +1 -1
- package/front_end/ui/components/{list → lists}/list.css +0 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -3
- package/package.json +1 -1
- /package/front_end/ui/components/{list → lists}/lists.ts +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
// Copyright 2024 The Chromium Authors
|
|
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
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
|
-
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
6
|
-
|
|
7
4
|
import '../../../ui/kit/kit.js';
|
|
5
|
+
import '../../../ui/legacy/components/data_grid/data_grid.js';
|
|
8
6
|
|
|
9
7
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
10
8
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
@@ -52,26 +50,117 @@ interface ListItem extends CrUXManager.OriginMapping {
|
|
|
52
50
|
isTitleRow?: boolean;
|
|
53
51
|
}
|
|
54
52
|
|
|
55
|
-
export
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
export interface ViewInput {
|
|
54
|
+
mappings: ListItem[];
|
|
55
|
+
prefillDevelopmentOrigin: string;
|
|
56
|
+
errorMessage: string;
|
|
57
|
+
isCrUXEnabled: boolean;
|
|
58
|
+
getFieldDataForPage: (url: string) => Promise<CrUXManager.PageResult>;
|
|
59
|
+
onCommitEdit: (event: CustomEvent<{columnId: string, valueBeforeEditing: string, newText: string}>) => void;
|
|
60
|
+
onRemoveItemRequested: (event: CustomEvent) => void;
|
|
61
|
+
onCreate: (event: CustomEvent<{developmentOrigin?: string, productionOrigin?: string}>) => void;
|
|
62
|
+
}
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
super();
|
|
64
|
+
export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
61
65
|
|
|
62
|
-
|
|
66
|
+
function renderOriginWarning(input: ViewInput, url: string): Promise<Lit.LitTemplate> {
|
|
67
|
+
return RenderCoordinator.write(async () => {
|
|
68
|
+
if (!input.isCrUXEnabled) {
|
|
69
|
+
return Lit.nothing;
|
|
70
|
+
}
|
|
63
71
|
|
|
64
|
-
|
|
65
|
-
this.#updateListFromSetting();
|
|
66
|
-
}
|
|
72
|
+
const result = await input.getFieldDataForPage(url);
|
|
67
73
|
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
const hasFieldData = Object.entries(result).some(([key, value]) => {
|
|
75
|
+
if (key === 'warnings') {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
return Boolean(value);
|
|
79
|
+
});
|
|
80
|
+
if (hasFieldData) {
|
|
81
|
+
return Lit.nothing;
|
|
82
|
+
}
|
|
70
83
|
|
|
71
|
-
|
|
72
|
-
|
|
84
|
+
return html`
|
|
85
|
+
<devtools-icon
|
|
86
|
+
class="origin-warning-icon"
|
|
87
|
+
name="warning-filled"
|
|
88
|
+
title=${i18nString(UIStrings.pageHasNoData)}
|
|
89
|
+
></devtools-icon>
|
|
90
|
+
`;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
73
93
|
|
|
74
|
-
|
|
94
|
+
function renderItem(input: ViewInput, originMapping: ListItem, index: number): Lit.LitTemplate {
|
|
95
|
+
const warningIcon = Lit.Directives.until(renderOriginWarning(input, originMapping.productionOrigin));
|
|
96
|
+
// clang-format off
|
|
97
|
+
return html`
|
|
98
|
+
<tr data-index=${index} @edit=${input.onCommitEdit} @delete=${input.onRemoveItemRequested}>
|
|
99
|
+
<td data-value=${originMapping.developmentOrigin}>
|
|
100
|
+
<div class="origin" title=${originMapping.developmentOrigin}>${originMapping.developmentOrigin}</div>
|
|
101
|
+
</td>
|
|
102
|
+
<td data-value=${originMapping.productionOrigin}>
|
|
103
|
+
${warningIcon}
|
|
104
|
+
<div class="origin" title=${originMapping.productionOrigin}>${originMapping.productionOrigin}</div>
|
|
105
|
+
</td>
|
|
106
|
+
</tr>
|
|
107
|
+
`;
|
|
108
|
+
// clang-format on
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
112
|
+
if (!input.prefillDevelopmentOrigin && input.mappings.length === 0) {
|
|
113
|
+
Lit.render(Lit.nothing, target);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
// clang-format off
|
|
117
|
+
Lit.render(html`
|
|
118
|
+
<devtools-data-grid striped inline
|
|
119
|
+
@click=${(e: Event) => { e.stopPropagation(); }}
|
|
120
|
+
@create=${input.onCreate}>
|
|
121
|
+
<table>
|
|
122
|
+
<tr>
|
|
123
|
+
<th id=${DEV_ORIGIN_CONTROL} editable weight="1">${i18nString(UIStrings.developmentOrigin)}</th>
|
|
124
|
+
<th id=${PROD_ORIGIN_CONTROL} editable weight="1">${i18nString(UIStrings.productionOrigin)}</th>
|
|
125
|
+
</tr>
|
|
126
|
+
${input.mappings.map((mapping, index) => renderItem(input, mapping, index))}
|
|
127
|
+
${input.prefillDevelopmentOrigin ? html`
|
|
128
|
+
<tr placeholder>
|
|
129
|
+
<td>${input.prefillDevelopmentOrigin}</td>
|
|
130
|
+
<td></td>
|
|
131
|
+
</tr>` : Lit.nothing}
|
|
132
|
+
</table>
|
|
133
|
+
</devtools-data-grid>
|
|
134
|
+
${input.errorMessage ? html`<div class="error-message">${input.errorMessage}</div>` : Lit.nothing}
|
|
135
|
+
`, target);
|
|
136
|
+
// clang-format on
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export class OriginMap extends UI.Widget.VBox {
|
|
140
|
+
readonly #view: View;
|
|
141
|
+
#errorMessage = '';
|
|
142
|
+
#prefillDevelopmentOrigin = '';
|
|
143
|
+
|
|
144
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
145
|
+
super(element, {useShadowDom: true});
|
|
146
|
+
this.#view = view;
|
|
147
|
+
this.registerRequiredCSS(originMapStyles);
|
|
148
|
+
CrUXManager.CrUXManager.instance().getConfigSetting().addChangeListener(this.requestUpdate, this);
|
|
149
|
+
this.requestUpdate();
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
override performUpdate(): void {
|
|
153
|
+
const input: ViewInput = {
|
|
154
|
+
mappings: this.#pullMappingsFromSetting(),
|
|
155
|
+
prefillDevelopmentOrigin: this.#prefillDevelopmentOrigin,
|
|
156
|
+
errorMessage: this.#errorMessage,
|
|
157
|
+
isCrUXEnabled: CrUXManager.CrUXManager.instance().isEnabled(),
|
|
158
|
+
getFieldDataForPage: (url: string) => CrUXManager.CrUXManager.instance().getFieldDataForPage(url),
|
|
159
|
+
onCommitEdit: this.#commitEdit.bind(this),
|
|
160
|
+
onRemoveItemRequested: this.#removeItemRequested.bind(this),
|
|
161
|
+
onCreate: this.#onCreate.bind(this),
|
|
162
|
+
};
|
|
163
|
+
this.#view(input, undefined, this.contentElement);
|
|
75
164
|
}
|
|
76
165
|
|
|
77
166
|
#pullMappingsFromSetting(): ListItem[] {
|
|
@@ -85,21 +174,6 @@ export class OriginMap extends UI.Widget.WidgetElement<UI.Widget.Widget> impleme
|
|
|
85
174
|
setting.set(settingCopy);
|
|
86
175
|
}
|
|
87
176
|
|
|
88
|
-
#updateListFromSetting(): void {
|
|
89
|
-
const mappings = this.#pullMappingsFromSetting();
|
|
90
|
-
this.#list.clear();
|
|
91
|
-
this.#list.appendItem(
|
|
92
|
-
{
|
|
93
|
-
developmentOrigin: i18nString(UIStrings.developmentOrigin),
|
|
94
|
-
productionOrigin: i18nString(UIStrings.productionOrigin),
|
|
95
|
-
isTitleRow: true,
|
|
96
|
-
},
|
|
97
|
-
false);
|
|
98
|
-
for (const originMapping of mappings) {
|
|
99
|
-
this.#list.appendItem(originMapping, true);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
177
|
#getOrigin(url: string): string|null {
|
|
104
178
|
try {
|
|
105
179
|
return new URL(url).origin;
|
|
@@ -108,173 +182,116 @@ export class OriginMap extends UI.Widget.WidgetElement<UI.Widget.Widget> impleme
|
|
|
108
182
|
}
|
|
109
183
|
}
|
|
110
184
|
|
|
111
|
-
#renderOriginWarning(url: string): Promise<Lit.LitTemplate> {
|
|
112
|
-
return RenderCoordinator.write(async () => {
|
|
113
|
-
if (!CrUXManager.CrUXManager.instance().isEnabled()) {
|
|
114
|
-
return Lit.nothing;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const cruxManager = CrUXManager.CrUXManager.instance();
|
|
118
|
-
const result = await cruxManager.getFieldDataForPage(url);
|
|
119
|
-
|
|
120
|
-
const hasFieldData = Object.entries(result).some(([key, value]) => {
|
|
121
|
-
if (key === 'warnings') {
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
return Boolean(value);
|
|
125
|
-
});
|
|
126
|
-
if (hasFieldData) {
|
|
127
|
-
return Lit.nothing;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return html`
|
|
131
|
-
<devtools-icon
|
|
132
|
-
class="origin-warning-icon"
|
|
133
|
-
name="warning-filled"
|
|
134
|
-
title=${i18nString(UIStrings.pageHasNoData)}
|
|
135
|
-
></devtools-icon>
|
|
136
|
-
`;
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
|
|
140
185
|
startCreation(): void {
|
|
141
186
|
const targetManager = SDK.TargetManager.TargetManager.instance();
|
|
142
187
|
const inspectedURL = targetManager.inspectedURL();
|
|
143
188
|
const currentOrigin = this.#getOrigin(inspectedURL) || '';
|
|
144
|
-
|
|
145
|
-
this
|
|
146
|
-
developmentOrigin: currentOrigin,
|
|
147
|
-
productionOrigin: '',
|
|
148
|
-
});
|
|
189
|
+
this.#prefillDevelopmentOrigin = currentOrigin;
|
|
190
|
+
this.requestUpdate();
|
|
149
191
|
}
|
|
150
192
|
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
let cellRole: 'columnheader'|'cell';
|
|
157
|
-
let warningIcon;
|
|
158
|
-
if (originMapping.isTitleRow) {
|
|
159
|
-
element.classList.add('header');
|
|
160
|
-
cellRole = 'columnheader';
|
|
161
|
-
warningIcon = Lit.nothing;
|
|
162
|
-
} else {
|
|
163
|
-
cellRole = 'cell';
|
|
164
|
-
warningIcon = Lit.Directives.until(this.#renderOriginWarning(originMapping.productionOrigin));
|
|
193
|
+
#removeItemRequested(event: CustomEvent): void {
|
|
194
|
+
const target = event.currentTarget as HTMLElement;
|
|
195
|
+
const index = Number.parseInt(target.dataset.index ?? '-1', 10);
|
|
196
|
+
if (index < 0) {
|
|
197
|
+
return;
|
|
165
198
|
}
|
|
166
199
|
|
|
167
|
-
// clang-format off
|
|
168
|
-
Lit.render(html`
|
|
169
|
-
<div class="origin-mapping-cell development-origin" role=${cellRole}>
|
|
170
|
-
<div class="origin" title=${originMapping.developmentOrigin}>${originMapping.developmentOrigin}</div>
|
|
171
|
-
</div>
|
|
172
|
-
<div class="origin-mapping-cell production-origin" role=${cellRole}>
|
|
173
|
-
${warningIcon}
|
|
174
|
-
<div class="origin" title=${originMapping.productionOrigin}>${originMapping.productionOrigin}</div>
|
|
175
|
-
</div>
|
|
176
|
-
`, element, {host: this});
|
|
177
|
-
// clang-format on
|
|
178
|
-
return element;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
removeItemRequested(_item: ListItem, index: number): void {
|
|
182
200
|
const mappings = this.#pullMappingsFromSetting();
|
|
183
|
-
|
|
184
|
-
// `index` will be 1-indexed due to the header row
|
|
185
|
-
mappings.splice(index - 1, 1);
|
|
186
|
-
|
|
201
|
+
mappings.splice(index, 1);
|
|
187
202
|
this.#pushMappingsToSetting(mappings);
|
|
188
203
|
}
|
|
189
204
|
|
|
190
|
-
commitEdit(
|
|
191
|
-
|
|
192
|
-
|
|
205
|
+
#commitEdit(event: CustomEvent<{columnId: string, valueBeforeEditing: string, newText: string}>): void {
|
|
206
|
+
const target = event.currentTarget as HTMLElement;
|
|
207
|
+
const index = Number.parseInt(target.dataset.index ?? '-1', 10);
|
|
208
|
+
if (index < 0) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
193
211
|
|
|
194
212
|
const mappings = this.#pullMappingsFromSetting();
|
|
195
|
-
|
|
196
|
-
|
|
213
|
+
const originMapping = mappings[index];
|
|
214
|
+
const isDevOrigin = event.detail.columnId === DEV_ORIGIN_CONTROL;
|
|
215
|
+
|
|
216
|
+
let errorMessage = null;
|
|
217
|
+
if (isDevOrigin) {
|
|
218
|
+
errorMessage = this.#developmentValidator(event.detail.newText, index);
|
|
219
|
+
} else {
|
|
220
|
+
errorMessage = this.#productionValidator(event.detail.newText);
|
|
197
221
|
}
|
|
198
|
-
this.#pushMappingsToSetting(mappings);
|
|
199
|
-
}
|
|
200
222
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
223
|
+
if (errorMessage) {
|
|
224
|
+
this.#errorMessage = errorMessage;
|
|
225
|
+
this.requestUpdate();
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
this.#errorMessage = '';
|
|
207
229
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
230
|
+
if (isDevOrigin) {
|
|
231
|
+
originMapping.developmentOrigin = this.#getOrigin(event.detail.newText) || '';
|
|
232
|
+
} else {
|
|
233
|
+
originMapping.productionOrigin = this.#getOrigin(event.detail.newText) || '';
|
|
234
|
+
}
|
|
235
|
+
this.#pushMappingsToSetting(mappings);
|
|
236
|
+
}
|
|
211
237
|
|
|
238
|
+
#developmentValidator(value: string, indexToIgnore?: number): string|null {
|
|
239
|
+
const origin = this.#getOrigin(value);
|
|
212
240
|
if (!origin) {
|
|
213
|
-
return
|
|
241
|
+
return i18nString(UIStrings.invalidOrigin, {PH1: value});
|
|
214
242
|
}
|
|
215
243
|
|
|
216
244
|
const mappings = this.#pullMappingsFromSetting();
|
|
217
245
|
for (let i = 0; i < mappings.length; ++i) {
|
|
218
|
-
|
|
219
|
-
if (i === index - 1) {
|
|
246
|
+
if (i === indexToIgnore) {
|
|
220
247
|
continue;
|
|
221
248
|
}
|
|
222
|
-
|
|
223
249
|
const mapping = mappings[i];
|
|
224
250
|
if (mapping.developmentOrigin === origin) {
|
|
225
|
-
return
|
|
251
|
+
return i18nString(UIStrings.alreadyMapped, {PH1: origin});
|
|
226
252
|
}
|
|
227
253
|
}
|
|
228
254
|
|
|
229
|
-
return
|
|
255
|
+
return null;
|
|
230
256
|
}
|
|
231
257
|
|
|
232
|
-
#productionValidator(
|
|
233
|
-
|
|
234
|
-
const origin = this.#getOrigin(input.value);
|
|
235
|
-
|
|
258
|
+
#productionValidator(value: string): string|null {
|
|
259
|
+
const origin = this.#getOrigin(value);
|
|
236
260
|
if (!origin) {
|
|
237
|
-
return
|
|
261
|
+
return i18nString(UIStrings.invalidOrigin, {PH1: value});
|
|
238
262
|
}
|
|
239
263
|
|
|
240
|
-
return
|
|
264
|
+
return null;
|
|
241
265
|
}
|
|
242
266
|
|
|
243
|
-
#
|
|
244
|
-
|
|
245
|
-
|
|
267
|
+
#onCreate(event: CustomEvent<{developmentOrigin?: string, productionOrigin?: string}>): void {
|
|
268
|
+
const devOrigin = event.detail[DEV_ORIGIN_CONTROL as keyof typeof event.detail] ?? '';
|
|
269
|
+
const prodOrigin = event.detail[PROD_ORIGIN_CONTROL as keyof typeof event.detail] ?? '';
|
|
270
|
+
|
|
271
|
+
// Ignore empty row selection/deselection or if they didn't change the prefilled values
|
|
272
|
+
if ((!devOrigin && !prodOrigin) || (devOrigin === this.#prefillDevelopmentOrigin && !prodOrigin)) {
|
|
273
|
+
this.#prefillDevelopmentOrigin = '';
|
|
274
|
+
this.#errorMessage = '';
|
|
275
|
+
this.requestUpdate();
|
|
276
|
+
return;
|
|
246
277
|
}
|
|
247
278
|
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
// clang-format off
|
|
258
|
-
Lit.render(html`
|
|
259
|
-
<label class="development-origin-input">
|
|
260
|
-
${i18nString(UIStrings.developmentOrigin)}
|
|
261
|
-
${devInput}
|
|
262
|
-
</label>
|
|
263
|
-
<label class="production-origin-input">
|
|
264
|
-
${i18nString(UIStrings.productionOrigin)}
|
|
265
|
-
${prodInput}
|
|
266
|
-
</label>
|
|
267
|
-
`, content, {host: this});
|
|
268
|
-
// clang-format on
|
|
269
|
-
|
|
270
|
-
return editor;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
279
|
+
const errors = [this.#developmentValidator(devOrigin), this.#productionValidator(prodOrigin)].filter(Boolean);
|
|
280
|
+
if (errors.length > 0) {
|
|
281
|
+
this.#errorMessage = errors.join('\n');
|
|
282
|
+
this.requestUpdate();
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
this.#errorMessage = '';
|
|
273
287
|
|
|
274
|
-
|
|
288
|
+
this.#prefillDevelopmentOrigin = '';
|
|
275
289
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
290
|
+
const mappings = this.#pullMappingsFromSetting();
|
|
291
|
+
mappings.push({
|
|
292
|
+
developmentOrigin: this.#getOrigin(devOrigin) || '',
|
|
293
|
+
productionOrigin: this.#getOrigin(prodOrigin) || '',
|
|
294
|
+
});
|
|
295
|
+
this.#pushMappingsToSetting(mappings);
|
|
279
296
|
}
|
|
280
297
|
}
|
|
@@ -4,38 +4,6 @@
|
|
|
4
4
|
* found in the LICENSE file.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
.list {
|
|
8
|
-
max-height: 200px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.list-item:has(.origin-mapping-row.header) {
|
|
12
|
-
position: sticky;
|
|
13
|
-
top: 0;
|
|
14
|
-
z-index: 1;
|
|
15
|
-
background-color: var(--sys-color-cdt-base-container);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.origin-mapping-row {
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: row;
|
|
21
|
-
width: 100%;
|
|
22
|
-
/* Needs to be 30px because list items have a min height of 30px */
|
|
23
|
-
height: 30px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.origin-mapping-row.header {
|
|
27
|
-
font-weight: var(--ref-typeface-weight-medium);
|
|
28
|
-
border-bottom: 1px solid var(--sys-color-divider);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.origin-mapping-cell {
|
|
32
|
-
flex: 1;
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
padding: 4px;
|
|
36
|
-
border-right: 1px solid var(--sys-color-divider);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
7
|
.origin-warning-icon {
|
|
40
8
|
width: 16px;
|
|
41
9
|
height: 16px;
|
|
@@ -48,24 +16,9 @@
|
|
|
48
16
|
overflow-x: hidden;
|
|
49
17
|
}
|
|
50
18
|
|
|
51
|
-
.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
.origin-mapping-editor {
|
|
56
|
-
display: flex;
|
|
57
|
-
flex-direction: row;
|
|
58
|
-
width: 100%;
|
|
59
|
-
padding: 12px 8px;
|
|
60
|
-
gap: 12px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.origin-mapping-editor label {
|
|
64
|
-
flex: 1;
|
|
19
|
+
.error-message {
|
|
20
|
+
color: var(--sys-color-error);
|
|
21
|
+
margin-top: 8px;
|
|
65
22
|
font-weight: var(--ref-typeface-weight-medium);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.origin-mapping-editor input {
|
|
69
|
-
margin-top: 4px;
|
|
70
|
-
width: 100%;
|
|
23
|
+
white-space: pre-wrap;
|
|
71
24
|
}
|
|
@@ -85,6 +85,12 @@ devtools-performance-third-party-tree-view {
|
|
|
85
85
|
border-left: var(--sys-size-1) solid var(--sys-color-divider);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
&[max-rows] .widget.vbox.timeline-tree-view {
|
|
89
|
+
/* 21px for header + max-rows * 22px rows */
|
|
90
|
+
max-height: calc(21px + (var(--max-rows) * 22px));
|
|
91
|
+
padding: var(--sys-size-3);
|
|
92
|
+
}
|
|
93
|
+
|
|
88
94
|
/* While timeline treeview name-container uses flexbox to layout, it's overkill for this table's purposes.
|
|
89
95
|
By not using it, we can benefit from text-overflow:ellipsis applying correctly to names and entity-badges */
|
|
90
96
|
.timeline-tree-view .data-grid .name-container {
|
|
@@ -390,3 +390,14 @@ Common.Revealer.registerRevealer({
|
|
|
390
390
|
return new Timeline.TimelinePanel.CoreVitalsRevealer();
|
|
391
391
|
},
|
|
392
392
|
});
|
|
393
|
+
|
|
394
|
+
Common.Revealer.registerRevealer({
|
|
395
|
+
contextTypes() {
|
|
396
|
+
return maybeRetrieveContextTypes(Timeline => [Timeline.Utils.Helpers.RevealableTimeRange]);
|
|
397
|
+
},
|
|
398
|
+
destination: Common.Revealer.RevealerDestination.TIMELINE_PANEL,
|
|
399
|
+
async loadRevealer() {
|
|
400
|
+
const Timeline = await loadTimelineModule();
|
|
401
|
+
return new Timeline.TimelinePanel.TimeRangeRevealer();
|
|
402
|
+
},
|
|
403
|
+
});
|
|
@@ -3,35 +3,10 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Platform from '../../../core/platform/platform.js';
|
|
6
|
-
import * as SDK from '../../../core/sdk/sdk.js';
|
|
7
|
-
import * as CrUXManager from '../../../models/crux-manager/crux-manager.js';
|
|
8
6
|
import type * as Trace from '../../../models/trace/trace.js';
|
|
9
7
|
|
|
10
8
|
const MAX_ORIGIN_LENGTH = 60;
|
|
11
9
|
|
|
12
|
-
export function getThrottlingRecommendations(): {
|
|
13
|
-
cpuOption: SDK.CPUThrottlingManager.CPUThrottlingOption|null,
|
|
14
|
-
networkConditions: SDK.NetworkManager.Conditions|null,
|
|
15
|
-
} {
|
|
16
|
-
let cpuOption: SDK.CPUThrottlingManager.CPUThrottlingOption =
|
|
17
|
-
SDK.CPUThrottlingManager.CalibratedMidTierMobileThrottlingOption;
|
|
18
|
-
if (cpuOption.rate() === 0) {
|
|
19
|
-
cpuOption = SDK.CPUThrottlingManager.MidTierThrottlingOption;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let networkConditions = null;
|
|
23
|
-
const response = CrUXManager.CrUXManager.instance().getSelectedFieldMetricData('round_trip_time');
|
|
24
|
-
if (response?.percentiles) {
|
|
25
|
-
const rtt = Number(response.percentiles.p75);
|
|
26
|
-
networkConditions = SDK.NetworkManager.getRecommendedNetworkPreset(rtt);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
cpuOption,
|
|
31
|
-
networkConditions,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
10
|
function createTrimmedUrlSearch(url: URL): string {
|
|
36
11
|
const maxSearchValueLength = 8;
|
|
37
12
|
let search = '';
|
|
@@ -156,3 +131,8 @@ export class RevealableCoreVitals {
|
|
|
156
131
|
constructor(public insightSetKey: string) {
|
|
157
132
|
}
|
|
158
133
|
}
|
|
134
|
+
|
|
135
|
+
export class RevealableTimeRange {
|
|
136
|
+
constructor(public bounds: Trace.Types.Timing.TraceWindowMicro) {
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -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: 0eb4855bda702feaaa8b899336664f97e3df88b8
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
remove: 'Remove',
|
|
22
22
|
} as const;
|
|
23
23
|
|
|
24
|
-
const str_ = i18n.i18n.registerUIStrings('ui/components/
|
|
24
|
+
const str_ = i18n.i18n.registerUIStrings('ui/components/lists/List.ts', UIStrings);
|
|
25
25
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
26
26
|
|
|
27
27
|
export interface ListItemEventDetail {
|
|
@@ -550,11 +550,11 @@ class DataGridElementNode extends SortableDataGridNode<DataGridElementNode> {
|
|
|
550
550
|
}
|
|
551
551
|
const cell = this.createTD(columnId);
|
|
552
552
|
cell.setAttribute('part', `${columnId}-column`);
|
|
553
|
-
if (this.isCreationNode) {
|
|
554
|
-
return cell;
|
|
555
|
-
}
|
|
556
553
|
const configCells = [...this.#configElement.children].filter(c => c.tagName === 'TD') as HTMLTableCellElement[];
|
|
557
554
|
const configCell = configCells[index];
|
|
555
|
+
if (this.isCreationNode && !configCell) {
|
|
556
|
+
return cell;
|
|
557
|
+
}
|
|
558
558
|
if (!configCell) {
|
|
559
559
|
throw new Error(`Column ${columnId} not found in the data grid`);
|
|
560
560
|
}
|
package/package.json
CHANGED
|
File without changes
|