chrome-devtools-frontend 1.0.1681091 → 1.0.1682249
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/eslint.config.mjs +8 -3
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +8 -0
- package/front_end/core/sdk/NetworkManager.ts +9 -4
- package/front_end/core/sdk/OverlayModel.ts +3 -2
- package/front_end/core/sdk/PreloadingModel.ts +44 -22
- package/front_end/core/sdk/RemoteObject.ts +4 -1
- package/front_end/core/sdk/RuntimeModel.ts +5 -5
- package/front_end/core/sdk/SDKSettings.ts +19 -0
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -1
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -5
- package/front_end/entrypoints/main/MainImpl.ts +9 -10
- package/front_end/entrypoints/main/main-meta.ts +82 -0
- package/front_end/entrypoints/shell/shell.ts +0 -5
- package/front_end/entrypoints/trace_app/trace_app.ts +0 -5
- package/front_end/generated/InspectorBackendCommands.ts +2 -0
- package/front_end/generated/protocol-mapping.d.ts +16 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +12 -0
- package/front_end/models/ai_assistance/ExtensionScope.ts +11 -12
- package/front_end/models/ai_assistance/agents/AiAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +2 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +8 -8
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +8 -8
- package/front_end/models/ai_code_completion/debug.ts +6 -3
- package/front_end/models/ai_code_generation/debug.ts +6 -3
- package/front_end/models/badges/UserBadges.ts +9 -2
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -0
- package/front_end/models/emulation/DeviceModeModel.ts +16 -27
- package/front_end/models/emulation/EmulatedDevices.ts +30 -125
- package/front_end/models/extensions/ExtensionAPI.ts +34 -23
- package/front_end/models/formatter/ScriptFormatter.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +4 -4
- package/front_end/models/logs/NetworkLog.ts +11 -4
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +4 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -1
- package/front_end/models/stack_trace/StackTraceImpl.ts +1 -0
- package/front_end/models/trace/Name.ts +5 -5
- package/front_end/models/trace/Styles.ts +115 -115
- package/front_end/models/trace/extras/TraceTree.ts +2 -1
- package/front_end/models/trace/helpers/Network.ts +4 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +4 -2
- package/front_end/models/trace/insights/CharacterSet.ts +3 -3
- package/front_end/models/trace/insights/DOMSize.ts +1 -1
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +6 -2
- package/front_end/models/trace/insights/FontDisplay.ts +9 -3
- package/front_end/models/trace/insights/ForcedReflow.ts +4 -4
- package/front_end/models/trace/insights/INPBreakdown.ts +3 -4
- package/front_end/models/trace/insights/ImageDelivery.ts +2 -2
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +5 -5
- package/front_end/models/trace/insights/LegacyJavaScript.ts +7 -3
- package/front_end/models/trace/insights/ModernHTTP.ts +3 -3
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +13 -9
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/SlowCSSSelector.ts +29 -25
- package/front_end/models/trace/insights/ThirdParties.ts +13 -5
- package/front_end/models/trace/insights/Viewport.ts +4 -2
- package/front_end/models/workspace/IgnoreListManager.ts +53 -17
- package/front_end/panels/accessibility/ARIAAttributesView.ts +11 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +67 -53
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -2
- package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +2 -2
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +5 -5
- package/front_end/panels/animation/AnimationTimeline.ts +2 -0
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageView.ts +2 -0
- package/front_end/panels/application/preloading/PreloadingView.ts +9 -3
- package/front_end/panels/application/preloading/components/components.ts +2 -0
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +10 -11
- package/front_end/panels/changes/CombinedDiffView.ts +1 -1
- package/front_end/panels/common/BadgeNotification.ts +1 -1
- package/front_end/panels/common/ExtensionPanel.ts +12 -7
- package/front_end/panels/common/ExtensionServer.ts +85 -26
- package/front_end/panels/common/GdpSignUpDialog.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +2 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -2
- package/front_end/panels/console/console-meta.ts +9 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -4
- package/front_end/panels/elements/CSSRuleValidator.ts +12 -12
- package/front_end/panels/elements/CSSSpecificityBreakdown.ts +1 -1
- package/front_end/panels/elements/ClassesPaneWidget.ts +6 -6
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +4 -5
- package/front_end/panels/elements/DOMTreeContextMenu.ts +3 -6
- package/front_end/panels/elements/ElementIssueUtils.ts +20 -20
- package/front_end/panels/elements/ElementStatePaneWidget.ts +9 -6
- package/front_end/panels/elements/ElementsPanel.ts +10 -10
- package/front_end/panels/elements/ElementsTreeElement.ts +35 -29
- package/front_end/panels/elements/ElementsTreeOutline.ts +5 -20
- package/front_end/panels/elements/EventListenersWidget.ts +18 -19
- package/front_end/panels/elements/LayersWidget.ts +4 -4
- package/front_end/panels/elements/LayoutPane.ts +11 -11
- package/front_end/panels/elements/MarkerDecorator.ts +3 -3
- package/front_end/panels/elements/PlatformFontsWidget.ts +8 -8
- package/front_end/panels/elements/PropertiesWidget.ts +4 -4
- package/front_end/panels/elements/PropertyRenderer.ts +2 -2
- package/front_end/panels/elements/ShortcutTreeElement.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +14 -14
- package/front_end/panels/elements/StylePropertyTreeElement.ts +21 -21
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -13
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +1 -1
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +1 -1
- package/front_end/panels/elements/components/CSSVariableValueView.ts +3 -3
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +2 -2
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
- package/front_end/panels/elements/elements-meta.ts +13 -13
- package/front_end/panels/issues/AffectedCookiesView.ts +2 -0
- package/front_end/panels/issues/AffectedElementsView.ts +5 -0
- package/front_end/panels/issues/IssueView.ts +12 -8
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +11 -7
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +2 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -1
- package/front_end/panels/media/PlayerPropertiesView.ts +309 -416
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/network/NetworkLogView.ts +5 -2
- package/front_end/panels/network/NetworkOverview.ts +11 -5
- package/front_end/panels/network/NetworkPanel.ts +4 -2
- package/front_end/panels/network/NetworkWaterfallColumn.ts +16 -3
- package/front_end/panels/network/RequestHeadersView.ts +4 -4
- package/front_end/panels/network/components/ResponseHeaderSection.ts +7 -4
- package/front_end/panels/network/network-meta.ts +63 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -1
- package/front_end/panels/recorder/RecordingView.ts +89 -73
- package/front_end/panels/recorder/ReplaySection.ts +59 -40
- package/front_end/panels/recorder/injected/injected.ts +4 -0
- package/front_end/panels/security/SecurityPanel.ts +5 -6
- package/front_end/panels/security/SecurityPanelSidebar.ts +244 -204
- package/front_end/panels/security/security.ts +0 -4
- package/front_end/panels/settings/EditFileSystemView.ts +8 -7
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -14
- package/front_end/panels/settings/components/SyncSection.ts +1 -1
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +0 -3
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +10 -11
- package/front_end/panels/sources/NavigatorView.ts +6 -2
- package/front_end/panels/sources/SourcesNavigator.ts +8 -4
- package/front_end/panels/sources/SourcesPanel.ts +4 -2
- package/front_end/panels/sources/SourcesSearchScope.ts +3 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +2 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +5 -5
- package/front_end/panels/timeline/components/CWVMetrics.ts +1 -2
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +5 -5
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +2 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
- package/front_end/panels/timeline/components/Sidebar.ts +3 -3
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -2
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +3 -1
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +1 -2
- package/front_end/panels/timeline/components/insights/Cache.ts +1 -2
- package/front_end/panels/timeline/components/insights/CharacterSet.ts +1 -2
- package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -2
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -2
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +2 -2
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +1 -2
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +1 -2
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +1 -2
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -2
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +13 -13
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +1 -2
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +4 -4
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +1 -2
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +10 -8
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +2 -2
- package/front_end/panels/timeline/components/insights/SidebarInsight.ts +3 -1
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +1 -2
- package/front_end/panels/timeline/components/insights/Viewport.ts +1 -2
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -2
- package/front_end/panels/timeline/timeline.ts +0 -2
- package/front_end/panels/web_audio/WebAudioView.ts +14 -6
- package/front_end/panels/webauthn/WebauthnPane.ts +9 -9
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/web-vitals/rebuild.sh +1 -1
- package/front_end/ui/components/diff_view/DiffView.ts +2 -1
- package/front_end/ui/components/report_view/ReportView.docs.ts +2 -2
- package/front_end/ui/components/text_editor/javascript.ts +12 -13
- package/front_end/ui/legacy/GlassPane.ts +38 -14
- package/front_end/ui/legacy/Treeoutline.ts +14 -3
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +11 -11
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +19 -20
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +3 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +185 -355
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +3 -8
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +15 -16
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +4 -4
- package/front_end/ui/legacy/components/utils/Linkifier.ts +8 -10
- package/front_end/ui/settings/InspectorMainSettings.ts +12 -0
- package/front_end/ui/settings/settings.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +32 -0
- package/mcp/mcp.ts +0 -9
- package/package.json +1 -1
- package/front_end/core/sdk/sdk-meta.ts +0 -40
- package/front_end/models/badges/badges-meta.ts +0 -27
- package/front_end/models/logs/logs-meta.ts +0 -84
- package/front_end/models/persistence/persistence-meta.ts +0 -69
- package/front_end/models/workspace/workspace-meta.ts +0 -40
- package/front_end/panels/security/OriginTreeElement.ts +0 -60
- package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +0 -30
|
@@ -276,7 +276,7 @@ export class SyncSection extends UI.Widget.Widget {
|
|
|
276
276
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
277
277
|
super(element);
|
|
278
278
|
this.#view = view;
|
|
279
|
-
this.#receiveBadgesSetting = Common.Settings.Settings.instance().
|
|
279
|
+
this.#receiveBadgesSetting = Common.Settings.Settings.instance().resolve(Badges.receiveGdpBadgesSettingDescriptor);
|
|
280
280
|
this.#syncSetting =
|
|
281
281
|
Common.Settings.Settings.instance().moduleSetting('sync-preferences') as Common.Settings.Setting<boolean>;
|
|
282
282
|
}
|
|
@@ -438,7 +438,6 @@ export class DevicesSettingsTab extends UI.Widget.VBox implements
|
|
|
438
438
|
const verticalMode: EmulationModel.EmulatedDevices.Mode = {
|
|
439
439
|
title: '',
|
|
440
440
|
orientation: EmulationModel.EmulatedDevices.Vertical,
|
|
441
|
-
insets: new EmulationModel.DeviceModeModel.Insets(0, 0, 0, 0),
|
|
442
441
|
};
|
|
443
442
|
if (Root.Runtime.hostConfig.devToolsMobileSafeAreaEmulation?.enabled) {
|
|
444
443
|
const safeAreaInsets = this.safeAreaInsetsFromEditor(editor);
|
|
@@ -454,8 +453,6 @@ export class DevicesSettingsTab extends UI.Widget.VBox implements
|
|
|
454
453
|
const horizontalMode: EmulationModel.EmulatedDevices.Mode = {
|
|
455
454
|
title: '',
|
|
456
455
|
orientation: EmulationModel.EmulatedDevices.Horizontal,
|
|
457
|
-
insets: new EmulationModel.DeviceModeModel.Insets(0, 0, 0, 0),
|
|
458
|
-
|
|
459
456
|
};
|
|
460
457
|
if (Root.Runtime.hostConfig.devToolsMobileSafeAreaEmulation?.enabled) {
|
|
461
458
|
const landscapeSafeAreaInsets = this.safeAreaInsetsFromEditor(editor, 'landscape-');
|
|
@@ -163,17 +163,16 @@ export async function evaluateScriptSnippet(uiSourceCode: Workspace.UISourceCode
|
|
|
163
163
|
|
|
164
164
|
const url = uiSourceCode.url();
|
|
165
165
|
|
|
166
|
-
const result = await executionContext.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
true, true);
|
|
166
|
+
const result = await executionContext.evaluateWithSelectedFrameFallback({
|
|
167
|
+
expression: `${expression}\n//# sourceURL=${url}`,
|
|
168
|
+
objectGroup: 'console',
|
|
169
|
+
silent: false,
|
|
170
|
+
includeCommandLineAPI: true,
|
|
171
|
+
returnByValue: false,
|
|
172
|
+
generatePreview: true,
|
|
173
|
+
replMode: true,
|
|
174
|
+
} as SDK.RuntimeModel.EvaluationOptions,
|
|
175
|
+
true, true);
|
|
177
176
|
|
|
178
177
|
if ('exceptionDetails' in result && result.exceptionDetails) {
|
|
179
178
|
consoleModel?.addMessage(SDK.ConsoleModel.ConsoleMessage.fromException(
|
|
@@ -1911,7 +1911,9 @@ export class NavigatorFolderTreeNode extends NavigatorTreeNode {
|
|
|
1911
1911
|
const isOverrides =
|
|
1912
1912
|
Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemType(this.project) === 'overrides';
|
|
1913
1913
|
const hasMappedFiles = isOverrides ?
|
|
1914
|
-
Common.Settings.Settings.instance()
|
|
1914
|
+
Common.Settings.Settings.instance()
|
|
1915
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
1916
|
+
.get() :
|
|
1915
1917
|
Persistence.Persistence.PersistenceImpl.instance().filePathHasBindings(absoluteFileSystemPath);
|
|
1916
1918
|
this.treeElement.listItemElement.classList.toggle('has-mapped-files', hasMappedFiles);
|
|
1917
1919
|
}
|
|
@@ -2101,7 +2103,9 @@ export class NavigatorGroupTreeNode extends NavigatorTreeNode {
|
|
|
2101
2103
|
const isOverrides =
|
|
2102
2104
|
Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemType(this.project) === 'overrides';
|
|
2103
2105
|
const isActive = isOverrides ?
|
|
2104
|
-
Common.Settings.Settings.instance()
|
|
2106
|
+
Common.Settings.Settings.instance()
|
|
2107
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
2108
|
+
.get() :
|
|
2105
2109
|
Persistence.Persistence.PersistenceImpl.instance().filePathHasBindings(fileSystemPath);
|
|
2106
2110
|
if (wasActive === isActive) {
|
|
2107
2111
|
return;
|
|
@@ -318,14 +318,16 @@ export class OverridesNavigatorView extends NavigatorView {
|
|
|
318
318
|
this.toolbar.removeToolbarItems();
|
|
319
319
|
const project = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().project();
|
|
320
320
|
if (project) {
|
|
321
|
-
const enableCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(
|
|
322
|
-
|
|
321
|
+
const enableCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(Common.Settings.Settings.instance().resolve(
|
|
322
|
+
Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor));
|
|
323
323
|
this.toolbar.appendToolbarItem(enableCheckbox);
|
|
324
324
|
|
|
325
325
|
this.toolbar.appendToolbarItem(new UI.Toolbar.ToolbarSeparator(true));
|
|
326
326
|
const clearButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.clearConfiguration), 'clear');
|
|
327
327
|
clearButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, () => {
|
|
328
|
-
Common.Settings.Settings.instance()
|
|
328
|
+
Common.Settings.Settings.instance()
|
|
329
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
330
|
+
.set(false);
|
|
329
331
|
project.remove();
|
|
330
332
|
});
|
|
331
333
|
this.toolbar.appendToolbarItem(clearButton);
|
|
@@ -345,7 +347,9 @@ export class OverridesNavigatorView extends NavigatorView {
|
|
|
345
347
|
if (!fileSystem) {
|
|
346
348
|
return;
|
|
347
349
|
}
|
|
348
|
-
Common.Settings.Settings.instance()
|
|
350
|
+
Common.Settings.Settings.instance()
|
|
351
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
352
|
+
.set(true);
|
|
349
353
|
}
|
|
350
354
|
|
|
351
355
|
override sourceSelected(uiSourceCode: Workspace.UISourceCode.UISourceCode, focusSource: boolean): void {
|
|
@@ -481,7 +481,7 @@ export class SourcesPanel extends UI.Panel.Panel implements
|
|
|
481
481
|
window.focus();
|
|
482
482
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();
|
|
483
483
|
const withOverlay = UI.Context.Context.instance().flavor(SDK.Target.Target)?.model(SDK.OverlayModel.OverlayModel) &&
|
|
484
|
-
!Common.Settings.Settings.instance().
|
|
484
|
+
!Common.Settings.Settings.instance().resolve(SDK.SDKSettings.disablePausedStateOverlaySettingDescriptor).get();
|
|
485
485
|
if (withOverlay && !this.overlayLoggables) {
|
|
486
486
|
this.overlayLoggables = {debuggerPausedMessage: {}, resumeButton: {}, stepOverButton: {}};
|
|
487
487
|
VisualLogging.registerLoggable(
|
|
@@ -1317,7 +1317,9 @@ export class RevealingActionDelegate implements UI.ActionRegistration.ActionDele
|
|
|
1317
1317
|
// Do not trigger a resume action, if: the shortcut was forwarded and the
|
|
1318
1318
|
// paused overlay is enabled.
|
|
1319
1319
|
const actionHandledInPausedOverlay = context.flavor(UI.ShortcutRegistry.ForwardedShortcut) &&
|
|
1320
|
-
!Common.Settings.Settings.instance()
|
|
1320
|
+
!Common.Settings.Settings.instance()
|
|
1321
|
+
.resolve(SDK.SDKSettings.disablePausedStateOverlaySettingDescriptor)
|
|
1322
|
+
.get();
|
|
1321
1323
|
if (actionHandledInPausedOverlay) {
|
|
1322
1324
|
// Taken care of by inspector overlay: handled set to true to
|
|
1323
1325
|
// register user metric.
|
|
@@ -73,7 +73,9 @@ export class SourcesSearchScope implements Search.SearchScope.SearchScope {
|
|
|
73
73
|
const searchInAnonymousAndContentScripts =
|
|
74
74
|
Common.Settings.Settings.instance().moduleSetting('search-in-anonymous-and-content-scripts').get();
|
|
75
75
|
const localOverridesEnabled =
|
|
76
|
-
Common.Settings.Settings.instance()
|
|
76
|
+
Common.Settings.Settings.instance()
|
|
77
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
78
|
+
.get();
|
|
77
79
|
|
|
78
80
|
return Workspace.Workspace.WorkspaceImpl.instance().projects().filter(project => {
|
|
79
81
|
if (project.type() === Workspace.Workspace.projectTypes.Service) {
|
|
@@ -66,7 +66,7 @@ export class UISourceCodeFrame extends Common.ObjectWrapper
|
|
|
66
66
|
this.#boundOnBindingChanged = this.onBindingChanged.bind(this);
|
|
67
67
|
|
|
68
68
|
Common.Settings.Settings.instance()
|
|
69
|
-
.
|
|
69
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
70
70
|
.addChangeListener(this.onNetworkPersistenceChanged, this);
|
|
71
71
|
|
|
72
72
|
this.#errorPopoverHelper = new UI.PopoverHelper.PopoverHelper(
|
|
@@ -428,7 +428,7 @@ export class UISourceCodeFrame extends Common.ObjectWrapper
|
|
|
428
428
|
this.textEditor.editor.destroy();
|
|
429
429
|
this.detach();
|
|
430
430
|
Common.Settings.Settings.instance()
|
|
431
|
-
.
|
|
431
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
432
432
|
.removeChangeListener(this.onNetworkPersistenceChanged, this);
|
|
433
433
|
}
|
|
434
434
|
|
|
@@ -663,7 +663,7 @@ export class WatchExpression {
|
|
|
663
663
|
}
|
|
664
664
|
|
|
665
665
|
try {
|
|
666
|
-
const result = await executionContext.
|
|
666
|
+
const result = await executionContext.evaluateWithSelectedFrameFallback({
|
|
667
667
|
expression,
|
|
668
668
|
objectGroup: WatchExpression.watchObjectGroupId,
|
|
669
669
|
includeCommandLineAPI: false,
|
|
@@ -671,8 +671,8 @@ export class WatchExpression {
|
|
|
671
671
|
returnByValue: false,
|
|
672
672
|
generatePreview: false,
|
|
673
673
|
},
|
|
674
|
-
|
|
675
|
-
|
|
674
|
+
/* userGesture */ false,
|
|
675
|
+
/* awaitPromise */ false);
|
|
676
676
|
if ('object' in result) {
|
|
677
677
|
const objectTree = new ObjectUI.ObjectPropertiesSection.ObjectTree(result.object, {
|
|
678
678
|
readOnly: true,
|
|
@@ -174,19 +174,19 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
|
174
174
|
'screenshot-loaded', () => this.dispatchEventToListeners(Events.DATA_CHANGED));
|
|
175
175
|
|
|
176
176
|
Common.Settings.Settings.instance()
|
|
177
|
-
.
|
|
177
|
+
.resolve(Workspace.IgnoreListManager.skipStackFramesPatternSettingDescriptor)
|
|
178
178
|
.addChangeListener(this.#onIgnoreListChanged.bind(this));
|
|
179
179
|
Common.Settings.Settings.instance()
|
|
180
|
-
.
|
|
180
|
+
.resolve(Workspace.IgnoreListManager.skipContentScriptsSettingDescriptor)
|
|
181
181
|
.addChangeListener(this.#onIgnoreListChanged.bind(this));
|
|
182
182
|
Common.Settings.Settings.instance()
|
|
183
|
-
.
|
|
183
|
+
.resolve(Workspace.IgnoreListManager.automaticallyIgnoreListKnownThirdPartyScriptsSettingDescriptor)
|
|
184
184
|
.addChangeListener(this.#onIgnoreListChanged.bind(this));
|
|
185
185
|
Common.Settings.Settings.instance()
|
|
186
|
-
.
|
|
186
|
+
.resolve(Workspace.IgnoreListManager.enableIgnoreListingSettingDescriptor)
|
|
187
187
|
.addChangeListener(this.#onIgnoreListChanged.bind(this));
|
|
188
188
|
Common.Settings.Settings.instance()
|
|
189
|
-
.
|
|
189
|
+
.resolve(Workspace.IgnoreListManager.skipAnonymousScriptsSettingDescriptor)
|
|
190
190
|
.addChangeListener(this.#onIgnoreListChanged.bind(this));
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -12,7 +12,6 @@ import * as Lit from '../../../ui/lit/lit.js';
|
|
|
12
12
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
13
13
|
|
|
14
14
|
import cwvMetricsStyles from './cwvMetrics.css.js';
|
|
15
|
-
import {md} from './insights/Helpers.js';
|
|
16
15
|
import * as Insights from './insights/insights.js';
|
|
17
16
|
import metricValueStyles from './metricValueStyles.css.js';
|
|
18
17
|
import {isFieldWorseThanLocal, NumberWithUnit} from './Utils.js';
|
|
@@ -266,7 +265,7 @@ const CWV_METRICS_VIEW: MetricsView = (input, _output, target) => {
|
|
|
266
265
|
.jslogContext=${'timeline.insights.dismiss-field-mismatch'}
|
|
267
266
|
@click=${onDismisFieldMismatchNotice}
|
|
268
267
|
></devtools-button>
|
|
269
|
-
<div class="field-mismatch-notice__body">${md(i18nString(UIStrings.fieldMismatchNotice))}</div>
|
|
268
|
+
<div class="field-mismatch-notice__body">${Insights.Helpers.md(i18nString(UIStrings.fieldMismatchNotice))}</div>
|
|
270
269
|
</div>
|
|
271
270
|
`;
|
|
272
271
|
// clang-format on
|
|
@@ -173,7 +173,7 @@ export class IgnoreListSetting extends UI.Widget.Widget {
|
|
|
173
173
|
|
|
174
174
|
#view: View;
|
|
175
175
|
readonly #ignoreListEnabled: Common.Settings.Setting<boolean> =
|
|
176
|
-
Common.Settings.Settings.instance().
|
|
176
|
+
Common.Settings.Settings.instance().resolve(Workspace.IgnoreListManager.enableIgnoreListingSettingDescriptor);
|
|
177
177
|
readonly #regexPatterns = this.#getSkipStackFramesPatternSetting().getAsArray();
|
|
178
178
|
#newRegexValue = '';
|
|
179
179
|
#newRegexChecked = false;
|
|
@@ -187,17 +187,17 @@ export class IgnoreListSetting extends UI.Widget.Widget {
|
|
|
187
187
|
this.element.classList.remove('vbox', 'flex-auto');
|
|
188
188
|
|
|
189
189
|
Common.Settings.Settings.instance()
|
|
190
|
-
.
|
|
190
|
+
.resolve(Workspace.IgnoreListManager.skipStackFramesPatternSettingDescriptor)
|
|
191
191
|
.addChangeListener(this.requestUpdate.bind(this));
|
|
192
192
|
Common.Settings.Settings.instance()
|
|
193
|
-
.
|
|
193
|
+
.resolve(Workspace.IgnoreListManager.enableIgnoreListingSettingDescriptor)
|
|
194
194
|
.addChangeListener(this.requestUpdate.bind(this));
|
|
195
195
|
this.requestUpdate();
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
#getSkipStackFramesPatternSetting(): Common.Settings.RegExpSetting {
|
|
199
|
-
return Common.Settings.Settings.instance().
|
|
200
|
-
|
|
199
|
+
return Common.Settings.Settings.instance().resolve(
|
|
200
|
+
Workspace.IgnoreListManager.skipStackFramesPatternSettingDescriptor) as Common.Settings.RegExpSetting;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
#onNewRegexInputFocus(value: string): void {
|
|
@@ -15,7 +15,6 @@ import * as Lit from '../../../ui/lit/lit.js';
|
|
|
15
15
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
16
16
|
|
|
17
17
|
import * as Insights from './insights/insights.js';
|
|
18
|
-
import {nodeLink} from './insights/NodeLink.js';
|
|
19
18
|
import layoutShiftDetailsStyles from './layoutShiftDetails.css.js';
|
|
20
19
|
|
|
21
20
|
const {html, render} = Lit;
|
|
@@ -375,7 +374,7 @@ function renderShiftedElements(
|
|
|
375
374
|
return html`
|
|
376
375
|
${elementsShifted?.map(el => {
|
|
377
376
|
if (el.node_id !== undefined) {
|
|
378
|
-
return nodeLink({
|
|
377
|
+
return Insights.NodeLink.nodeLink({
|
|
379
378
|
backendNodeId: el.node_id,
|
|
380
379
|
frame: shift.args.frame,
|
|
381
380
|
fallbackHtmlSnippet: el.debug_name,
|
|
@@ -406,7 +405,7 @@ function renderAnimation(
|
|
|
406
405
|
|
|
407
406
|
function renderUnsizedImage(
|
|
408
407
|
frame: string, unsizedImage: Trace.Insights.Models.CLSCulprits.UnsizedImage): Lit.LitTemplate {
|
|
409
|
-
const nodeLinkEl = nodeLink({
|
|
408
|
+
const nodeLinkEl = Insights.NodeLink.nodeLink({
|
|
410
409
|
backendNodeId: unsizedImage.backendNodeId,
|
|
411
410
|
frame,
|
|
412
411
|
fallbackUrl: unsizedImage.paintImageEvent.args.data.url as Platform.DevToolsPath.UrlString | undefined,
|
|
@@ -28,7 +28,7 @@ import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
|
28
28
|
import * as PanelsCommon from '../../common/common.js';
|
|
29
29
|
import * as MobileThrottling from '../../mobile_throttling/mobile_throttling.js';
|
|
30
30
|
|
|
31
|
-
import
|
|
31
|
+
import * as Insights from './insights/insights.js';
|
|
32
32
|
import liveMetricsViewStyles from './liveMetricsView.css.js';
|
|
33
33
|
import type {MetricCardData} from './MetricCard.js';
|
|
34
34
|
import metricValueStyles from './metricValueStyles.css.js';
|
|
@@ -633,7 +633,7 @@ function renderRecordingSettings(input: ViewInput): Lit.LitTemplate {
|
|
|
633
633
|
// clang-format off
|
|
634
634
|
return html`
|
|
635
635
|
<h3 class="card-title">${i18nString(UIStrings.environmentSettings)}</h3>
|
|
636
|
-
<div class="device-toolbar-description">${md(i18nString(UIStrings.useDeviceToolbar))}</div>
|
|
636
|
+
<div class="device-toolbar-description">${Insights.Helpers.md(i18nString(UIStrings.useDeviceToolbar))}</div>
|
|
637
637
|
${fieldEnabled ? html`
|
|
638
638
|
<ul class="environment-recs-list">
|
|
639
639
|
<li>${uiI18n.getFormatLocalizedStringTemplate(str_, UIStrings.device, {PH1: html`<span class="environment-rec">${deviceRec}</span>`})}</li>
|
|
@@ -7,7 +7,7 @@ import * as Common from '../../../core/common/common.js';
|
|
|
7
7
|
import type * as Trace from '../../../models/trace/trace.js';
|
|
8
8
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import * as Insights from './insights/insights.js';
|
|
11
11
|
import {SidebarAnnotationsTab} from './SidebarAnnotationsTab.js';
|
|
12
12
|
import {SidebarInsightsTab} from './SidebarInsightsTab.js';
|
|
13
13
|
|
|
@@ -107,7 +107,7 @@ export class SidebarWidget extends UI.Widget.VBox {
|
|
|
107
107
|
this.#updateAnnotationsCountBadge();
|
|
108
108
|
|
|
109
109
|
if (this.#insightToRestoreOnOpen) {
|
|
110
|
-
this.element.dispatchEvent(new InsightActivated(
|
|
110
|
+
this.element.dispatchEvent(new Insights.SidebarInsight.InsightActivated(
|
|
111
111
|
this.#insightToRestoreOnOpen.model,
|
|
112
112
|
this.#insightToRestoreOnOpen.insightSetKey,
|
|
113
113
|
));
|
|
@@ -129,7 +129,7 @@ export class SidebarWidget extends UI.Widget.VBox {
|
|
|
129
129
|
this.#insightToRestoreOnOpen = currentlyActiveInsight;
|
|
130
130
|
|
|
131
131
|
if (currentlyActiveInsight) {
|
|
132
|
-
this.element.dispatchEvent(new InsightDeactivated());
|
|
132
|
+
this.element.dispatchEvent(new Insights.SidebarInsight.InsightDeactivated());
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
|
|
@@ -9,7 +9,6 @@ import * as UI from '../../../ui/legacy/legacy.js';
|
|
|
9
9
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
10
10
|
|
|
11
11
|
import {CWVMetrics, getFieldMetrics} from './CWVMetrics.js';
|
|
12
|
-
import {shouldRenderForCategory} from './insights/Helpers.js';
|
|
13
12
|
import * as Insights from './insights/insights.js';
|
|
14
13
|
import type {ActiveInsight} from './Sidebar.js';
|
|
15
14
|
import sidebarSingleInsightSetStyles from './sidebarSingleInsightSet.css.js';
|
|
@@ -182,7 +181,7 @@ export class SidebarSingleInsightSet extends UI.Widget.Widget {
|
|
|
182
181
|
const passedInsights: InsightData[] = [];
|
|
183
182
|
|
|
184
183
|
for (const [insightName, model] of Object.entries(insightSet.model)) {
|
|
185
|
-
if (!model || !shouldRenderForCategory({activeCategory, insightCategory: model.category})) {
|
|
184
|
+
if (!model || !Insights.Helpers.shouldRenderForCategory({activeCategory, insightCategory: model.category})) {
|
|
186
185
|
continue;
|
|
187
186
|
}
|
|
188
187
|
|
|
@@ -8,7 +8,7 @@ import * as i18n from '../../../../core/i18n/i18n.js';
|
|
|
8
8
|
import * as Root from '../../../../core/root/root.js';
|
|
9
9
|
import * as AIAssistance from '../../../../models/ai_assistance/ai_assistance.js';
|
|
10
10
|
import * as Badges from '../../../../models/badges/badges.js';
|
|
11
|
-
import type
|
|
11
|
+
import type * as Insights from '../../../../models/trace/insights/insights.js';
|
|
12
12
|
import type * as Trace from '../../../../models/trace/trace.js';
|
|
13
13
|
import * as Buttons from '../../../../ui/components/buttons/buttons.js';
|
|
14
14
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
@@ -21,6 +21,8 @@ import {md} from './Helpers.js';
|
|
|
21
21
|
import * as SidebarInsight from './SidebarInsight.js';
|
|
22
22
|
import type {TableState} from './Table.js';
|
|
23
23
|
|
|
24
|
+
type InsightModel = Insights.Types.InsightModel;
|
|
25
|
+
|
|
24
26
|
const {html} = Lit;
|
|
25
27
|
|
|
26
28
|
const UIStrings = {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
6
6
|
import type * as Platform from '../../../../core/platform/platform.js';
|
|
7
|
-
import type {CLSCulpritsInsightModel} from '../../../../models/trace/insights/CLSCulprits.js';
|
|
8
7
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
9
8
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
10
9
|
|
|
@@ -16,7 +15,7 @@ const {UIStrings, i18nString} = Trace.Insights.Models.CLSCulprits;
|
|
|
16
15
|
|
|
17
16
|
const {html} = Lit;
|
|
18
17
|
|
|
19
|
-
export class CLSCulprits extends BaseInsightComponent<CLSCulpritsInsightModel> {
|
|
18
|
+
export class CLSCulprits extends BaseInsightComponent<Trace.Insights.Models.CLSCulprits.CLSCulpritsInsightModel> {
|
|
20
19
|
override internalName = 'cls-culprits';
|
|
21
20
|
|
|
22
21
|
protected override hasAskAiSupport(): boolean {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import './Table.js';
|
|
6
6
|
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
8
|
-
import type {CacheInsightModel} from '../../../../models/trace/insights/Cache.js';
|
|
9
8
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
10
9
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
11
10
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -19,7 +18,7 @@ const {UIStrings, i18nString, createOverlayForRequest} = Trace.Insights.Models.C
|
|
|
19
18
|
const {html} = Lit;
|
|
20
19
|
const {widget} = UI.Widget;
|
|
21
20
|
|
|
22
|
-
export class Cache extends BaseInsightComponent<CacheInsightModel> {
|
|
21
|
+
export class Cache extends BaseInsightComponent<Trace.Insights.Models.Cache.CacheInsightModel> {
|
|
23
22
|
override internalName = 'cache';
|
|
24
23
|
|
|
25
24
|
protected override hasAskAiSupport(): boolean {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import type {CharacterSetInsightModel} from '../../../../models/trace/insights/CharacterSet.js';
|
|
6
5
|
import type * as Trace from '../../../../models/trace/trace.js';
|
|
7
6
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
8
7
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -13,7 +12,7 @@ import {Checklist} from './Checklist.js';
|
|
|
13
12
|
const {html} = Lit;
|
|
14
13
|
const {widget} = UI.Widget;
|
|
15
14
|
|
|
16
|
-
export class CharacterSet extends BaseInsightComponent<CharacterSetInsightModel> {
|
|
15
|
+
export class CharacterSet extends BaseInsightComponent<Trace.Insights.Models.CharacterSet.CharacterSetInsightModel> {
|
|
17
16
|
override internalName = 'character-set';
|
|
18
17
|
|
|
19
18
|
protected override hasAskAiSupport(): boolean {
|
|
@@ -6,7 +6,6 @@ import '../../../../ui/kit/kit.js';
|
|
|
6
6
|
import './Table.js';
|
|
7
7
|
|
|
8
8
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
9
|
-
import type {DOMSizeInsightModel} from '../../../../models/trace/insights/DOMSize.js';
|
|
10
9
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
11
10
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
12
11
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -22,7 +21,7 @@ const {UIStrings, i18nString} = Trace.Insights.Models.DOMSize;
|
|
|
22
21
|
const {html} = Lit;
|
|
23
22
|
const {widget} = UI.Widget;
|
|
24
23
|
|
|
25
|
-
export class DOMSize extends BaseInsightComponent<DOMSizeInsightModel> {
|
|
24
|
+
export class DOMSize extends BaseInsightComponent<Trace.Insights.Models.DOMSize.DOMSizeInsightModel> {
|
|
26
25
|
override internalName = 'dom-size';
|
|
27
26
|
|
|
28
27
|
protected override hasAskAiSupport(): boolean {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import type {DocumentLatencyInsightModel} from '../../../../models/trace/insights/DocumentLatency.js';
|
|
6
5
|
import type * as Trace from '../../../../models/trace/trace.js';
|
|
7
6
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
8
7
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -13,7 +12,8 @@ import {Checklist} from './Checklist.js';
|
|
|
13
12
|
const {html} = Lit;
|
|
14
13
|
const {widget} = UI.Widget;
|
|
15
14
|
|
|
16
|
-
export class DocumentLatency extends
|
|
15
|
+
export class DocumentLatency extends
|
|
16
|
+
BaseInsightComponent<Trace.Insights.Models.DocumentLatency.DocumentLatencyInsightModel> {
|
|
17
17
|
override internalName = 'document-latency';
|
|
18
18
|
|
|
19
19
|
protected override hasAskAiSupport(): boolean {
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
6
|
-
import type {DuplicatedJavaScriptInsightModel} from '../../../../models/trace/insights/DuplicatedJavaScript.js';
|
|
7
6
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
8
7
|
import * as Buttons from '../../../../ui/components/buttons/buttons.js';
|
|
9
8
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
@@ -20,7 +19,8 @@ const {UIStrings, i18nString} = Trace.Insights.Models.DuplicatedJavaScript;
|
|
|
20
19
|
const {html} = Lit;
|
|
21
20
|
const {widget} = UI.Widget;
|
|
22
21
|
|
|
23
|
-
export class DuplicatedJavaScript extends
|
|
22
|
+
export class DuplicatedJavaScript extends
|
|
23
|
+
BaseInsightComponent<Trace.Insights.Models.DuplicatedJavaScript.DuplicatedJavaScriptInsightModel> {
|
|
24
24
|
override internalName = 'duplicated-javascript';
|
|
25
25
|
#treemapData: Utils.Treemap.TreemapData|null = null;
|
|
26
26
|
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import './Table.js';
|
|
6
6
|
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
8
|
-
import type {FontDisplayInsightModel} from '../../../../models/trace/insights/FontDisplay.js';
|
|
9
8
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
10
9
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
11
10
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -19,7 +18,7 @@ const {UIStrings, i18nString} = Trace.Insights.Models.FontDisplay;
|
|
|
19
18
|
const {html} = Lit;
|
|
20
19
|
const {widget} = UI.Widget;
|
|
21
20
|
|
|
22
|
-
export class FontDisplay extends BaseInsightComponent<FontDisplayInsightModel> {
|
|
21
|
+
export class FontDisplay extends BaseInsightComponent<Trace.Insights.Models.FontDisplay.FontDisplayInsightModel> {
|
|
23
22
|
override internalName = 'font-display';
|
|
24
23
|
#overlayForRequest = new Map<Trace.Types.Events.Event, Trace.Types.Overlays.Overlay>();
|
|
25
24
|
|
|
@@ -6,7 +6,6 @@ import './Table.js';
|
|
|
6
6
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
7
7
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
8
8
|
import type * as Protocol from '../../../../generated/protocol.js';
|
|
9
|
-
import type {ForcedReflowInsightModel} from '../../../../models/trace/insights/ForcedReflow.js';
|
|
10
9
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
11
10
|
import * as LegacyComponents from '../../../../ui/legacy/components/utils/utils.js';
|
|
12
11
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
@@ -20,7 +19,7 @@ const {UIStrings, i18nString, createOverlayForEvents} = Trace.Insights.Models.Fo
|
|
|
20
19
|
const {html, nothing} = Lit;
|
|
21
20
|
const {widget} = UI.Widget;
|
|
22
21
|
|
|
23
|
-
export class ForcedReflow extends BaseInsightComponent<ForcedReflowInsightModel> {
|
|
22
|
+
export class ForcedReflow extends BaseInsightComponent<Trace.Insights.Models.ForcedReflow.ForcedReflowInsightModel> {
|
|
24
23
|
override internalName = 'forced-reflow';
|
|
25
24
|
|
|
26
25
|
protected override hasAskAiSupport(): boolean {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
6
6
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
7
|
-
import type {INPBreakdownInsightModel} from '../../../../models/trace/insights/INPBreakdown.js';
|
|
8
7
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
9
8
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
10
9
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -17,7 +16,7 @@ const {UIStrings, i18nString, createOverlaysForSubpart} = Trace.Insights.Models.
|
|
|
17
16
|
const {html} = Lit;
|
|
18
17
|
const {widget} = UI.Widget;
|
|
19
18
|
|
|
20
|
-
export class INPBreakdown extends BaseInsightComponent<INPBreakdownInsightModel> {
|
|
19
|
+
export class INPBreakdown extends BaseInsightComponent<Trace.Insights.Models.INPBreakdown.INPBreakdownInsightModel> {
|
|
21
20
|
override internalName = 'inp';
|
|
22
21
|
|
|
23
22
|
protected override hasAskAiSupport(): boolean {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import '../../../../ui/kit/kit.js';
|
|
6
6
|
|
|
7
|
-
import type {ImageDeliveryInsightModel} from '../../../../models/trace/insights/ImageDelivery.js';
|
|
8
7
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
9
8
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
10
9
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -18,7 +17,7 @@ const {UIStrings, i18nString, createOverlayForRequest} = Trace.Insights.Models.I
|
|
|
18
17
|
const {html} = Lit;
|
|
19
18
|
const {widget} = UI.Widget;
|
|
20
19
|
|
|
21
|
-
export class ImageDelivery extends BaseInsightComponent<ImageDeliveryInsightModel> {
|
|
20
|
+
export class ImageDelivery extends BaseInsightComponent<Trace.Insights.Models.ImageDelivery.ImageDeliveryInsightModel> {
|
|
22
21
|
override internalName = 'image-delivery';
|
|
23
22
|
|
|
24
23
|
mapToRow(image: Trace.Insights.Models.ImageDelivery.OptimizableImage): TableDataRow {
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
6
|
-
import type {LCPBreakdownInsightModel} from '../../../../models/trace/insights/LCPBreakdown.js';
|
|
7
6
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
8
7
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
9
8
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -17,7 +16,7 @@ const {UIStrings, i18nString} = Trace.Insights.Models.LCPBreakdown;
|
|
|
17
16
|
const {html} = Lit;
|
|
18
17
|
const {widget} = UI.Widget;
|
|
19
18
|
|
|
20
|
-
export class LCPBreakdown extends BaseInsightComponent<LCPBreakdownInsightModel> {
|
|
19
|
+
export class LCPBreakdown extends BaseInsightComponent<Trace.Insights.Models.LCPBreakdown.LCPBreakdownInsightModel> {
|
|
21
20
|
override internalName = 'lcp-by-phase';
|
|
22
21
|
#overlay: Trace.Types.Overlays.TimespanBreakdown|null = null;
|
|
23
22
|
|
|
@@ -100,17 +99,18 @@ export class LCPBreakdown extends BaseInsightComponent<LCPBreakdownInsightModel>
|
|
|
100
99
|
return html`<div class="insight-section">${i18nString(UIStrings.noLcp)}</div>`;
|
|
101
100
|
}
|
|
102
101
|
|
|
103
|
-
const rows: TableDataRow[] =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
102
|
+
const rows: TableDataRow[] =
|
|
103
|
+
(Object.values(subparts) as Trace.Insights.Models.LCPBreakdown.Subpart[]).map(subpart => {
|
|
104
|
+
const section = this.#overlay?.sections.find(section => subpart.label === section.label);
|
|
105
|
+
const timing = Trace.Helpers.Timing.microToMilli(subpart.range);
|
|
106
|
+
return {
|
|
107
|
+
values: [subpart.label, i18n.TimeUtilities.preciseMillisToString(timing)],
|
|
108
|
+
overlays: section && [{
|
|
109
|
+
type: 'TIMESPAN_BREAKDOWN',
|
|
110
|
+
sections: [section],
|
|
111
|
+
}],
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
114
|
|
|
115
115
|
// clang-format off
|
|
116
116
|
const sections: Lit.LitTemplate[] = [html`
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
6
|
-
import type {LCPDiscoveryInsightModel} from '../../../../models/trace/insights/LCPDiscovery.js';
|
|
7
6
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
8
7
|
import * as uiI18n from '../../../../ui/i18n/i18n.js';
|
|
9
8
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
@@ -22,7 +21,7 @@ const {html} = Lit;
|
|
|
22
21
|
// eslint-disable-next-line @devtools/l10n-filename-matches
|
|
23
22
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/LCPDiscovery.ts', UIStrings);
|
|
24
23
|
|
|
25
|
-
export class LCPDiscovery extends BaseInsightComponent<LCPDiscoveryInsightModel> {
|
|
24
|
+
export class LCPDiscovery extends BaseInsightComponent<Trace.Insights.Models.LCPDiscovery.LCPDiscoveryInsightModel> {
|
|
26
25
|
override internalName = 'lcp-discovery';
|
|
27
26
|
|
|
28
27
|
protected override hasAskAiSupport(): boolean {
|