chrome-devtools-frontend 1.0.1583146 → 1.0.1585664
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/InspectorFrontendHostAPI.ts +1 -0
- package/front_end/core/host/InspectorFrontendHostStub.ts +2 -0
- package/front_end/core/root/Runtime.ts +12 -6
- package/front_end/core/sdk/CSSMatchedStyles.ts +3 -0
- package/front_end/core/sdk/CSSMetadata.ts +3 -0
- package/front_end/entrypoints/main/MainImpl.ts +1 -0
- package/front_end/generated/Deprecation.ts +21 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -3
- package/front_end/generated/SupportedCSSProperties.js +10 -4
- package/front_end/generated/protocol-mapping.d.ts +2 -1
- package/front_end/generated/protocol-proxy-api.d.ts +2 -1
- package/front_end/generated/protocol.ts +14 -0
- package/front_end/models/ai_assistance/AiConversation.ts +34 -2
- package/front_end/models/ai_assistance/BuiltInAi.ts +1 -2
- package/front_end/models/ai_assistance/agents/AiAgent.ts +3 -10
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +17 -9
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -24
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +12 -0
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +5 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +16 -8
- package/front_end/models/computed_style/ComputedStyleModel.ts +20 -15
- package/front_end/models/greendev/Prototypes.ts +1 -5
- package/front_end/models/issues_manager/CorsIssue.ts +2 -9
- package/front_end/models/issues_manager/descriptions/corsLocalNetworkAccessPermissionDenied.md +2 -2
- package/front_end/models/javascript_metadata/NativeFunctions.js +20 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +13 -36
- package/front_end/panels/ai_assistance/components/ChatInput.ts +73 -95
- package/front_end/panels/ai_assistance/components/ChatView.ts +13 -2
- package/front_end/panels/application/FrameDetailsView.ts +4 -9
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +10 -0
- package/front_end/panels/console/ConsoleView.ts +1 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +19 -12
- package/front_end/panels/elements/ComputedStyleWidget.ts +41 -21
- package/front_end/panels/elements/ElementsPanel.ts +18 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +173 -169
- package/front_end/panels/elements/NodeStackTraceWidget.ts +3 -13
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +69 -0
- package/front_end/panels/elements/computedStyleWidget.css +1 -6
- package/front_end/panels/elements/elements.ts +3 -1
- package/front_end/panels/issues/AffectedResourcesView.ts +1 -2
- package/front_end/panels/network/NetworkDataGridNode.ts +0 -8
- package/front_end/panels/network/RequestConditionsDrawer.ts +138 -112
- package/front_end/panels/network/RequestInitiatorView.ts +2 -10
- package/front_end/panels/settings/SettingsScreen.ts +12 -4
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +6 -9
- package/front_end/panels/sources/CallStackSidebarPane.ts +4 -6
- package/front_end/panels/sources/DebuggerPlugin.ts +2 -1
- package/front_end/panels/sources/GoToLineQuickOpen.ts +0 -4
- package/front_end/panels/sources/OpenFileQuickOpen.ts +0 -4
- package/front_end/panels/sources/OutlineQuickOpen.ts +0 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -1
- package/front_end/panels/sources/sources-meta.ts +9 -6
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -12
- package/front_end/panels/timeline/TimelinePanel.ts +35 -15
- package/front_end/panels/timeline/TimelineUIUtils.ts +2 -6
- package/front_end/panels/timeline/components/Sidebar.ts +21 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -20
- package/front_end/panels/timeline/components/insights/InsightRenderer.ts +0 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/encoding.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/encoding.js +5 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/encoding.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +8 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/encoding.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/encoding.js +5 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/encoding.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +4 -3
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/encoding.ts +5 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +3 -0
- package/front_end/ui/components/linkifier/LinkifierUtils.ts +3 -0
- package/front_end/ui/components/text_editor/AiCodeGenerationParser.ts +29 -7
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +34 -18
- package/front_end/ui/legacy/InspectorView.ts +41 -15
- package/front_end/ui/legacy/UIUtils.ts +30 -6
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +4 -3
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +2 -1
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +8 -2
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +8 -8
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +20 -150
- package/front_end/ui/legacy/components/utils/Linkifier.ts +120 -87
- package/front_end/ui/legacy/components/utils/jsUtils.css +0 -9
- package/front_end/ui/legacy/legacy.ts +0 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/mcp/HostBindings.ts +3 -0
- package/package.json +1 -1
- package/front_end/models/issues_manager/descriptions/corsInsecurePrivateNetwork.md +0 -10
- package/front_end/models/issues_manager/descriptions/corsPreflightAllowPrivateNetworkError.md +0 -10
- package/front_end/models/issues_manager/descriptions/corsPrivateNetworkPermissionDenied.md +0 -10
- package/front_end/ui/legacy/Floaty.ts +0 -438
- package/front_end/ui/legacy/floaty.css +0 -77
|
@@ -183,6 +183,109 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
183
183
|
target);
|
|
184
184
|
};
|
|
185
185
|
|
|
186
|
+
function renderItem(
|
|
187
|
+
condition: SDK.NetworkManager.RequestCondition, editable: boolean, index: number,
|
|
188
|
+
onToggle: (condition: SDK.NetworkManager.RequestCondition) => void,
|
|
189
|
+
onConditionsChanged: (
|
|
190
|
+
condition: SDK.NetworkManager.RequestCondition, conditions: SDK.NetworkManager.ThrottlingConditions) => void,
|
|
191
|
+
onIncreasePriority: (condition: SDK.NetworkManager.RequestCondition) => void,
|
|
192
|
+
onDecreasePriority: (condition: SDK.NetworkManager.RequestCondition) => void,
|
|
193
|
+
lookUpRequestCount: (condition: SDK.NetworkManager.RequestCondition) => number): LitTemplate {
|
|
194
|
+
const {enabled, originalOrUpgradedURLPattern, constructorStringOrWildcardURL, wildcardURL} = condition;
|
|
195
|
+
const toggle = (e: Event): void => {
|
|
196
|
+
e.consume(true);
|
|
197
|
+
onToggle(condition);
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
const moveUp = (e: Event): void => {
|
|
201
|
+
e.consume(true);
|
|
202
|
+
onIncreasePriority(condition);
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const moveDown = (e: Event): void => {
|
|
206
|
+
e.consume(true);
|
|
207
|
+
onDecreasePriority(condition);
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
// clang-format off
|
|
211
|
+
return html`
|
|
212
|
+
<input class=blocked-url-checkbox
|
|
213
|
+
@change=${toggle}
|
|
214
|
+
type=checkbox
|
|
215
|
+
title=${i18nString(UIStrings.enableThrottlingToggleLabel, {PH1: constructorStringOrWildcardURL})}
|
|
216
|
+
.checked=${live(enabled)}
|
|
217
|
+
.disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
218
|
+
jslog=${VisualLogging.toggle().track({ change: true })}>
|
|
219
|
+
<devtools-button
|
|
220
|
+
.iconName=${'arrow-up'}
|
|
221
|
+
.variant=${Buttons.Button.Variant.ICON}
|
|
222
|
+
.title=${i18nString(UIStrings.increasePriority, {PH1: constructorStringOrWildcardURL})}
|
|
223
|
+
.jslogContext=${'decrease-priority'}
|
|
224
|
+
?disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
225
|
+
@click=${moveUp}>
|
|
226
|
+
</devtools-button>
|
|
227
|
+
<devtools-button
|
|
228
|
+
.iconName=${'arrow-down'}
|
|
229
|
+
.variant=${Buttons.Button.Variant.ICON}
|
|
230
|
+
.title=${i18nString(UIStrings.decreasePriority, {PH1: constructorStringOrWildcardURL})}
|
|
231
|
+
.jslogContext=${'increase-priority'}
|
|
232
|
+
?disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
233
|
+
@click=${moveDown}></devtools-button>
|
|
234
|
+
${originalOrUpgradedURLPattern ? html`
|
|
235
|
+
<devtools-tooltip variant=rich jslogcontext=url-pattern id=url-pattern-${index}>
|
|
236
|
+
<div>hash: ${originalOrUpgradedURLPattern.hash}</div>
|
|
237
|
+
<div>hostname: ${originalOrUpgradedURLPattern.hostname}</div>
|
|
238
|
+
<div>password: ${originalOrUpgradedURLPattern.password}</div>
|
|
239
|
+
<div>pathname: ${originalOrUpgradedURLPattern.pathname}</div>
|
|
240
|
+
<div>port: ${originalOrUpgradedURLPattern.port}</div>
|
|
241
|
+
<div>protocol: ${originalOrUpgradedURLPattern.protocol}</div>
|
|
242
|
+
<div>search: ${originalOrUpgradedURLPattern.search}</div>
|
|
243
|
+
<div>username: ${originalOrUpgradedURLPattern.username}</div>
|
|
244
|
+
<hr />
|
|
245
|
+
${learnMore()}
|
|
246
|
+
</devtools-tooltip>` : nothing}
|
|
247
|
+
${wildcardURL ? html`
|
|
248
|
+
<devtools-icon name=warning-filled class="small warning" aria-details=url-pattern-warning-${index}>
|
|
249
|
+
</devtools-icon>
|
|
250
|
+
<devtools-tooltip variant=rich jslogcontext=url-pattern-warning id=url-pattern-warning-${index}>
|
|
251
|
+
${i18nString(UIStrings.patternWasUpgraded, {PH1: wildcardURL})}
|
|
252
|
+
</devtools-tooltip>
|
|
253
|
+
`: nothing}
|
|
254
|
+
${!originalOrUpgradedURLPattern ? html`
|
|
255
|
+
<devtools-icon name=cross-circle-filled class=small aria-details=url-pattern-error-${index}>
|
|
256
|
+
</devtools-icon>
|
|
257
|
+
<devtools-tooltip variant=rich jslogcontext=url-pattern-warning id=url-pattern-error-${index}>
|
|
258
|
+
${SDK.NetworkManager.RequestURLPattern.isValidPattern(constructorStringOrWildcardURL) ===
|
|
259
|
+
SDK.NetworkManager.RequestURLPatternValidity.HAS_REGEXP_GROUPS
|
|
260
|
+
? i18nString(UIStrings.patternFailedWithRegExpGroups)
|
|
261
|
+
: i18nString(UIStrings.patternFailedToParse)}
|
|
262
|
+
${learnMore()}
|
|
263
|
+
</devtools-tooltip>`: nothing}
|
|
264
|
+
<div
|
|
265
|
+
@click=${toggle}
|
|
266
|
+
?disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
267
|
+
class=blocked-url-label
|
|
268
|
+
aria-details=url-pattern-${index}>
|
|
269
|
+
${constructorStringOrWildcardURL}
|
|
270
|
+
</div>
|
|
271
|
+
<devtools-widget
|
|
272
|
+
class=conditions-selector
|
|
273
|
+
title=${i18nString(UIStrings.requestConditionsLabel)}
|
|
274
|
+
.widgetConfig=${UI.Widget.widgetConfig(
|
|
275
|
+
MobileThrottling.NetworkThrottlingSelector.NetworkThrottlingSelectorWidget, {
|
|
276
|
+
variant:
|
|
277
|
+
MobileThrottling.NetworkThrottlingSelector.NetworkThrottlingSelect.Variant.INDIVIDUAL_REQUEST_CONDITIONS,
|
|
278
|
+
jslogContext: 'request-conditions',
|
|
279
|
+
disabled: !editable,
|
|
280
|
+
onConditionsChanged: conditions => onConditionsChanged(condition, conditions),
|
|
281
|
+
currentConditions: condition.conditions,
|
|
282
|
+
})}></devtools-widget>
|
|
283
|
+
<devtools-widget
|
|
284
|
+
?disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
285
|
+
.widgetConfig=${widgetConfig(AffectedCountWidget, {condition, lookUpRequestCount})}></devtools-widget>`;
|
|
286
|
+
// clang-format on
|
|
287
|
+
}
|
|
288
|
+
|
|
186
289
|
interface AffectedCountViewInput {
|
|
187
290
|
count: number;
|
|
188
291
|
}
|
|
@@ -198,39 +301,36 @@ function matchesUrl(conditions: SDK.NetworkManager.RequestCondition, url: string
|
|
|
198
301
|
export class AffectedCountWidget extends UI.Widget.Widget {
|
|
199
302
|
readonly #view: AffectedCountView;
|
|
200
303
|
#condition?: SDK.NetworkManager.RequestCondition;
|
|
201
|
-
#
|
|
304
|
+
#lookUpRequestCount?: (condition: SDK.NetworkManager.RequestCondition) => number;
|
|
305
|
+
|
|
202
306
|
constructor(target?: HTMLElement, view = AFFECTED_COUNT_DEFAULT_VIEW) {
|
|
203
307
|
super(target, {classes: ['blocked-url-count']});
|
|
204
308
|
this.#view = view;
|
|
205
309
|
}
|
|
206
310
|
|
|
207
|
-
get
|
|
208
|
-
return this.#
|
|
311
|
+
get lookUpRequestCount(): ((condition: SDK.NetworkManager.RequestCondition) => number)|undefined {
|
|
312
|
+
return this.#lookUpRequestCount;
|
|
209
313
|
}
|
|
210
314
|
|
|
211
|
-
set
|
|
212
|
-
this.#
|
|
213
|
-
this.requestUpdate();
|
|
315
|
+
set lookUpRequestCount(val: (condition: SDK.NetworkManager.RequestCondition) => number) {
|
|
316
|
+
this.#lookUpRequestCount = val;
|
|
214
317
|
}
|
|
215
318
|
|
|
216
|
-
get
|
|
217
|
-
return this.#
|
|
319
|
+
get condition(): SDK.NetworkManager.RequestCondition|undefined {
|
|
320
|
+
return this.#condition;
|
|
218
321
|
}
|
|
219
322
|
|
|
220
|
-
set
|
|
221
|
-
this.#
|
|
323
|
+
set condition(conditions: SDK.NetworkManager.RequestCondition) {
|
|
324
|
+
this.#condition = conditions;
|
|
222
325
|
this.requestUpdate();
|
|
223
326
|
}
|
|
224
327
|
|
|
225
328
|
override performUpdate(): void {
|
|
226
|
-
if (!this.#condition || !this.#
|
|
329
|
+
if (!this.#condition || !this.#lookUpRequestCount) {
|
|
227
330
|
return;
|
|
228
331
|
}
|
|
229
332
|
|
|
230
|
-
|
|
231
|
-
this.#drawer.throttledRequestsCount(this.#condition);
|
|
232
|
-
|
|
233
|
-
this.#view({count}, {}, this.element);
|
|
333
|
+
this.#view({count: this.#lookUpRequestCount(this.#condition)}, {}, this.element);
|
|
234
334
|
}
|
|
235
335
|
|
|
236
336
|
override wasShown(): void {
|
|
@@ -342,112 +442,38 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
|
|
|
342
442
|
|
|
343
443
|
updateItem(element: HTMLElement, condition: SDK.NetworkManager.RequestCondition, editable: boolean, index: number):
|
|
344
444
|
void {
|
|
345
|
-
const
|
|
445
|
+
const onToggle = (condition: {enabled: boolean}): void => {
|
|
346
446
|
if (editable) {
|
|
347
|
-
e.consume(true);
|
|
348
447
|
condition.enabled = !condition.enabled;
|
|
349
448
|
}
|
|
350
449
|
};
|
|
351
|
-
const onConditionsChanged = (conditions: SDK.NetworkManager.ThrottlingConditions): void => {
|
|
352
|
-
if (editable) {
|
|
353
|
-
condition.conditions = conditions;
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
450
|
|
|
357
|
-
const
|
|
451
|
+
const onConditionsChanged =
|
|
452
|
+
(condition: {conditions: SDK.NetworkManager.ThrottlingConditions},
|
|
453
|
+
conditions: SDK.NetworkManager.ThrottlingConditions): void => {
|
|
454
|
+
if (editable) {
|
|
455
|
+
condition.conditions = conditions;
|
|
456
|
+
}
|
|
457
|
+
};
|
|
358
458
|
|
|
359
|
-
const
|
|
459
|
+
const onIncreasePriority = (condition: SDK.NetworkManager.RequestCondition): void => {
|
|
360
460
|
if (this.manager.requestConditions.conditionsEnabled) {
|
|
361
461
|
UI.ARIAUtils.LiveAnnouncer.status(i18nString(UIStrings.patternMovedUp));
|
|
362
|
-
e.consume(true);
|
|
363
462
|
this.manager.requestConditions.increasePriority(condition);
|
|
364
463
|
}
|
|
365
464
|
};
|
|
366
|
-
|
|
465
|
+
|
|
466
|
+
const onDecreasePriority = (condition: SDK.NetworkManager.RequestCondition): void => {
|
|
367
467
|
if (this.manager.requestConditions.conditionsEnabled) {
|
|
368
468
|
UI.ARIAUtils.LiveAnnouncer.status(i18nString(UIStrings.patternMovedDown));
|
|
369
|
-
e.consume(true);
|
|
370
469
|
this.manager.requestConditions.decreasePriority(condition);
|
|
371
470
|
}
|
|
372
471
|
};
|
|
472
|
+
|
|
373
473
|
render(
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
@change=${toggle}
|
|
378
|
-
type=checkbox
|
|
379
|
-
title=${i18nString(UIStrings.enableThrottlingToggleLabel, {PH1: constructorStringOrWildcardURL})}
|
|
380
|
-
.checked=${live(enabled)}
|
|
381
|
-
.disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
382
|
-
jslog=${VisualLogging.toggle().track({ change: true })}>
|
|
383
|
-
<devtools-button
|
|
384
|
-
.iconName=${'arrow-up'}
|
|
385
|
-
.variant=${Buttons.Button.Variant.ICON}
|
|
386
|
-
.title=${i18nString(UIStrings.increasePriority, {PH1: constructorStringOrWildcardURL})}
|
|
387
|
-
.jslogContext=${'decrease-priority'}
|
|
388
|
-
?disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
389
|
-
@click=${moveUp}>
|
|
390
|
-
</devtools-button>
|
|
391
|
-
<devtools-button
|
|
392
|
-
.iconName=${'arrow-down'}
|
|
393
|
-
.variant=${Buttons.Button.Variant.ICON}
|
|
394
|
-
.title=${i18nString(UIStrings.decreasePriority, {PH1: constructorStringOrWildcardURL})}
|
|
395
|
-
.jslogContext=${'increase-priority'}
|
|
396
|
-
?disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
397
|
-
@click=${moveDown}></devtools-button>
|
|
398
|
-
${originalOrUpgradedURLPattern ? html`
|
|
399
|
-
<devtools-tooltip variant=rich jslogcontext=url-pattern id=url-pattern-${index}>
|
|
400
|
-
<div>hash: ${originalOrUpgradedURLPattern.hash}</div>
|
|
401
|
-
<div>hostname: ${originalOrUpgradedURLPattern.hostname}</div>
|
|
402
|
-
<div>password: ${originalOrUpgradedURLPattern.password}</div>
|
|
403
|
-
<div>pathname: ${originalOrUpgradedURLPattern.pathname}</div>
|
|
404
|
-
<div>port: ${originalOrUpgradedURLPattern.port}</div>
|
|
405
|
-
<div>protocol: ${originalOrUpgradedURLPattern.protocol}</div>
|
|
406
|
-
<div>search: ${originalOrUpgradedURLPattern.search}</div>
|
|
407
|
-
<div>username: ${originalOrUpgradedURLPattern.username}</div>
|
|
408
|
-
<hr />
|
|
409
|
-
${learnMore()}
|
|
410
|
-
</devtools-tooltip>` : nothing}
|
|
411
|
-
${wildcardURL ? html`
|
|
412
|
-
<devtools-icon name=warning-filled class="small warning" aria-details=url-pattern-warning-${index}>
|
|
413
|
-
</devtools-icon>
|
|
414
|
-
<devtools-tooltip variant=rich jslogcontext=url-pattern-warning id=url-pattern-warning-${index}>
|
|
415
|
-
${i18nString(UIStrings.patternWasUpgraded, {PH1: wildcardURL})}
|
|
416
|
-
</devtools-tooltip>
|
|
417
|
-
`: nothing}
|
|
418
|
-
${!originalOrUpgradedURLPattern ? html`
|
|
419
|
-
<devtools-icon name=cross-circle-filled class=small aria-details=url-pattern-error-${index}>
|
|
420
|
-
</devtools-icon>
|
|
421
|
-
<devtools-tooltip variant=rich jslogcontext=url-pattern-warning id=url-pattern-error-${index}>
|
|
422
|
-
${SDK.NetworkManager.RequestURLPattern.isValidPattern(constructorStringOrWildcardURL) ===
|
|
423
|
-
SDK.NetworkManager.RequestURLPatternValidity.HAS_REGEXP_GROUPS
|
|
424
|
-
? i18nString(UIStrings.patternFailedWithRegExpGroups)
|
|
425
|
-
: i18nString(UIStrings.patternFailedToParse)}
|
|
426
|
-
${learnMore()}
|
|
427
|
-
</devtools-tooltip>`: nothing}
|
|
428
|
-
<div
|
|
429
|
-
@click=${toggle}
|
|
430
|
-
?disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
431
|
-
class=blocked-url-label
|
|
432
|
-
aria-details=url-pattern-${index}>
|
|
433
|
-
${constructorStringOrWildcardURL}
|
|
434
|
-
</div>
|
|
435
|
-
<devtools-widget
|
|
436
|
-
class=conditions-selector
|
|
437
|
-
title=${i18nString(UIStrings.requestConditionsLabel)}
|
|
438
|
-
.widgetConfig=${UI.Widget.widgetConfig(
|
|
439
|
-
MobileThrottling.NetworkThrottlingSelector.NetworkThrottlingSelectorWidget, {
|
|
440
|
-
variant:
|
|
441
|
-
MobileThrottling.NetworkThrottlingSelector.NetworkThrottlingSelect.Variant.INDIVIDUAL_REQUEST_CONDITIONS,
|
|
442
|
-
jslogContext: 'request-conditions',
|
|
443
|
-
disabled: !editable,
|
|
444
|
-
onConditionsChanged,
|
|
445
|
-
currentConditions: condition.conditions,
|
|
446
|
-
})}></devtools-widget>
|
|
447
|
-
<devtools-widget
|
|
448
|
-
?disabled=${!editable || !originalOrUpgradedURLPattern}
|
|
449
|
-
.widgetConfig=${widgetConfig(AffectedCountWidget, {condition, drawer: this})}></devtools-widget>`,
|
|
450
|
-
// clang-format on
|
|
474
|
+
renderItem(
|
|
475
|
+
condition, editable, index, onToggle, onConditionsChanged, onIncreasePriority, onDecreasePriority,
|
|
476
|
+
this.#getRequestCount.bind(this)),
|
|
451
477
|
element);
|
|
452
478
|
}
|
|
453
479
|
|
|
@@ -546,17 +572,17 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
|
|
|
546
572
|
this.requestUpdate();
|
|
547
573
|
}
|
|
548
574
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
575
|
+
#getRequestCount(condition: SDK.NetworkManager.RequestCondition): number {
|
|
576
|
+
if (condition.isBlocking) {
|
|
577
|
+
let result = 0;
|
|
578
|
+
for (const blockedUrl of this.blockedCountForUrl.keys()) {
|
|
579
|
+
if (matchesUrl(condition, blockedUrl)) {
|
|
580
|
+
result += (this.blockedCountForUrl.get(blockedUrl) as number);
|
|
581
|
+
}
|
|
554
582
|
}
|
|
583
|
+
return result;
|
|
555
584
|
}
|
|
556
|
-
return result;
|
|
557
|
-
}
|
|
558
585
|
|
|
559
|
-
throttledRequestsCount(condition: SDK.NetworkManager.RequestCondition): number {
|
|
560
586
|
let result = 0;
|
|
561
587
|
for (const ruleId of condition.ruleIds) {
|
|
562
588
|
result += this.#throttledCount.get(ruleId) ?? 0;
|
|
@@ -39,8 +39,6 @@ export interface ViewInput {
|
|
|
39
39
|
initiatorGraph: Logs.NetworkLog.InitiatorGraph;
|
|
40
40
|
stackTrace: StackTrace.StackTrace.StackTrace|null;
|
|
41
41
|
request: SDK.NetworkRequest.NetworkRequest;
|
|
42
|
-
linkifier: Components.Linkifier.Linkifier;
|
|
43
|
-
target?: SDK.Target.Target;
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
|
|
@@ -68,8 +66,6 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
68
66
|
<ul role="group">
|
|
69
67
|
<li role="treeitem">
|
|
70
68
|
<devtools-widget .widgetConfig=${widgetConfig(Components.JSPresentationUtils.StackTracePreviewContent, {
|
|
71
|
-
target: input.target,
|
|
72
|
-
linkifier: input.linkifier,
|
|
73
69
|
options: {tabStops: true},
|
|
74
70
|
stackTrace: input.stackTrace,
|
|
75
71
|
})}></devtools-widget>
|
|
@@ -165,7 +161,6 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
165
161
|
type View = typeof DEFAULT_VIEW;
|
|
166
162
|
|
|
167
163
|
export class RequestInitiatorView extends UI.Widget.VBox {
|
|
168
|
-
private readonly linkifier: Components.Linkifier.Linkifier;
|
|
169
164
|
private readonly request: SDK.NetworkRequest.NetworkRequest;
|
|
170
165
|
#view: View;
|
|
171
166
|
|
|
@@ -173,7 +168,6 @@ export class RequestInitiatorView extends UI.Widget.VBox {
|
|
|
173
168
|
super({jslog: `${VisualLogging.pane('initiator').track({resize: true})}`});
|
|
174
169
|
|
|
175
170
|
this.element.classList.add('request-initiator-view');
|
|
176
|
-
this.linkifier = new Components.Linkifier.Linkifier();
|
|
177
171
|
this.request = request;
|
|
178
172
|
this.#view = view;
|
|
179
173
|
}
|
|
@@ -192,8 +186,8 @@ export class RequestInitiatorView extends UI.Widget.VBox {
|
|
|
192
186
|
const networkManager = SDK.NetworkManager.NetworkManager.forRequest(request);
|
|
193
187
|
const target = networkManager?.target() ?? targetManager.primaryPageTarget() ?? targetManager.rootTarget();
|
|
194
188
|
let stackTrace: StackTrace.StackTrace.StackTrace|null = null;
|
|
195
|
-
const preview = new Components.JSPresentationUtils.StackTracePreviewContent(
|
|
196
|
-
|
|
189
|
+
const preview = new Components.JSPresentationUtils.StackTracePreviewContent();
|
|
190
|
+
preview.options = {tabStops: focusableLink};
|
|
197
191
|
if (target) {
|
|
198
192
|
stackTrace = await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()
|
|
199
193
|
.createStackTraceFromProtocolRuntime(initiator.stack, target);
|
|
@@ -219,8 +213,6 @@ export class RequestInitiatorView extends UI.Widget.VBox {
|
|
|
219
213
|
initiatorGraph,
|
|
220
214
|
stackTrace,
|
|
221
215
|
request: this.request,
|
|
222
|
-
linkifier: this.linkifier,
|
|
223
|
-
target: target || undefined,
|
|
224
216
|
};
|
|
225
217
|
|
|
226
218
|
this.#view(viewInput, undefined, this.contentElement);
|
|
@@ -60,6 +60,10 @@ const UIStrings = {
|
|
|
60
60
|
* @description Message to display if a setting change requires a reload of DevTools
|
|
61
61
|
*/
|
|
62
62
|
settingsChangedReloadDevTools: 'Settings changed. To apply, reload DevTools.',
|
|
63
|
+
/**
|
|
64
|
+
* @description Message to display if a setting change requires a reload of DevTools
|
|
65
|
+
*/
|
|
66
|
+
settingsChangedRestartChrome: 'Settings changed. To apply, restart Chrome.',
|
|
63
67
|
/**
|
|
64
68
|
* @description Warning text shown when the user has entered text to filter the
|
|
65
69
|
* list of experiments, but no experiments match the filter.
|
|
@@ -464,8 +468,13 @@ export class ExperimentsSettingsTab extends UI.Widget.VBox implements SettingsTa
|
|
|
464
468
|
}
|
|
465
469
|
experiment.setEnabled(checkbox.checked);
|
|
466
470
|
Host.userMetrics.experimentChanged(experiment.name, experiment.isEnabled());
|
|
467
|
-
|
|
468
|
-
|
|
471
|
+
if (experiment instanceof Root.Runtime.HostExperiment && experiment.requiresChromeRestart) {
|
|
472
|
+
UI.InspectorView.InspectorView.instance().displayChromeRestartRequiredWarning(
|
|
473
|
+
i18nString(UIStrings.settingsChangedRestartChrome));
|
|
474
|
+
} else {
|
|
475
|
+
UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(
|
|
476
|
+
i18nString(UIStrings.settingsChangedReloadDevTools));
|
|
477
|
+
}
|
|
469
478
|
}
|
|
470
479
|
checkbox.addEventListener('click', listener, false);
|
|
471
480
|
|
|
@@ -628,7 +637,7 @@ const GREENDEV_VIEW: View = (input, _output, target) => {
|
|
|
628
637
|
<span>${i18nString(UIStrings.greenDevUnstable)}</span>
|
|
629
638
|
</div>
|
|
630
639
|
<div class="settings-experiments-block">
|
|
631
|
-
${renderPrototypeCheckboxes(input.settings, ['aiAnnotations', '
|
|
640
|
+
${renderPrototypeCheckboxes(input.settings, ['aiAnnotations', 'copyToGemini'])}
|
|
632
641
|
</div>
|
|
633
642
|
</devtools-card>
|
|
634
643
|
</div>
|
|
@@ -637,7 +646,6 @@ const GREENDEV_VIEW: View = (input, _output, target) => {
|
|
|
637
646
|
};
|
|
638
647
|
|
|
639
648
|
const GREENDEV_PROTOTYPE_NAMES: Record<keyof GreenDev.GreenDevSettings, string> = {
|
|
640
|
-
inDevToolsFloaty: 'In DevTools context picker',
|
|
641
649
|
aiAnnotations: 'AI auto-annotations',
|
|
642
650
|
copyToGemini: 'Copy changes to AI Prompt'
|
|
643
651
|
};
|
|
@@ -37,16 +37,12 @@ const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined
|
|
|
37
37
|
let snippetsQuickOpenInstance: SnippetsQuickOpen;
|
|
38
38
|
|
|
39
39
|
export class SnippetsQuickOpen extends QuickOpen.FilteredListWidget.Provider {
|
|
40
|
-
private snippets: Workspace.UISourceCode.UISourceCode[];
|
|
41
|
-
private constructor() {
|
|
42
|
-
super('snippet');
|
|
43
|
-
this.snippets = [];
|
|
44
|
-
}
|
|
40
|
+
private snippets: Workspace.UISourceCode.UISourceCode[] = [];
|
|
45
41
|
|
|
46
|
-
static instance(opts: {forceNew: boolean|null
|
|
47
|
-
const {forceNew} = opts;
|
|
42
|
+
static instance(opts: {forceNew: boolean|null, jslogContext: string}): SnippetsQuickOpen {
|
|
43
|
+
const {forceNew, jslogContext} = opts;
|
|
48
44
|
if (!snippetsQuickOpenInstance || forceNew) {
|
|
49
|
-
snippetsQuickOpenInstance = new SnippetsQuickOpen();
|
|
45
|
+
snippetsQuickOpenInstance = new SnippetsQuickOpen(jslogContext);
|
|
50
46
|
}
|
|
51
47
|
|
|
52
48
|
return snippetsQuickOpenInstance;
|
|
@@ -102,8 +98,9 @@ export class SnippetsQuickOpen extends QuickOpen.FilteredListWidget.Provider {
|
|
|
102
98
|
QuickOpen.FilteredListWidget.registerProvider({
|
|
103
99
|
prefix: '!',
|
|
104
100
|
iconName: 'exclamation',
|
|
105
|
-
provider:
|
|
101
|
+
provider: jslogContext => Promise.resolve(SnippetsQuickOpen.instance({forceNew: null, jslogContext})),
|
|
106
102
|
helpTitle: i18nLazyString(UIStrings.runSnippet),
|
|
107
103
|
titlePrefix: i18nLazyString(UIStrings.run),
|
|
108
104
|
titleSuggestion: i18nLazyString(UIStrings.snippet),
|
|
105
|
+
jslogContext: 'snippet'
|
|
109
106
|
});
|
|
@@ -33,7 +33,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
33
33
|
import * as Host from '../../core/host/host.js';
|
|
34
34
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
35
35
|
import * as Platform from '../../core/platform/platform.js';
|
|
36
|
-
import * as SDK from '../../core/sdk/sdk.js';
|
|
36
|
+
import type * as SDK from '../../core/sdk/sdk.js';
|
|
37
37
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
38
38
|
import * as Persistence from '../../models/persistence/persistence.js';
|
|
39
39
|
import * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
@@ -231,7 +231,6 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
|
231
231
|
this.ignoreListMessageElement.classList.add('hidden');
|
|
232
232
|
this.showMoreMessageElement.classList.add('hidden');
|
|
233
233
|
this.items.replaceAll([]);
|
|
234
|
-
UI.Context.Context.instance().setFlavor(SDK.DebuggerModel.CallFrame, null);
|
|
235
234
|
UI.Context.Context.instance().setFlavor(StackTrace.StackTrace.DebuggableFrameFlavor, null);
|
|
236
235
|
return;
|
|
237
236
|
}
|
|
@@ -424,7 +423,6 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
|
424
423
|
const oldItem = this.activeCallFrameItem();
|
|
425
424
|
if (debuggerCallFrame) {
|
|
426
425
|
debuggerCallFrame.sdkFrame.debuggerModel.setSelectedCallFrame(debuggerCallFrame.sdkFrame);
|
|
427
|
-
UI.Context.Context.instance().setFlavor(SDK.DebuggerModel.CallFrame, debuggerCallFrame.sdkFrame);
|
|
428
426
|
UI.Context.Context.instance().setFlavor(
|
|
429
427
|
StackTrace.StackTrace.DebuggableFrameFlavor,
|
|
430
428
|
StackTrace.StackTrace.DebuggableFrameFlavor.for(debuggerCallFrame));
|
|
@@ -440,9 +438,9 @@ export class CallStackSidebarPane extends UI.View.SimpleView implements UI.Conte
|
|
|
440
438
|
}
|
|
441
439
|
|
|
442
440
|
activeCallFrameItem(): Item|null {
|
|
443
|
-
const
|
|
444
|
-
if (
|
|
445
|
-
return this.items.find(callFrameItem => callFrameItem.frame
|
|
441
|
+
const frameFlavor = UI.Context.Context.instance().flavor(StackTrace.StackTrace.DebuggableFrameFlavor);
|
|
442
|
+
if (frameFlavor) {
|
|
443
|
+
return this.items.find(callFrameItem => callFrameItem.frame === frameFlavor.frame) || null;
|
|
446
444
|
}
|
|
447
445
|
return null;
|
|
448
446
|
}
|
|
@@ -1741,7 +1741,8 @@ export class DebuggerPlugin extends Plugin {
|
|
|
1741
1741
|
// still running or scheduled will early return and not do any work.
|
|
1742
1742
|
this.editor = undefined;
|
|
1743
1743
|
|
|
1744
|
-
UI.Context.Context.instance().removeFlavorChangeListener(
|
|
1744
|
+
UI.Context.Context.instance().removeFlavorChangeListener(
|
|
1745
|
+
StackTrace.StackTrace.DebuggableFrameFlavor, this.callFrameChanged, this);
|
|
1745
1746
|
}
|
|
1746
1747
|
|
|
1747
1748
|
/**
|
|
@@ -59,10 +59,6 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
59
59
|
export class GoToLineQuickOpen extends QuickOpen.FilteredListWidget.Provider {
|
|
60
60
|
#goToLineStrings: string[] = [];
|
|
61
61
|
|
|
62
|
-
constructor() {
|
|
63
|
-
super('source-line');
|
|
64
|
-
}
|
|
65
|
-
|
|
66
62
|
override selectItem(_itemIndex: number|null, promptValue: string): void {
|
|
67
63
|
const sourceFrame = this.currentSourceFrame();
|
|
68
64
|
if (!sourceFrame) {
|
|
@@ -16,10 +16,6 @@ import {SourcesView} from './SourcesView.js';
|
|
|
16
16
|
const {styleMap} = Directives;
|
|
17
17
|
|
|
18
18
|
export class OpenFileQuickOpen extends FilteredUISourceCodeListProvider {
|
|
19
|
-
constructor() {
|
|
20
|
-
super('source-file');
|
|
21
|
-
}
|
|
22
|
-
|
|
23
19
|
override attach(): void {
|
|
24
20
|
this.setDefaultScores(SourcesView.defaultUISourceCodeScores());
|
|
25
21
|
super.attach();
|
|
@@ -298,10 +298,6 @@ export class OutlineQuickOpen extends QuickOpen.FilteredListWidget.Provider {
|
|
|
298
298
|
private items: OutlineItem[] = [];
|
|
299
299
|
private active = false;
|
|
300
300
|
|
|
301
|
-
constructor() {
|
|
302
|
-
super('source-symbol');
|
|
303
|
-
}
|
|
304
|
-
|
|
305
301
|
override attach(): void {
|
|
306
302
|
const sourceFrame = this.currentSourceFrame();
|
|
307
303
|
if (sourceFrame) {
|
|
@@ -41,6 +41,7 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
41
41
|
import type * as Protocol from '../../generated/protocol.js';
|
|
42
42
|
import * as Formatter from '../../models/formatter/formatter.js';
|
|
43
43
|
import * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';
|
|
44
|
+
import * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
44
45
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
45
46
|
import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
46
47
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
@@ -140,7 +141,8 @@ export class WatchExpressionsSidebarPane extends UI.Widget.VBox implements
|
|
|
140
141
|
new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController(this.treeOutline);
|
|
141
142
|
|
|
142
143
|
UI.Context.Context.instance().addFlavorChangeListener(SDK.RuntimeModel.ExecutionContext, this.requestUpdate, this);
|
|
143
|
-
UI.Context.Context.instance().addFlavorChangeListener(
|
|
144
|
+
UI.Context.Context.instance().addFlavorChangeListener(
|
|
145
|
+
StackTrace.StackTrace.DebuggableFrameFlavor, this.requestUpdate, this);
|
|
144
146
|
this.linkifier = new Components.Linkifier.Linkifier();
|
|
145
147
|
this.requestUpdate();
|
|
146
148
|
}
|
|
@@ -2008,37 +2008,40 @@ UI.ContextMenu.registerItem({
|
|
|
2008
2008
|
QuickOpen.FilteredListWidget.registerProvider({
|
|
2009
2009
|
prefix: '@',
|
|
2010
2010
|
iconName: 'symbol',
|
|
2011
|
-
async provider() {
|
|
2011
|
+
async provider(jslogContext: string) {
|
|
2012
2012
|
const Sources = await loadSourcesModule();
|
|
2013
|
-
return new Sources.OutlineQuickOpen.OutlineQuickOpen();
|
|
2013
|
+
return new Sources.OutlineQuickOpen.OutlineQuickOpen(jslogContext);
|
|
2014
2014
|
},
|
|
2015
2015
|
helpTitle: i18nLazyString(UIStrings.goToSymbol),
|
|
2016
2016
|
titlePrefix: i18nLazyString(UIStrings.goTo),
|
|
2017
2017
|
titleSuggestion: i18nLazyString(UIStrings.symbol),
|
|
2018
|
+
jslogContext: 'source-symbol'
|
|
2018
2019
|
});
|
|
2019
2020
|
|
|
2020
2021
|
QuickOpen.FilteredListWidget.registerProvider({
|
|
2021
2022
|
prefix: ':',
|
|
2022
2023
|
iconName: 'colon',
|
|
2023
|
-
async provider() {
|
|
2024
|
+
async provider(jslogContext: string) {
|
|
2024
2025
|
const Sources = await loadSourcesModule();
|
|
2025
|
-
return new Sources.GoToLineQuickOpen.GoToLineQuickOpen();
|
|
2026
|
+
return new Sources.GoToLineQuickOpen.GoToLineQuickOpen(jslogContext);
|
|
2026
2027
|
},
|
|
2027
2028
|
helpTitle: i18nLazyString(UIStrings.goToLine),
|
|
2028
2029
|
titlePrefix: i18nLazyString(UIStrings.goTo),
|
|
2029
2030
|
titleSuggestion: i18nLazyString(UIStrings.line),
|
|
2031
|
+
jslogContext: 'source-line',
|
|
2030
2032
|
});
|
|
2031
2033
|
|
|
2032
2034
|
QuickOpen.FilteredListWidget.registerProvider({
|
|
2033
2035
|
prefix: '',
|
|
2034
2036
|
iconName: 'document',
|
|
2035
|
-
async provider() {
|
|
2037
|
+
async provider(jslogContext: string) {
|
|
2036
2038
|
const Sources = await loadSourcesModule();
|
|
2037
|
-
return new Sources.OpenFileQuickOpen.OpenFileQuickOpen();
|
|
2039
|
+
return new Sources.OpenFileQuickOpen.OpenFileQuickOpen(jslogContext);
|
|
2038
2040
|
},
|
|
2039
2041
|
helpTitle: i18nLazyString(UIStrings.openFile),
|
|
2040
2042
|
titlePrefix: i18nLazyString(UIStrings.open),
|
|
2041
2043
|
titleSuggestion: i18nLazyString(UIStrings.file),
|
|
2044
|
+
jslogContext: 'source-file',
|
|
2042
2045
|
});
|
|
2043
2046
|
|
|
2044
2047
|
UI.ContextMenu.registerProvider({
|
|
@@ -1708,18 +1708,6 @@ export class TimelineFlameChartView extends Common.ObjectWrapper.eventMixin<Even
|
|
|
1708
1708
|
#onEntryInvoked(
|
|
1709
1709
|
dataProvider: TimelineFlameChartDataProvider|TimelineFlameChartNetworkDataProvider,
|
|
1710
1710
|
event: Common.EventTarget.EventTargetEvent<number>): void {
|
|
1711
|
-
const selectedEvent = dataProvider.eventByIndex(event.data);
|
|
1712
|
-
if (this.#parsedTrace && selectedEvent) {
|
|
1713
|
-
const handledByFloaty = UI.Floaty.onFloatyClick({
|
|
1714
|
-
type: UI.Floaty.FloatyContextTypes.PERFORMANCE_EVENT,
|
|
1715
|
-
data: {event: selectedEvent, traceStartTime: this.#parsedTrace.data.Meta.traceBounds.min}
|
|
1716
|
-
});
|
|
1717
|
-
if (handledByFloaty) {
|
|
1718
|
-
// If this was added to the Floaty context, we do not need to actually
|
|
1719
|
-
// select the event.
|
|
1720
|
-
return;
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
1711
|
this.#updateSelectedEntryStatus(dataProvider, event);
|
|
1724
1712
|
|
|
1725
1713
|
const entryIndex = event.data;
|