chrome-devtools-frontend 1.0.1733843 → 1.0.1736236
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/rules/tests/test-view-and-presenter-isolation.md +4 -4
- package/.agents/rules/ui-and-widgets/ui-declarative-tree-and-prompt-patterns.md +61 -0
- package/.agents/rules/ui-and-widgets/ui-lit-declarative-templates-and-directives.md +11 -7
- package/.agents/rules/ui-and-widgets/ui-modern-component-and-encapsulation-standards.md +13 -4
- package/.agents/rules/ui-and-widgets/ui-pure-view-and-presenter-separation.md +31 -2
- package/.agents/rules/ui-and-widgets/ui-reactive-widget-update-lifecycle.md +23 -4
- package/.agents/rules/ui-and-widgets/ui-widget-dom-and-listener-lifecycle.md +34 -3
- package/.agents/skills/code-review/SKILL.md +27 -0
- package/.agents/skills/devtools-uistrings/SKILL.md +147 -0
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +27 -1
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +100 -0
- package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +16 -0
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +13 -2
- package/.agents/skills/ui-widgets/SKILL.md +25 -25
- package/DIR_METADATA +8 -1
- package/docs/cookbook/localization.md +1 -1
- package/docs/ui_engineering.md +24 -0
- package/eslint.config.mjs +0 -1
- package/front_end/application_tokens.css +1 -1
- package/front_end/core/host/AidaClient.ts +147 -202
- package/front_end/core/host/AidaClientTypes.ts +9 -0
- package/front_end/core/host/AidaErrors.ts +416 -0
- package/front_end/core/host/AidaGcaTranslation.ts +11 -0
- package/front_end/core/host/InspectorFrontendHostAPI.ts +9 -2
- package/front_end/core/host/UserMetrics.ts +25 -0
- package/front_end/core/host/UserMetricsEnums.ts +25 -0
- package/front_end/core/host/host.ts +3 -1
- package/front_end/core/i18n/collect-ui-strings.js +20 -0
- package/front_end/core/root/Runtime.ts +12 -0
- package/front_end/core/sdk/CPUThrottlingManager.ts +3 -0
- package/front_end/core/sdk/EnhancedTracesParser.ts +8 -4
- package/front_end/core/sdk/NetworkManager.ts +0 -6
- package/front_end/core/sdk/OverlayModel.ts +0 -6
- package/front_end/core/sdk/PreloadingModel.ts +30 -13
- package/front_end/core/sdk/PrivateVerificationTokensModel.ts +0 -18
- package/front_end/core/sdk/RehydratingConnection.ts +5 -2
- package/front_end/core/sdk/ResourceTreeModel.ts +0 -42
- package/front_end/core/sdk/ScreenCaptureModel.ts +0 -84
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -15
- package/front_end/core/sdk/StorageBucketsModel.ts +0 -15
- package/front_end/devtools_compatibility.js +57 -2
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +4 -2
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +203 -127
- package/front_end/entrypoints/inspector_main/renderingOptions.css +5 -0
- package/front_end/entrypoints/node_app/app/NodeMain.ts +0 -9
- package/front_end/entrypoints/node_app/app/nodeConnectionsPanel.css +0 -22
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/SupportedCSSProperties.ts +0 -136
- package/front_end/generated/protocol-proxy-api.d.ts +231 -231
- package/front_end/generated/protocol.ts +1 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +4 -1
- package/front_end/models/ai_assistance/ChangeManager.ts +3 -1
- package/front_end/models/ai_assistance/DOMHelpers.ts +118 -3
- package/front_end/models/ai_assistance/ExtensionScope.ts +31 -24
- package/front_end/models/ai_assistance/agents/AiAgent.ts +6 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +13 -13
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +18 -8
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +2 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +103 -81
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +15 -203
- package/front_end/models/ai_assistance/injected.ts +6 -1
- package/front_end/models/ai_assistance/skills/lighthouse.md +1 -1
- package/front_end/models/ai_assistance/skills/styling.md +8 -10
- package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +1 -1
- package/front_end/models/ai_assistance/tools/SetElementStyles.ts +288 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +1 -0
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +3 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +64 -16
- package/front_end/models/comment_manager/CD4ABridge.ts +12 -2
- package/front_end/models/comment_manager/CommentManager.ts +24 -4
- package/front_end/models/javascript_metadata/NativeFunctions.ts +41 -1
- package/front_end/models/project_settings/ProjectSettingsModel.ts +1 -1
- package/front_end/models/trace/handlers/FlowsHandler.ts +10 -0
- package/front_end/models/trace/handlers/SamplesHandler.ts +3 -2
- package/front_end/models/trace/handlers/ScriptsHandler.ts +25 -26
- package/front_end/models/trace/helpers/TreeHelpers.ts +4 -0
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -2
- package/front_end/models/trace/types/TraceEvents.ts +21 -22
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +9 -1
- package/front_end/panels/ai_assistance/components/chatInput.css +4 -4
- package/front_end/panels/animation/AnimationTimeline.ts +3 -3
- package/front_end/panels/animation/animationTimeline.css +6 -4
- package/front_end/panels/application/IndexedDBModel.ts +0 -15
- package/front_end/panels/application/appManifestView.css +2 -5
- package/front_end/panels/application/components/backForwardCacheView.css +1 -5
- package/front_end/panels/application/components/serviceWorkerRouterView.css +2 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +7 -0
- package/front_end/panels/comments/CommentsPane.ts +12 -7
- package/front_end/panels/comments/commentsPane.css +16 -2
- package/front_end/panels/common/CommentsOverlayWidget.ts +16 -10
- package/front_end/panels/common/CommentsStatusBarPill.ts +12 -5
- package/front_end/panels/common/commentsOverlay.css +7 -1
- package/front_end/panels/common/commentsStatusBarPill.css +30 -0
- package/front_end/panels/console/consolePrompt.css +0 -12
- package/front_end/panels/console/consoleView.css +2 -2
- package/front_end/panels/developer_resources/developerResourcesView.css +4 -3
- package/front_end/panels/elements/DOMTreeWidget.ts +29 -9
- package/front_end/panels/elements/StylePropertyTreeElement.ts +2 -1
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +12 -5
- package/front_end/panels/elements/components/cssVariableValueView.css +1 -1
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +2 -2
- package/front_end/panels/elements/domTreeWidget.css +6 -1
- package/front_end/panels/elements/elementsPanel.css +0 -6
- package/front_end/panels/elements/layoutPane.css +1 -1
- package/front_end/panels/elements/metricsSidebarPane.css +1 -1
- package/front_end/panels/elements/platformFontsWidget.css +1 -1
- package/front_end/panels/elements/stylesSidebarPane.css +0 -10
- package/front_end/panels/emulation/deviceModeView.css +6 -7
- package/front_end/panels/explain/components/consoleInsight.css +4 -4
- package/front_end/panels/issues/issuesTree.css +1 -26
- package/front_end/panels/lighthouse/lighthouseStartView.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +1 -1
- package/front_end/panels/media/TickingFlameChart.ts +20 -3
- package/front_end/panels/media/playerMessagesView.css +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +24 -5
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +1 -6
- package/front_end/panels/network/networkLogView.css +2 -2
- package/front_end/panels/network/networkTimingTable.css +1 -1
- package/front_end/panels/performance_monitor/performanceMonitor.css +0 -4
- package/front_end/panels/protocol_monitor/JSONEditor.css +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +4 -2
- package/front_end/panels/recorder/recorderPanel.css +3 -3
- package/front_end/panels/recorder/recordingListView.css +1 -1
- package/front_end/panels/screencast/screencastView.css +1 -1
- package/front_end/panels/search/searchResultsPane.css +1 -1
- package/front_end/panels/security/SecurityModel.ts +0 -6
- package/front_end/panels/security/SecurityPanel.ts +120 -108
- package/front_end/panels/security/originView.css +1 -1
- package/front_end/panels/sensors/locationsSettingsTab.css +3 -3
- package/front_end/panels/settings/EditFileSystemView.ts +159 -104
- package/front_end/panels/settings/editFileSystemView.css +30 -4
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +0 -52
- package/front_end/panels/settings/settingsScreen.css +0 -7
- package/front_end/panels/sources/CallStackSidebarPane.ts +339 -221
- package/front_end/panels/sources/NavigatorView.ts +95 -8
- package/front_end/panels/sources/ThreadsSidebarPane.ts +8 -4
- package/front_end/panels/sources/breakpointsView.css +1 -3
- package/front_end/panels/sources/callStackSidebarPane.css +4 -0
- package/front_end/panels/sources/components/HeadersView.ts +15 -2
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +0 -1
- package/front_end/panels/timeline/CountersGraph.ts +0 -4
- package/front_end/panels/timeline/TimelineLoader.ts +16 -6
- package/front_end/panels/timeline/TimelinePanel.ts +20 -12
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -1
- package/front_end/panels/timeline/components/DetailsView.ts +2 -1
- package/front_end/panels/timeline/components/cwvMetrics.css +1 -1
- package/front_end/panels/timeline/components/metricCard.css +1 -1
- package/front_end/panels/timeline/components/sidebarAnnotationsTab.css +4 -4
- package/front_end/panels/timeline/timelineFlameChartView.css +1 -1
- package/front_end/panels/webauthn/WebauthnPane.ts +13 -14
- package/front_end/panels/webauthn/webauthnPane.css +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentOverlayManager.ts +34 -18
- package/front_end/ui/components/icon_button/FileSourceIcon.ts +6 -0
- package/front_end/ui/components/input/textInput.css +1 -1
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +6 -4
- package/front_end/ui/components/suggestion_input/suggestionInput.css +2 -2
- package/front_end/ui/components/text_editor/AiCodeGenerationTeaser.ts +14 -2
- package/front_end/ui/legacy/DockController.ts +17 -4
- package/front_end/ui/legacy/Treeoutline.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +148 -10
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +3 -2
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +2 -2
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +2 -2
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +1 -1
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +5 -4
- package/front_end/ui/legacy/components/source_frame/imageView.css +1 -1
- package/front_end/ui/legacy/components/utils/TargetDetachedDialog.ts +0 -3
- package/front_end/ui/legacy/components/utils/imagePreview.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +1 -14
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +3 -2
- package/front_end/ui/legacy/listWidget.css +0 -18
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +44 -9
- package/front_end/ui/lit/strip-whitespace.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +3 -3
- package/front_end/generated/Deprecation.ts +0 -471
- package/front_end/panels/accessibility/axBreadcrumbs.css +0 -155
- package/front_end/panels/network/requestHeadersTree.css +0 -226
- package/front_end/panels/recorder/startView.css +0 -38
- package/front_end/panels/security/ipProtectionView.css +0 -141
- package/front_end/ui/legacy/components/inline_editor/animationNameSwatch.css +0 -27
|
@@ -318,25 +318,112 @@ export function renderGroupTrailingIcons(project: Workspace.Workspace.Project|nu
|
|
|
318
318
|
return [];
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
export interface
|
|
321
|
+
export interface NavigatorSourceTitleViewInput {
|
|
322
322
|
title: string;
|
|
323
323
|
editing: boolean;
|
|
324
|
-
onCommit: (
|
|
324
|
+
onCommit: (detail: string) => void;
|
|
325
325
|
onCancel: () => void;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
export
|
|
328
|
+
export type NavigatorSourceTitleView = (input: NavigatorSourceTitleViewInput, output: undefined, target: HTMLElement) =>
|
|
329
|
+
void;
|
|
330
|
+
|
|
331
|
+
export const DEFAULT_NAVIGATOR_SOURCE_TITLE_VIEW: NavigatorSourceTitleView = (input, _output, target) => {
|
|
332
|
+
const stopPropagationIfEditing = (event: Event): void => {
|
|
333
|
+
if (input.editing) {
|
|
334
|
+
event.stopPropagation();
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
|
|
329
338
|
// clang-format off
|
|
330
339
|
render(html`
|
|
331
340
|
<devtools-prompt
|
|
332
341
|
value=${input.title}
|
|
333
342
|
?editing=${input.editing}
|
|
334
343
|
@commit=${(event: UI.TextPrompt.TextPromptElement.CommitEvent) => input.onCommit(event.detail)}
|
|
335
|
-
@cancel=${input.onCancel}
|
|
336
|
-
|
|
344
|
+
@cancel=${() => input.onCancel()}
|
|
345
|
+
@mousedown=${stopPropagationIfEditing}
|
|
346
|
+
@click=${stopPropagationIfEditing}
|
|
347
|
+
@dblclick=${stopPropagationIfEditing}>${input.title}</devtools-prompt>
|
|
348
|
+
`, target);
|
|
337
349
|
// clang-format on
|
|
338
350
|
};
|
|
339
351
|
|
|
352
|
+
export class NavigatorSourceTitleWidget extends UI.Widget.Widget {
|
|
353
|
+
#title = '';
|
|
354
|
+
#editing = false;
|
|
355
|
+
#view: NavigatorSourceTitleView;
|
|
356
|
+
|
|
357
|
+
onCommit?: (detail: string) => void;
|
|
358
|
+
onCancel?: () => void;
|
|
359
|
+
|
|
360
|
+
set title(title: string) {
|
|
361
|
+
if (this.#title === title) {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
this.#title = title;
|
|
365
|
+
this.requestUpdate();
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
get title(): string {
|
|
369
|
+
return this.#title;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
set editing(editing: boolean) {
|
|
373
|
+
if (this.#editing === editing) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
this.#editing = editing;
|
|
377
|
+
this.requestUpdate();
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
get editing(): boolean {
|
|
381
|
+
return this.#editing;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
constructor(element?: HTMLElement, view: NavigatorSourceTitleView = DEFAULT_NAVIGATOR_SOURCE_TITLE_VIEW) {
|
|
385
|
+
super(element);
|
|
386
|
+
this.#view = view;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
override wasShown(): void {
|
|
390
|
+
super.wasShown();
|
|
391
|
+
this.requestUpdate();
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
override performUpdate(): void {
|
|
395
|
+
const viewInput: NavigatorSourceTitleViewInput = {
|
|
396
|
+
title: this.#title,
|
|
397
|
+
editing: this.#editing,
|
|
398
|
+
onCommit: (detail: string) => this.onCommit?.(detail),
|
|
399
|
+
onCancel: () => this.onCancel?.(),
|
|
400
|
+
};
|
|
401
|
+
this.#view(viewInput, undefined, this.contentElement);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export const renderSourceTitleWidget =
|
|
406
|
+
(input: NavigatorSourceTitleViewInput, _output: undefined, target: HTMLElement): void => {
|
|
407
|
+
// clang-format off
|
|
408
|
+
render(html`
|
|
409
|
+
<devtools-widget style="display: contents" ${UI.Widget.widget(NavigatorSourceTitleWidget, {
|
|
410
|
+
title: input.title,
|
|
411
|
+
editing: input.editing,
|
|
412
|
+
onCommit: input.onCommit,
|
|
413
|
+
onCancel: input.onCancel,
|
|
414
|
+
})}></devtools-widget>
|
|
415
|
+
`, target);
|
|
416
|
+
// clang-format on
|
|
417
|
+
const widgetElement = target.firstElementChild as HTMLElement | null;
|
|
418
|
+
if (widgetElement) {
|
|
419
|
+
// Temporary adapter: instantiates and renders the widget synchronously
|
|
420
|
+
// for detached TreeOutlineInShadow elements. This will be removed once
|
|
421
|
+
// NavigatorView renders <devtools-tree> declaratively.
|
|
422
|
+
const widget = UI.Widget.Widget.getOrCreateWidget(widgetElement);
|
|
423
|
+
void widget.performUpdate();
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
|
|
340
427
|
export const enum Events {
|
|
341
428
|
UI_SOURCE_CODE_ADDED = 'ui-source-code-added',
|
|
342
429
|
SOURCE_SELECTED = 'source-selected',
|
|
@@ -2008,13 +2095,13 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
|
|
|
2008
2095
|
return;
|
|
2009
2096
|
}
|
|
2010
2097
|
|
|
2011
|
-
|
|
2098
|
+
renderSourceTitleWidget({
|
|
2012
2099
|
title: this.title,
|
|
2013
2100
|
editing: this.isEditing,
|
|
2014
2101
|
onCommit: this.#handlePromptCommit.bind(this),
|
|
2015
2102
|
onCancel: this.#handlePromptCancel.bind(this),
|
|
2016
2103
|
},
|
|
2017
|
-
|
|
2104
|
+
undefined, this.treeElement.titleElement as HTMLElement);
|
|
2018
2105
|
this.updateIcon();
|
|
2019
2106
|
this.updateTrailingIcons();
|
|
2020
2107
|
|
|
@@ -2033,7 +2120,7 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
|
|
|
2033
2120
|
(this.#uiSourceCode.contentType().isScript() || isIgnoreListed) ? isIgnoreListed : null;
|
|
2034
2121
|
|
|
2035
2122
|
let titleText = this.#uiSourceCode.displayName();
|
|
2036
|
-
if (!ignoreIsDirty && this.#uiSourceCode.isDirty()) {
|
|
2123
|
+
if (!ignoreIsDirty && !this.isEditing && this.#uiSourceCode.isDirty()) {
|
|
2037
2124
|
titleText = '*' + titleText;
|
|
2038
2125
|
}
|
|
2039
2126
|
this.title = titleText;
|
|
@@ -81,9 +81,17 @@ export class ThreadsSidebarPane extends UI.Widget.VBox implements
|
|
|
81
81
|
|
|
82
82
|
override wasShown(): void {
|
|
83
83
|
super.wasShown();
|
|
84
|
+
SDK.TargetManager.TargetManager.instance().addEventListener(SDK.TargetManager.Events.NAME_CHANGED,
|
|
85
|
+
this.#targetNameChanged);
|
|
84
86
|
this.requestUpdate();
|
|
85
87
|
}
|
|
86
88
|
|
|
89
|
+
override willHide(): void {
|
|
90
|
+
super.willHide();
|
|
91
|
+
SDK.TargetManager.TargetManager.instance().removeEventListener(SDK.TargetManager.Events.NAME_CHANGED,
|
|
92
|
+
this.#targetNameChanged);
|
|
93
|
+
}
|
|
94
|
+
|
|
87
95
|
#getThreadName(debuggerModel: SDK.DebuggerModel.DebuggerModel): string {
|
|
88
96
|
const executionContext = debuggerModel.runtimeModel().defaultExecutionContext();
|
|
89
97
|
return executionContext?.label() || debuggerModel.target().name();
|
|
@@ -122,8 +130,6 @@ export class ThreadsSidebarPane extends UI.Widget.VBox implements
|
|
|
122
130
|
debuggerModel.addEventListener(SDK.DebuggerModel.Events.DebuggerResumed, this.#updatePausedState);
|
|
123
131
|
debuggerModel.runtimeModel().addEventListener(
|
|
124
132
|
SDK.RuntimeModel.Events.ExecutionContextChanged, this.requestUpdate, this);
|
|
125
|
-
SDK.TargetManager.TargetManager.instance().addEventListener(
|
|
126
|
-
SDK.TargetManager.Events.NAME_CHANGED, this.#targetNameChanged);
|
|
127
133
|
|
|
128
134
|
this.requestUpdate();
|
|
129
135
|
}
|
|
@@ -134,8 +140,6 @@ export class ThreadsSidebarPane extends UI.Widget.VBox implements
|
|
|
134
140
|
debuggerModel.removeEventListener(SDK.DebuggerModel.Events.DebuggerResumed, this.#updatePausedState);
|
|
135
141
|
debuggerModel.runtimeModel().removeEventListener(
|
|
136
142
|
SDK.RuntimeModel.Events.ExecutionContextChanged, this.requestUpdate, this);
|
|
137
|
-
SDK.TargetManager.TargetManager.instance().removeEventListener(
|
|
138
|
-
SDK.TargetManager.Events.NAME_CHANGED, this.#targetNameChanged);
|
|
139
143
|
|
|
140
144
|
this.requestUpdate();
|
|
141
145
|
}
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
.pause-on-caught-exceptions {
|
|
237
|
-
margin-bottom:
|
|
237
|
+
margin-bottom: var(--sys-size-2);
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
/* TODO(crbug.com/1382762): Remove special casing with dependent toggles as soon as Node LTS caught up on independent pause of exception toggles. */
|
|
@@ -256,8 +256,6 @@
|
|
|
256
256
|
|
|
257
257
|
.pause-on-uncaught-exceptions,
|
|
258
258
|
.pause-on-caught-exceptions {
|
|
259
|
-
line-height: 13px;
|
|
260
|
-
height: 18px;
|
|
261
259
|
padding-right: var(--sys-size-5);
|
|
262
260
|
|
|
263
261
|
& > label {
|
|
@@ -100,12 +100,25 @@ export class HeadersView extends UI.View.SimpleView {
|
|
|
100
100
|
uiSourceCode: this.#uiSourceCode,
|
|
101
101
|
parsingError: false,
|
|
102
102
|
};
|
|
103
|
+
this.performUpdate();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
override wasShown(): void {
|
|
107
|
+
super.wasShown();
|
|
103
108
|
this.#uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged,
|
|
104
109
|
this);
|
|
105
110
|
this.#uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyCommitted,
|
|
106
111
|
this.#onWorkingCopyCommitted, this);
|
|
107
|
-
this.
|
|
108
|
-
|
|
112
|
+
if (this.#uiSourceCode.isDirty()) {
|
|
113
|
+
this.#setComponentData(this.#uiSourceCode.workingCopy());
|
|
114
|
+
} else {
|
|
115
|
+
void this.#setInitialData();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
override willHide(): void {
|
|
120
|
+
super.willHide();
|
|
121
|
+
this.dispose();
|
|
109
122
|
}
|
|
110
123
|
|
|
111
124
|
override performUpdate(): void {
|
|
@@ -103,7 +103,6 @@ li.watch-expression-tree-item > span.tree-element-title {
|
|
|
103
103
|
|
|
104
104
|
.watch-expression-text-prompt-proxy {
|
|
105
105
|
margin: var(--sys-size-2) var(--sys-size-6) var(--sys-size-2) calc(-1 * var(--sys-size-3));
|
|
106
|
-
padding-bottom: 3px;
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
.watch-expression-header {
|
|
@@ -200,10 +200,6 @@ export class CountersGraph extends UI.Widget.VBox {
|
|
|
200
200
|
counter.appendSample(startTime, value);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
|
|
204
|
-
if (typeof counters.gpuMemoryLimitKB !== 'undefined') {
|
|
205
|
-
this.gpuMemoryCounter.setLimit(counters.gpuMemoryLimitKB);
|
|
206
|
-
}
|
|
207
203
|
}
|
|
208
204
|
this.#showNoEventsMessage = counterEventsFound === 0;
|
|
209
205
|
this.requestUpdate();
|
|
@@ -115,7 +115,7 @@ export class TimelineLoader {
|
|
|
115
115
|
|
|
116
116
|
static async loadFromURL(url: Platform.DevToolsPath.UrlString, client: Client): Promise<TimelineLoader> {
|
|
117
117
|
const loader = new TimelineLoader(client);
|
|
118
|
-
|
|
118
|
+
let stream: Common.StringOutputStream.StringOutputStream|null = new Common.StringOutputStream.StringOutputStream();
|
|
119
119
|
client.loadingStarted();
|
|
120
120
|
|
|
121
121
|
const allowRemoteFilePaths =
|
|
@@ -124,15 +124,19 @@ export class TimelineLoader {
|
|
|
124
124
|
|
|
125
125
|
async function finishedCallback(success: boolean, _headers: Record<string, string>,
|
|
126
126
|
errorDescription: Host.ResourceLoader.LoadErrorDescription): Promise<void> {
|
|
127
|
-
if (!success) {
|
|
127
|
+
if (!success || !stream) {
|
|
128
|
+
stream = null;
|
|
128
129
|
return loader.reportErrorAndCancelLoading(errorDescription.message);
|
|
129
130
|
}
|
|
130
131
|
try {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
// Inline `stream.data()` and clear `stream` before `await loader.complete()`
|
|
133
|
+
// so the raw JSON text and chunked StringOutputStream are not retained in
|
|
134
|
+
// this async frame for the duration of trace processing.
|
|
135
|
+
loader.#processParsedFile(JSON.parse(stream.data()));
|
|
136
|
+
stream = null;
|
|
134
137
|
await loader.complete();
|
|
135
138
|
} catch (e: unknown) {
|
|
139
|
+
stream = null;
|
|
136
140
|
const message = e instanceof Error ? e.message : '';
|
|
137
141
|
return loader.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataS, {PH1: message}));
|
|
138
142
|
}
|
|
@@ -201,6 +205,7 @@ export class TimelineLoader {
|
|
|
201
205
|
}
|
|
202
206
|
|
|
203
207
|
async #cleanup(): Promise<void> {
|
|
208
|
+
this.#collectedEvents = [];
|
|
204
209
|
if (this.client) {
|
|
205
210
|
await this.client.loadingComplete(
|
|
206
211
|
/* collectedEvents */[], /* exclusiveFilter= */ null, /* metadata= */ null);
|
|
@@ -241,7 +246,12 @@ export class TimelineLoader {
|
|
|
241
246
|
this.#metadata = RecordingMetadata.forCPUProfile();
|
|
242
247
|
}
|
|
243
248
|
|
|
244
|
-
|
|
249
|
+
// Dispatch `loadingComplete` and clear the instance reference before awaiting
|
|
250
|
+
// so the loader does not retain the events array during trace processing.
|
|
251
|
+
const loadingCompletePromise =
|
|
252
|
+
(this.client as Client).loadingComplete(this.#collectedEvents, this.filter, this.#metadata);
|
|
253
|
+
this.#collectedEvents = [];
|
|
254
|
+
await loadingCompletePromise;
|
|
245
255
|
this.#traceLoadedCallback?.(LoadingState.SUCCESS);
|
|
246
256
|
}
|
|
247
257
|
|
|
@@ -477,6 +477,7 @@ export class TimelinePanel extends TimelinePanelBase implements Client, Timeline
|
|
|
477
477
|
'flamechart-selected-navigation', 'Modern - normal scrolling', 'timeline.select-modern-navigation');
|
|
478
478
|
#classicNavRadioButton = UI.UIUtils.createRadioButton(
|
|
479
479
|
'flamechart-selected-navigation', 'Classic - scroll to zoom', 'timeline.select-classic-navigation');
|
|
480
|
+
#navigationSettingInitialized = false;
|
|
480
481
|
|
|
481
482
|
#onMainEntryHovered: (event: Common.EventTarget.EventTargetEvent<number>) => void;
|
|
482
483
|
#hiddenTracksInfoBarByParsedTrace = new WeakMap<Trace.TraceModel.ParsedTrace, UI.Infobar.Infobar|'DISMISSED'>();
|
|
@@ -1553,7 +1554,7 @@ export class TimelinePanel extends TimelinePanelBase implements Client, Timeline
|
|
|
1553
1554
|
let fileName =
|
|
1554
1555
|
(isCpuProfile ? `CPU-${isoDate}.cpuprofile` : `Trace-${isoDate}.json`) as Platform.DevToolsPath.RawPathString;
|
|
1555
1556
|
|
|
1556
|
-
let blobParts:
|
|
1557
|
+
let blobParts: BlobPart[] = [];
|
|
1557
1558
|
if (isCpuProfile) {
|
|
1558
1559
|
const profile = Trace.Helpers.SamplesIntegrator.SamplesIntegrator.extractCpuProfileFromFakeTrace(traceEvents);
|
|
1559
1560
|
blobParts = [JSON.stringify(profile)];
|
|
@@ -1566,7 +1567,12 @@ export class TimelinePanel extends TimelinePanelBase implements Client, Timeline
|
|
|
1566
1567
|
sourceMaps: filteredMetadataSourceMaps,
|
|
1567
1568
|
resources: filteredResources,
|
|
1568
1569
|
});
|
|
1569
|
-
|
|
1570
|
+
// Wrap each chunk in a Blob as soon as it is generated, so that each
|
|
1571
|
+
// chunk string can be garbage collected straight away. Collecting all
|
|
1572
|
+
// the strings first would hold the whole serialized trace in the JS heap.
|
|
1573
|
+
for (const chunk of formattedTraceIter) {
|
|
1574
|
+
blobParts.push(new Blob([chunk]));
|
|
1575
|
+
}
|
|
1570
1576
|
}
|
|
1571
1577
|
|
|
1572
1578
|
if (!blobParts.length) {
|
|
@@ -1761,7 +1767,6 @@ export class TimelinePanel extends TimelinePanelBase implements Client, Timeline
|
|
|
1761
1767
|
}
|
|
1762
1768
|
|
|
1763
1769
|
#launchRehydratedSession(traceJson: string): void {
|
|
1764
|
-
let rehydratingWindow: Window|null = null;
|
|
1765
1770
|
let pathToLaunch: string|null = null;
|
|
1766
1771
|
const url = new URL(window.location.href);
|
|
1767
1772
|
const pathToEntrypoint = url.pathname.slice(0, url.pathname.lastIndexOf('/'));
|
|
@@ -1771,19 +1776,21 @@ export class TimelinePanel extends TimelinePanelBase implements Client, Timeline
|
|
|
1771
1776
|
|
|
1772
1777
|
// Clarifying the window the code is referring to
|
|
1773
1778
|
const hostWindow = window;
|
|
1779
|
+
const rehydratingWindow = this.isDocked() ?
|
|
1780
|
+
hostWindow.open(pathToLaunch, /* target: */ '_blank', 'noopener=false,popup=false') :
|
|
1781
|
+
hostWindow.open(pathToLaunch, /* target: */ undefined, 'noopener=false,popup=true');
|
|
1782
|
+
if (!rehydratingWindow) {
|
|
1783
|
+
return;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1774
1786
|
function onMessageHandler(ev: MessageEvent): void {
|
|
1775
|
-
if (
|
|
1776
|
-
|
|
1787
|
+
if (ev.source !== rehydratingWindow || ev.data?.type !== 'REHYDRATING_WINDOW_READY') {
|
|
1788
|
+
return;
|
|
1777
1789
|
}
|
|
1790
|
+
rehydratingWindow?.postMessage({type: 'REHYDRATING_TRACE_FILE', traceJson}, url.origin);
|
|
1778
1791
|
hostWindow.removeEventListener('message', onMessageHandler);
|
|
1779
1792
|
}
|
|
1780
1793
|
hostWindow.addEventListener('message', onMessageHandler);
|
|
1781
|
-
|
|
1782
|
-
if (this.isDocked()) {
|
|
1783
|
-
rehydratingWindow = hostWindow.open(pathToLaunch, /* target: */ '_blank', 'noopener=false,popup=false');
|
|
1784
|
-
} else {
|
|
1785
|
-
rehydratingWindow = hostWindow.open(pathToLaunch, /* target: */ undefined, 'noopener=false,popup=true');
|
|
1786
|
-
}
|
|
1787
1794
|
}
|
|
1788
1795
|
|
|
1789
1796
|
async loadFromURL(url: Platform.DevToolsPath.UrlString): Promise<void> {
|
|
@@ -2306,7 +2313,8 @@ export class TimelinePanel extends TimelinePanelBase implements Client, Timeline
|
|
|
2306
2313
|
|
|
2307
2314
|
// When the timeline is loaded for the first time, setup the shortcuts dialog and log what navigation setting is selected.
|
|
2308
2315
|
// Logging the setting on the first timeline load will allow us to get an estimate number of people using each option.
|
|
2309
|
-
if (this.#traceEngineModel.size() === 1) {
|
|
2316
|
+
if (!this.#navigationSettingInitialized && this.#traceEngineModel.size() === 1) {
|
|
2317
|
+
this.#navigationSettingInitialized = true;
|
|
2310
2318
|
this.#setupNavigationSetting();
|
|
2311
2319
|
if (Common.Settings.Settings.instance()
|
|
2312
2320
|
.resolve(SettingUIRegistration.TimelineSettings.flamechartSelectedNavigationSettingDescriptor)
|
|
@@ -1049,7 +1049,7 @@ export class TimelineUIUtils {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
|
|
1051
1051
|
if (Trace.Types.Events.isNavigationStart(event)) {
|
|
1052
|
-
url =
|
|
1052
|
+
url = event.args.data?.documentLoaderURL as Platform.DevToolsPath.UrlString;
|
|
1053
1053
|
if (url) {
|
|
1054
1054
|
contentHelper.appendElementRow(i18nString(UIStrings.url), LegacyComponents.Linkifier.Linkifier.linkifyURL(url));
|
|
1055
1055
|
}
|
|
@@ -207,7 +207,8 @@ export function generateInvalidationsList(
|
|
|
207
207
|
for (const invalidation of invalidations) {
|
|
208
208
|
backendNodeIds.add(invalidation.args.data.nodeId);
|
|
209
209
|
|
|
210
|
-
let reason = invalidation.args.data.reason
|
|
210
|
+
let reason = ('reason' in invalidation.args.data && invalidation.args.data.reason) ? invalidation.args.data.reason :
|
|
211
|
+
'unknown';
|
|
211
212
|
|
|
212
213
|
// ScheduleStyle events do not always have a reason, but if they tell us
|
|
213
214
|
// via their data what changed, we can update the reason that we show to
|
|
@@ -140,7 +140,7 @@ details.environment-recs[open] > summary::before {
|
|
|
140
140
|
|
|
141
141
|
.bucket-summaries.histogram {
|
|
142
142
|
display: grid;
|
|
143
|
-
grid-template-columns: minmax(min-content, auto) minmax(var(--sys-size-14),
|
|
143
|
+
grid-template-columns: minmax(min-content, auto) minmax(var(--sys-size-14), var(--sys-size-18)) max-content;
|
|
144
144
|
grid-auto-rows: 1fr;
|
|
145
145
|
column-gap: var(--sys-size-5);
|
|
146
146
|
place-items: center flex-end;
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
.annotation-identifier {
|
|
57
57
|
padding: var(--sys-size-3) var(--sys-size-5);
|
|
58
|
-
border-radius:
|
|
58
|
+
border-radius: var(--sys-shape-corner-small);
|
|
59
59
|
font-weight: bold;
|
|
60
60
|
|
|
61
61
|
&.time-range {
|
|
@@ -76,14 +76,14 @@
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.annotation-tutorial-container {
|
|
79
|
-
padding:
|
|
79
|
+
padding: var(--sys-size-5);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.tutorial-card {
|
|
83
83
|
display: block;
|
|
84
84
|
position: relative;
|
|
85
|
-
margin:
|
|
86
|
-
padding:
|
|
85
|
+
margin: var(--sys-size-5) 0;
|
|
86
|
+
padding: var(--sys-size-5);
|
|
87
87
|
border-radius: var(--sys-shape-corner-extra-small);
|
|
88
88
|
overflow: hidden;
|
|
89
89
|
border: var(--sys-size-1) solid var(--sys-color-divider);
|
|
@@ -588,14 +588,6 @@ export class WebauthnPaneImpl extends UI.Panel.Panel implements
|
|
|
588
588
|
credentials: [],
|
|
589
589
|
});
|
|
590
590
|
this.requestUpdate();
|
|
591
|
-
this.#model.addEventListener(
|
|
592
|
-
SDK.WebAuthnModel.Events.CREDENTIAL_ADDED, this.#addCredential.bind(this, authenticatorId));
|
|
593
|
-
this.#model.addEventListener(
|
|
594
|
-
SDK.WebAuthnModel.Events.CREDENTIAL_ASSERTED, this.#updateCredential.bind(this, authenticatorId));
|
|
595
|
-
this.#model.addEventListener(
|
|
596
|
-
SDK.WebAuthnModel.Events.CREDENTIAL_UPDATED, this.#updateCredential.bind(this, authenticatorId));
|
|
597
|
-
this.#model.addEventListener(
|
|
598
|
-
SDK.WebAuthnModel.Events.CREDENTIAL_DELETED, this.#deleteCredential.bind(this, authenticatorId));
|
|
599
591
|
return authenticatorId;
|
|
600
592
|
}
|
|
601
593
|
|
|
@@ -662,11 +654,19 @@ export class WebauthnPaneImpl extends UI.Panel.Panel implements
|
|
|
662
654
|
modelAdded(model: SDK.WebAuthnModel.WebAuthnModel): void {
|
|
663
655
|
if (model.target() === model.target().outermostTarget()) {
|
|
664
656
|
this.#model = model;
|
|
657
|
+
model.addEventListener(SDK.WebAuthnModel.Events.CREDENTIAL_ADDED, this.#addCredential, this);
|
|
658
|
+
model.addEventListener(SDK.WebAuthnModel.Events.CREDENTIAL_ASSERTED, this.#updateCredential, this);
|
|
659
|
+
model.addEventListener(SDK.WebAuthnModel.Events.CREDENTIAL_UPDATED, this.#updateCredential, this);
|
|
660
|
+
model.addEventListener(SDK.WebAuthnModel.Events.CREDENTIAL_DELETED, this.#deleteCredential, this);
|
|
665
661
|
}
|
|
666
662
|
}
|
|
667
663
|
|
|
668
664
|
modelRemoved(model: SDK.WebAuthnModel.WebAuthnModel): void {
|
|
669
665
|
if (model.target() === model.target().outermostTarget()) {
|
|
666
|
+
model.removeEventListener(SDK.WebAuthnModel.Events.CREDENTIAL_ADDED, this.#addCredential, this);
|
|
667
|
+
model.removeEventListener(SDK.WebAuthnModel.Events.CREDENTIAL_ASSERTED, this.#updateCredential, this);
|
|
668
|
+
model.removeEventListener(SDK.WebAuthnModel.Events.CREDENTIAL_UPDATED, this.#updateCredential, this);
|
|
669
|
+
model.removeEventListener(SDK.WebAuthnModel.Events.CREDENTIAL_DELETED, this.#deleteCredential, this);
|
|
670
670
|
this.#model = undefined;
|
|
671
671
|
}
|
|
672
672
|
}
|
|
@@ -699,10 +699,10 @@ export class WebauthnPaneImpl extends UI.Panel.Panel implements
|
|
|
699
699
|
await this.#setVirtualAuthEnvEnabled(false);
|
|
700
700
|
}
|
|
701
701
|
|
|
702
|
-
#addCredential(
|
|
702
|
+
#addCredential({
|
|
703
703
|
data: event,
|
|
704
704
|
}: Common.EventTarget.EventTargetEvent<Protocol.WebAuthn.CredentialAddedEvent>): void {
|
|
705
|
-
const authenticator = this.#authenticators.get(authenticatorId);
|
|
705
|
+
const authenticator = this.#authenticators.get(event.authenticatorId);
|
|
706
706
|
if (!authenticator) {
|
|
707
707
|
return;
|
|
708
708
|
}
|
|
@@ -711,12 +711,11 @@ export class WebauthnPaneImpl extends UI.Panel.Panel implements
|
|
|
711
711
|
}
|
|
712
712
|
|
|
713
713
|
#updateCredential(
|
|
714
|
-
authenticatorId: Protocol.WebAuthn.AuthenticatorId,
|
|
715
714
|
{
|
|
716
715
|
data: event,
|
|
717
716
|
}: Common.EventTarget
|
|
718
717
|
.EventTargetEvent<Protocol.WebAuthn.CredentialAssertedEvent&Protocol.WebAuthn.CredentialUpdatedEvent>): void {
|
|
719
|
-
const authenticator = this.#authenticators.get(authenticatorId);
|
|
718
|
+
const authenticator = this.#authenticators.get(event.authenticatorId);
|
|
720
719
|
if (!authenticator) {
|
|
721
720
|
return;
|
|
722
721
|
}
|
|
@@ -729,10 +728,10 @@ export class WebauthnPaneImpl extends UI.Panel.Panel implements
|
|
|
729
728
|
this.requestUpdate();
|
|
730
729
|
}
|
|
731
730
|
|
|
732
|
-
#deleteCredential(
|
|
731
|
+
#deleteCredential({
|
|
733
732
|
data: event,
|
|
734
733
|
}: Common.EventTarget.EventTargetEvent<Protocol.WebAuthn.CredentialDeletedEvent>): void {
|
|
735
|
-
const authenticator = this.#authenticators.get(authenticatorId);
|
|
734
|
+
const authenticator = this.#authenticators.get(event.authenticatorId);
|
|
736
735
|
if (!authenticator) {
|
|
737
736
|
return;
|
|
738
737
|
}
|
|
@@ -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: c2918b8ff4f880d7323ba43b9b0bd608225c902e
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|