chrome-devtools-frontend 1.0.1376716 → 1.0.1380117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/gni/devtools_grd_files.gni +15 -7
- package/config/gni/devtools_image_files.gni +2 -0
- package/front_end/Images/src/animation.svg +3 -0
- package/front_end/Images/src/brush-2.svg +3 -0
- package/front_end/core/common/SettingRegistration.ts +1 -1
- package/front_end/core/host/AidaClient.ts +1 -0
- package/front_end/core/host/InspectorFrontendHost.ts +4 -0
- package/front_end/core/i18n/ByteUtilities.test.ts +34 -0
- package/front_end/core/i18n/ByteUtilities.ts +65 -0
- package/front_end/core/i18n/NumberFormatter.ts +75 -0
- package/front_end/core/i18n/i18n.ts +4 -0
- package/front_end/core/i18n/time-utilities.test.ts +20 -2
- package/front_end/core/i18n/time-utilities.ts +125 -86
- package/front_end/core/platform/NumberUtilities.test.ts +3 -26
- package/front_end/core/platform/NumberUtilities.ts +0 -20
- package/front_end/core/root/Runtime.ts +6 -3
- package/front_end/core/sdk/CPUThrottlingManager.ts +4 -0
- package/front_end/core/sdk/CSSContainerQuery.test.ts +10 -16
- package/front_end/core/sdk/CSSContainerQuery.ts +3 -15
- package/front_end/core/sdk/CSSMatchedStyles.test.ts +4 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +5 -5
- package/front_end/core/sdk/CSSModel.ts +18 -0
- package/front_end/core/sdk/CSSPropertyParser.test.ts +16 -1
- package/front_end/core/sdk/CSSPropertyParser.ts +2 -2
- package/front_end/core/sdk/sdk-meta.ts +8 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +3 -3
- package/front_end/generated/ARIAProperties.js +4 -0
- package/front_end/generated/InspectorBackendCommands.js +8 -6
- package/front_end/generated/SupportedCSSProperties.js +17 -4
- package/front_end/generated/protocol-mapping.d.ts +15 -1
- package/front_end/generated/protocol-proxy-api.d.ts +14 -1
- package/front_end/generated/protocol.ts +26 -2
- package/front_end/models/extensions/ExtensionAPI.ts +9 -1
- package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +8 -21
- package/front_end/models/live-metrics/web-vitals-injected/{rollup.config.js → rollup.config.mjs} +1 -1
- package/front_end/models/persistence/EditFileSystemView.ts +19 -9
- package/front_end/models/persistence/WorkspaceSettingsTab.ts +50 -54
- package/front_end/models/persistence/editFileSystemView.css +35 -15
- package/front_end/models/persistence/workspaceSettingsTab.css +21 -87
- package/front_end/models/timeline_model/timeline_model.ts +0 -6
- package/front_end/models/trace/Processor.test.ts +18 -17
- package/front_end/models/trace/Processor.ts +10 -14
- package/front_end/models/trace/README.md +0 -1
- package/front_end/models/{timeline_model → trace/extras}/TimelineJSProfile.ts +19 -29
- package/front_end/models/{timeline_model/TimelineModelFilter.test.ts → trace/extras/TraceFilter.test.ts} +15 -17
- package/front_end/models/trace/extras/TraceFilter.ts +62 -0
- package/front_end/models/{timeline_model/TimelineProfileTree.test.ts → trace/extras/TraceTree.test.ts} +44 -43
- package/front_end/models/{timeline_model/TimelineProfileTree.ts → trace/extras/TraceTree.ts} +65 -59
- package/front_end/models/trace/extras/extras.ts +3 -0
- package/front_end/models/trace/handlers/AnimationHandler.ts +0 -8
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +1 -11
- package/front_end/models/trace/handlers/FramesHandler.test.ts +1 -6
- package/front_end/models/trace/handlers/FramesHandler.ts +1 -14
- package/front_end/models/trace/handlers/GPUHandler.test.ts +0 -2
- package/front_end/models/trace/handlers/GPUHandler.ts +1 -25
- package/front_end/models/trace/handlers/ImagePaintingHandler.ts +3 -0
- package/front_end/models/trace/handlers/InitiatorsHandler.test.ts +0 -1
- package/front_end/models/trace/handlers/InitiatorsHandler.ts +0 -20
- package/front_end/models/trace/handlers/InvalidationsHandler.test.ts +0 -1
- package/front_end/models/trace/handlers/InvalidationsHandler.ts +0 -18
- package/front_end/models/trace/handlers/LargestImagePaintHandler.test.ts +2 -2
- package/front_end/models/trace/handlers/LargestImagePaintHandler.ts +63 -3
- package/front_end/models/trace/handlers/LargestTextPaintHandler.ts +3 -0
- package/front_end/models/trace/handlers/LayerTreeHandler.test.ts +0 -2
- package/front_end/models/trace/handlers/LayerTreeHandler.ts +1 -18
- package/front_end/models/trace/handlers/LayoutShiftsHandler.test.ts +0 -3
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +1 -20
- package/front_end/models/trace/handlers/MemoryHandler.test.ts +0 -1
- package/front_end/models/trace/handlers/MemoryHandler.ts +3 -0
- package/front_end/models/trace/handlers/MetaHandler.test.ts +1 -32
- package/front_end/models/trace/handlers/MetaHandler.ts +2 -30
- package/front_end/models/trace/handlers/NetworkRequestsHandler.test.ts +0 -26
- package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +4 -23
- package/front_end/models/trace/handlers/PageFramesHandler.ts +3 -0
- package/front_end/models/trace/handlers/RendererHandler.test.ts +0 -4
- package/front_end/models/trace/handlers/RendererHandler.ts +1 -24
- package/front_end/models/trace/handlers/SamplesHandler.test.ts +0 -5
- package/front_end/models/trace/handlers/SamplesHandler.ts +0 -26
- package/front_end/models/trace/handlers/ScreenshotsHandler.test.ts +0 -1
- package/front_end/models/trace/handlers/SelectorStatsHandler.ts +3 -0
- package/front_end/models/trace/handlers/ServerTimingsHandler.ts +1 -16
- package/front_end/models/trace/handlers/Threads.test.ts +1 -2
- package/front_end/models/trace/handlers/UserInteractionsHandler.test.ts +4 -27
- package/front_end/models/trace/handlers/UserInteractionsHandler.ts +16 -25
- package/front_end/models/trace/handlers/UserTimingsHandler.ts +0 -17
- package/front_end/models/trace/handlers/WorkersHandler.test.ts +0 -1
- package/front_end/models/trace/handlers/WorkersHandler.ts +0 -23
- package/front_end/models/trace/handlers/types.ts +1 -8
- package/front_end/models/trace/insights/{CumulativeLayoutShift.test.ts → CLSCulprits.test.ts} +21 -21
- package/front_end/models/trace/insights/{CumulativeLayoutShift.ts → CLSCulprits.ts} +24 -5
- package/front_end/models/trace/insights/Common.ts +5 -55
- package/front_end/models/trace/insights/DocumentLatency.test.ts +2 -2
- package/front_end/models/trace/insights/DocumentLatency.ts +26 -6
- package/front_end/models/trace/insights/FontDisplay.ts +24 -5
- package/front_end/models/trace/insights/InteractionToNextPaint.test.ts +1 -1
- package/front_end/models/trace/insights/InteractionToNextPaint.ts +26 -6
- package/front_end/models/trace/insights/LCPDiscovery.test.ts +58 -0
- package/front_end/models/trace/insights/LCPDiscovery.ts +101 -0
- package/front_end/models/trace/insights/{LargestContentfulPaint.test.ts → LCPPhases.test.ts} +6 -28
- package/front_end/models/trace/insights/{LargestContentfulPaint.ts → LCPPhases.ts} +37 -38
- package/front_end/models/trace/insights/{InsightRunners.ts → Models.ts} +4 -3
- package/front_end/models/trace/insights/RenderBlocking.test.ts +1 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +33 -28
- package/front_end/models/trace/insights/SlowCSSSelector.ts +26 -5
- package/front_end/models/trace/insights/{ThirdPartyWeb.test.ts → ThirdParties.test.ts} +3 -3
- package/front_end/models/trace/insights/{ThirdPartyWeb.ts → ThirdParties.ts} +24 -5
- package/front_end/models/trace/insights/Viewport.test.ts +1 -1
- package/front_end/models/trace/insights/Viewport.ts +27 -9
- package/front_end/models/trace/insights/insights.ts +1 -1
- package/front_end/models/trace/insights/types.ts +11 -9
- package/front_end/models/trace/types/TraceEvents.ts +51 -22
- package/front_end/panels/application/SharedStorageItemsView.test.ts +3 -3
- package/front_end/panels/application/SharedStorageItemsView.ts +5 -3
- package/front_end/panels/application/StorageView.ts +3 -3
- package/front_end/panels/application/components/StorageMetadataView.ts +1 -2
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +34 -31
- package/front_end/panels/coverage/CoverageView.ts +3 -3
- package/front_end/panels/elements/ComputedStyleModel.ts +9 -2
- package/front_end/panels/elements/ComputedStyleWidget.test.ts +72 -0
- package/front_end/panels/elements/ComputedStyleWidget.ts +12 -0
- package/front_end/panels/elements/ElementStatePaneWidget.test.ts +84 -30
- package/front_end/panels/elements/ElementStatePaneWidget.ts +42 -24
- package/front_end/panels/elements/ElementsTreeElement.ts +24 -11
- package/front_end/panels/elements/MetricsSidebarPane.ts +12 -7
- package/front_end/panels/elements/PropertyMatchers.ts +3 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +15 -6
- package/front_end/panels/elements/StylePropertyTreeElement.test.ts +3 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -3
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +2 -2
- package/front_end/panels/explain/components/ConsoleInsight.ts +8 -18
- package/front_end/panels/freestyler/AiAgent.test.ts +58 -1
- package/front_end/panels/freestyler/AiAgent.ts +58 -3
- package/front_end/panels/freestyler/DrJonesFileAgent.test.ts +99 -23
- package/front_end/panels/freestyler/DrJonesFileAgent.ts +53 -20
- package/front_end/panels/freestyler/DrJonesNetworkAgent.test.ts +15 -7
- package/front_end/panels/freestyler/DrJonesNetworkAgent.ts +36 -15
- package/front_end/panels/freestyler/DrJonesPerformanceAgent.test.ts +6 -6
- package/front_end/panels/freestyler/DrJonesPerformanceAgent.ts +48 -8
- package/front_end/panels/freestyler/FreestylerAgent.test.ts +15 -14
- package/front_end/panels/freestyler/FreestylerAgent.ts +52 -8
- package/front_end/panels/freestyler/FreestylerPanel.test.ts +539 -39
- package/front_end/panels/freestyler/FreestylerPanel.ts +349 -215
- package/front_end/panels/freestyler/components/FreestylerChatUi.test.ts +126 -34
- package/front_end/panels/freestyler/components/FreestylerChatUi.ts +320 -268
- package/front_end/panels/freestyler/components/UserActionRow.ts +156 -47
- package/front_end/panels/freestyler/components/freestylerChatUi.css +69 -34
- package/front_end/panels/freestyler/components/userActionRow.css +40 -67
- package/front_end/panels/freestyler/freestyler-meta.ts +3 -11
- package/front_end/panels/issues/components/HideIssuesMenu.ts +2 -11
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +1 -2
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +5 -5
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +46 -0
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +26 -17
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +25 -19
- package/front_end/panels/network/BinaryResourceView.ts +6 -7
- package/front_end/panels/network/EventSourceMessagesView.ts +1 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -3
- package/front_end/panels/network/NetworkLogView.ts +7 -8
- package/front_end/panels/network/RequestTimingView.test.ts +35 -1
- package/front_end/panels/network/RequestTimingView.ts +96 -0
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +2 -2
- package/front_end/panels/network/networkTimingTable.css +2 -1
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -1
- package/front_end/panels/profiler/HeapProfileView.ts +3 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +2 -2
- package/front_end/panels/profiler/HeapTimelineOverview.ts +12 -12
- package/front_end/panels/profiler/IsolateSelector.ts +3 -4
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +1 -1
- package/front_end/panels/profiler/ProfileSidebarTreeElement.ts +7 -6
- package/front_end/panels/profiler/ProfileView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingView.ts +2 -2
- package/front_end/panels/recorder/injected/{rollup.config.js → rollup.config.mjs} +1 -1
- package/front_end/panels/recorder/recorderController.css +0 -4
- package/front_end/panels/security/CookieReportTreeElement.ts +1 -9
- package/front_end/panels/security/CookieReportView.ts +120 -0
- package/front_end/panels/security/SecurityPanel.ts +8 -2
- package/front_end/panels/security/cookieReportView.css +46 -0
- package/front_end/panels/security/sidebar.css +1 -2
- package/front_end/panels/sensors/LocationsSettingsTab.ts +26 -11
- package/front_end/panels/sensors/locationsSettingsTab.css +18 -18
- package/front_end/panels/settings/AISettingsTab.ts +6 -15
- package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +61 -56
- package/front_end/panels/settings/aiSettingsTab.css +3 -14
- package/front_end/panels/settings/components/SyncSection.ts +1 -2
- package/front_end/panels/settings/components/syncSection.css +0 -10
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +3 -1
- package/front_end/panels/settings/keybindsSettingsTab.css +7 -10
- package/front_end/panels/settings/settingsScreen.css +27 -125
- package/front_end/panels/sources/DebuggerPlugin.ts +9 -4
- package/front_end/panels/sources/NavigatorView.ts +11 -13
- package/front_end/panels/timeline/ActiveFilters.ts +3 -4
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +1 -2
- package/front_end/panels/timeline/CountersGraph.ts +2 -4
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +7 -8
- package/front_end/panels/timeline/README.md +2 -1
- package/front_end/panels/timeline/TimelineController.ts +14 -4
- package/front_end/panels/timeline/TimelineEventOverview.ts +3 -4
- package/front_end/panels/timeline/TimelineFilters.ts +3 -4
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.test.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -10
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -2
- package/front_end/panels/timeline/TimelineFlameChartView.ts +21 -12
- package/front_end/panels/timeline/TimelineLoader.test.ts +1 -2
- package/front_end/panels/timeline/TimelineLoader.ts +3 -4
- package/front_end/panels/timeline/TimelineMiniMap.ts +10 -0
- package/front_end/panels/timeline/TimelinePanel.ts +20 -8
- package/front_end/panels/timeline/TimelineTreeView.test.ts +12 -13
- package/front_end/panels/timeline/TimelineTreeView.ts +35 -40
- package/front_end/panels/timeline/TimelineUIUtils.test.ts +2 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +12 -14
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +6 -7
- package/front_end/panels/timeline/components/LiveMetricsView.test.ts +3 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +14 -26
- package/front_end/panels/timeline/components/MetricCard.test.ts +1 -1
- package/front_end/panels/timeline/components/MetricCard.ts +46 -0
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +3 -4
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.test.ts +2 -0
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +41 -36
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +19 -33
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +29 -40
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +17 -23
- package/front_end/panels/timeline/components/insights/Helpers.ts +12 -16
- package/front_end/panels/timeline/components/insights/InteractionToNextPaint.ts +14 -26
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +25 -37
- package/front_end/panels/timeline/components/insights/LCPPhases.ts +20 -47
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +19 -28
- package/front_end/panels/timeline/components/insights/SidebarInsight.ts +1 -2
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +18 -31
- package/front_end/panels/timeline/components/insights/Table.ts +5 -3
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +18 -25
- package/front_end/panels/timeline/components/insights/Viewport.ts +14 -25
- package/front_end/panels/timeline/components/liveMetricsView.css +5 -13
- package/front_end/panels/timeline/components/metricCard.css +11 -0
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -1
- package/front_end/panels/timeline/overlays/OverlaysImpl.test.ts +5 -5
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +13 -12
- package/front_end/panels/timeline/timelineFlameChartView.css +1 -1
- package/front_end/panels/timeline/utils/AICallTree.test.ts +105 -0
- package/front_end/panels/timeline/utils/AICallTree.ts +25 -24
- package/front_end/testing/EnvironmentHelpers.ts +5 -18
- package/front_end/testing/InsightHelpers.ts +4 -4
- package/front_end/testing/TraceHelpers.ts +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +2 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +14 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js +16 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Input.d.ts +34 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Input.js +51 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +10 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.d.ts +14 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.js +57 -23
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +13 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Input.d.ts +15 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Input.js +55 -26
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts +0 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.js +2 -11
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js +9 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.js +5 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/WaitTask.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.js +0 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/environment.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/incremental-id-generator.d.ts +14 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/incremental-id-generator.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/incremental-id-generator.js +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/incremental-id-generator.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +51 -10
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +215 -97
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +14 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js +16 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts +34 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.js +51 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +10 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.d.ts +14 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.js +57 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +13 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Input.d.ts +15 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Input.js +55 -26
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.d.ts +0 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.js +1 -9
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.js +5 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/WaitTask.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.js +0 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/environment.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/incremental-id-generator.d.ts +14 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/incremental-id-generator.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/incremental-id-generator.js +15 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/incremental-id-generator.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +51 -10
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +2 -3
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +21 -3
- package/front_end/third_party/puppeteer/package/src/api/Input.ts +57 -8
- package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +9 -7
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Input.ts +72 -31
- package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +14 -9
- package/front_end/third_party/puppeteer/package/src/cdp/Input.ts +71 -26
- package/front_end/third_party/puppeteer/package/src/common/CallbackRegistry.ts +1 -15
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +8 -1
- package/front_end/third_party/puppeteer/package/src/common/Errors.ts +7 -0
- package/front_end/third_party/puppeteer/package/src/common/WaitTask.ts +9 -9
- package/front_end/third_party/puppeteer/package/src/environment.ts +1 -4
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/incremental-id-generator.ts +20 -0
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
- package/front_end/ui/components/buttons/Button.test.ts +14 -0
- package/front_end/ui/components/buttons/Button.ts +27 -4
- package/front_end/ui/components/cards/card.css +7 -4
- package/front_end/ui/components/dialogs/Dialog.ts +2 -4
- package/front_end/ui/components/dialogs/ShortcutDialog.ts +15 -13
- package/front_end/ui/components/dialogs/dialog.css +2 -6
- package/front_end/ui/components/dialogs/shortcutDialog.css +33 -41
- package/front_end/ui/components/docs/freestyler/basic.ts +6 -8
- package/front_end/ui/components/docs/freestyler/empty_state.ts +6 -8
- package/front_end/ui/components/docs/performance_panel/track_example.html +1 -1
- package/front_end/ui/components/markdown_view/MarkdownView.test.ts +39 -17
- package/front_end/ui/components/markdown_view/MarkdownView.ts +77 -14
- package/front_end/ui/components/markdown_view/markdownView.css +15 -0
- package/front_end/ui/components/settings/SettingCheckbox.ts +3 -2
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/InplaceEditor.ts +18 -14
- package/front_end/ui/legacy/TabbedPane.ts +0 -14
- package/front_end/ui/legacy/UIUtils.ts +0 -7
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +7 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +8 -4
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +20 -11
- package/front_end/ui/legacy/components/inline_editor/LinkSwatch.test.ts +19 -0
- package/front_end/ui/legacy/components/inline_editor/LinkSwatch.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +5 -22
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +129 -100
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +4 -2
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewCalculator.test.ts +9 -4
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewCalculator.ts +6 -6
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +22 -4
- package/front_end/ui/legacy/components/perf_ui/flameChart.css +0 -2
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.test.ts +49 -0
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +23 -46
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -1
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +1 -1
- package/front_end/ui/legacy/textPrompt.css +1 -1
- package/front_end/ui/legacy/toolbar.css +4 -5
- package/front_end/ui/visual_logging/KnownContextValues.ts +174 -0
- package/front_end/ui/visual_logging/LoggingConfig.ts +6 -2
- package/package.json +7 -6
- package/scripts/build/ninja/bundle.gni +3 -3
- package/scripts/build/{rollup.config.js → rollup.config.mjs} +4 -4
- package/scripts/devtools_paths.py +8 -4
- package/scripts/eslint_rules/tests/check_test_definitions_test.js +8 -3
- package/scripts/tools/update_goldens_v2.py +1 -1
- package/front_end/models/timeline_model/TimelineModelFilter.ts +0 -61
- /package/front_end/Images/{rollup.config.js → rollup.config.mjs} +0 -0
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
import '../../../../ui/components/markdown_view/markdown_view.js';
|
6
6
|
|
7
|
-
import
|
7
|
+
import type {InsightModel} from '../../../../models/trace/insights/types.js';
|
8
8
|
import type * as Trace from '../../../../models/trace/trace.js';
|
9
9
|
import * as Marked from '../../../../third_party/marked/marked.js';
|
10
10
|
import * as ComponentHelpers from '../../../../ui/components/helpers/helpers.js';
|
@@ -37,7 +37,6 @@ export function insightIsActive(options: {
|
|
37
37
|
}
|
38
38
|
|
39
39
|
export interface BaseInsightData {
|
40
|
-
insights: Trace.Insights.Types.TraceInsightSets|null;
|
41
40
|
parsedTrace: Trace.Handlers.Types.ParsedTrace|null;
|
42
41
|
/** The key into `insights` that contains this particular insight. */
|
43
42
|
insightSetKey: string|null;
|
@@ -47,19 +46,22 @@ export interface BaseInsightData {
|
|
47
46
|
|
48
47
|
// TODO(crbug.com/371615739): BaseInsight, SidebarInsight should be combined.
|
49
48
|
// This is an abstract base class so the component naming rules do not apply.
|
50
|
-
export abstract class
|
49
|
+
export abstract class BaseInsightComponent<T extends InsightModel<{}>> extends HTMLElement {
|
51
50
|
abstract internalName: string;
|
52
51
|
abstract insightCategory: Category;
|
53
|
-
abstract userVisibleTitle: string;
|
54
|
-
abstract description: string;
|
55
52
|
// So we can use the TypeScript BaseInsight class without getting warnings
|
56
53
|
// about litTagName. Every child should overrwrite this.
|
57
54
|
static readonly litTagName = LitHtml.literal``;
|
58
55
|
|
59
56
|
protected readonly shadow = this.attachShadow({mode: 'open'});
|
60
57
|
|
58
|
+
#model: T|null = null;
|
59
|
+
|
60
|
+
get model(): T|null {
|
61
|
+
return this.#model;
|
62
|
+
}
|
63
|
+
|
61
64
|
protected data: BaseInsightData = {
|
62
|
-
insights: null,
|
63
65
|
parsedTrace: null,
|
64
66
|
insightSetKey: null,
|
65
67
|
activeInsight: null,
|
@@ -86,19 +88,19 @@ export abstract class BaseInsight extends HTMLElement {
|
|
86
88
|
this.dataset.insightName = this.internalName;
|
87
89
|
|
88
90
|
// TODO(crbug.com/371615739): this should be moved to model/trace/insights
|
89
|
-
if (!this.#hasRegisteredRelatedEvents) {
|
91
|
+
if (!this.#hasRegisteredRelatedEvents && this.#model) {
|
90
92
|
this.#hasRegisteredRelatedEvents = true;
|
91
93
|
|
92
94
|
const events = this.getRelatedEvents();
|
93
95
|
if (events.length) {
|
94
96
|
this.dispatchEvent(new SidebarInsight.InsightProvideRelatedEvents(
|
95
|
-
this.
|
97
|
+
this.#model.title, events, this.#dispatchInsightActivatedEvent.bind(this)));
|
96
98
|
}
|
97
99
|
}
|
98
100
|
}
|
99
101
|
|
100
|
-
set
|
101
|
-
this
|
102
|
+
set model(model: T) {
|
103
|
+
this.#model = model;
|
102
104
|
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
103
105
|
}
|
104
106
|
|
@@ -200,12 +202,6 @@ export abstract class BaseInsight extends HTMLElement {
|
|
200
202
|
insightSetKey: this.data.insightSetKey,
|
201
203
|
});
|
202
204
|
}
|
203
|
-
|
204
|
-
getInsightSetUrl(): URL {
|
205
|
-
const url = this.data.insights?.get(this.data.insightSetKey ?? '')?.url;
|
206
|
-
Platform.TypeScriptUtilities.assertNotNullOrUndefined(url, 'Expected url for insight set');
|
207
|
-
return new URL(url);
|
208
|
-
}
|
209
205
|
}
|
210
206
|
|
211
207
|
/**
|
@@ -6,25 +6,17 @@ import './Table.js';
|
|
6
6
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
8
8
|
import * as Platform from '../../../../core/platform/platform.js';
|
9
|
+
import type {INPInsightModel} from '../../../../models/trace/insights/InteractionToNextPaint.js';
|
9
10
|
import * as Trace from '../../../../models/trace/trace.js';
|
10
11
|
import * as LitHtml from '../../../../ui/lit-html/lit-html.js';
|
11
12
|
import type * as Overlays from '../../overlays/overlays.js';
|
12
13
|
|
13
|
-
import {
|
14
|
+
import {BaseInsightComponent, shouldRenderForCategory} from './Helpers.js';
|
14
15
|
import {Category} from './types.js';
|
15
16
|
|
16
17
|
const {html} = LitHtml;
|
17
18
|
|
18
19
|
const UIStrings = {
|
19
|
-
/**
|
20
|
-
* @description Text to tell the user about the longest user interaction.
|
21
|
-
*/
|
22
|
-
description:
|
23
|
-
'Start investigating with the longest phase. [Delays can be minimized](https://web.dev/articles/optimize-inp#optimize_interactions). To reduce processing duration, [optimize the main-thread costs](https://web.dev/articles/optimize-long-tasks), often JS.',
|
24
|
-
/**
|
25
|
-
* @description Title for the performance insight "INP by phase", which shows a breakdown of INP by phases / sections.
|
26
|
-
*/
|
27
|
-
title: 'INP by phase',
|
28
20
|
/**
|
29
21
|
*@description Label used for the phase/component/stage/section of a larger duration.
|
30
22
|
*/
|
@@ -52,21 +44,17 @@ const UIStrings = {
|
|
52
44
|
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/insights/InteractionToNextPaint.ts', UIStrings);
|
53
45
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
54
46
|
|
55
|
-
export class InteractionToNextPaint extends
|
47
|
+
export class InteractionToNextPaint extends BaseInsightComponent<INPInsightModel> {
|
56
48
|
static override readonly litTagName = LitHtml.literal`devtools-performance-inp`;
|
57
49
|
override insightCategory: Category = Category.INP;
|
58
50
|
override internalName: string = 'inp';
|
59
|
-
override userVisibleTitle: string = i18nString(UIStrings.title);
|
60
|
-
override description: string = i18nString(UIStrings.description);
|
61
51
|
|
62
52
|
override createOverlays(): Overlays.Overlays.TimelineOverlay[] {
|
63
|
-
|
64
|
-
Trace.Insights.Common.getInsight('InteractionToNextPaint', this.data.insights, this.data.insightSetKey);
|
65
|
-
if (!insight) {
|
53
|
+
if (!this.model) {
|
66
54
|
return [];
|
67
55
|
}
|
68
56
|
|
69
|
-
const event =
|
57
|
+
const event = this.model.longestInteractionEvent;
|
70
58
|
if (!event) {
|
71
59
|
return [];
|
72
60
|
}
|
@@ -108,7 +96,11 @@ export class InteractionToNextPaint extends BaseInsight {
|
|
108
96
|
];
|
109
97
|
}
|
110
98
|
|
111
|
-
#render(event: Trace.Types.Events.SyntheticInteractionPair): LitHtml.
|
99
|
+
#render(event: Trace.Types.Events.SyntheticInteractionPair): LitHtml.LitTemplate {
|
100
|
+
if (!this.model) {
|
101
|
+
return LitHtml.nothing;
|
102
|
+
}
|
103
|
+
|
112
104
|
const time = (us: Trace.Types.Timing.MicroSeconds): string =>
|
113
105
|
i18n.TimeUtilities.millisToString(Platform.Timing.microSecondsToMilliSeconds(us));
|
114
106
|
|
@@ -116,8 +108,8 @@ export class InteractionToNextPaint extends BaseInsight {
|
|
116
108
|
return html`
|
117
109
|
<div class="insights">
|
118
110
|
<devtools-performance-sidebar-insight .data=${{
|
119
|
-
title: this.
|
120
|
-
description: this.description,
|
111
|
+
title: this.model.title,
|
112
|
+
description: this.model.description,
|
121
113
|
internalName: this.internalName,
|
122
114
|
expanded: this.isActive(),
|
123
115
|
}}
|
@@ -150,15 +142,11 @@ export class InteractionToNextPaint extends BaseInsight {
|
|
150
142
|
}
|
151
143
|
|
152
144
|
override getRelatedEvents(): Trace.Types.Events.Event[] {
|
153
|
-
|
154
|
-
Trace.Insights.Common.getInsight('InteractionToNextPaint', this.data.insights, this.data.insightSetKey);
|
155
|
-
return insight?.relatedEvents ?? [];
|
145
|
+
return this.model?.relatedEvents ?? [];
|
156
146
|
}
|
157
147
|
|
158
148
|
override render(): void {
|
159
|
-
const
|
160
|
-
Trace.Insights.Common.getInsight('InteractionToNextPaint', this.data.insights, this.data.insightSetKey);
|
161
|
-
const event = insight?.longestInteractionEvent;
|
149
|
+
const event = this.model?.longestInteractionEvent;
|
162
150
|
|
163
151
|
const matchesCategory = shouldRenderForCategory({
|
164
152
|
activeCategory: this.data.activeCategory,
|
@@ -5,28 +5,19 @@
|
|
5
5
|
import '../../../../ui/components/icon_button/icon_button.js';
|
6
6
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
8
|
-
import
|
8
|
+
import type {LCPDiscoveryInsightModel} from '../../../../models/trace/insights/LCPDiscovery.js';
|
9
9
|
import * as Trace from '../../../../models/trace/trace.js';
|
10
10
|
import * as LitHtml from '../../../../ui/lit-html/lit-html.js';
|
11
11
|
import type * as Overlays from '../../overlays/overlays.js';
|
12
12
|
|
13
13
|
import {eventRef} from './EventRef.js';
|
14
|
-
import {
|
14
|
+
import {BaseInsightComponent, shouldRenderForCategory} from './Helpers.js';
|
15
15
|
import type * as SidebarInsight from './SidebarInsight.js';
|
16
16
|
import {Category} from './types.js';
|
17
17
|
|
18
18
|
const {html} = LitHtml;
|
19
19
|
|
20
20
|
const UIStrings = {
|
21
|
-
/**
|
22
|
-
*@description Title of an insight that provides details about the LCP metric, and the network requests necessary to load it. Details how the LCP request was discoverable - in other words, the path necessary to load it (ex: network requests, JavaScript)
|
23
|
-
*/
|
24
|
-
title: 'LCP request discovery',
|
25
|
-
/**
|
26
|
-
*@description Description of an insight that provides details about the LCP metric, and the network requests necessary to load it.
|
27
|
-
*/
|
28
|
-
description:
|
29
|
-
'Optimize LCP by making the LCP image [discoverable](https://web.dev/articles/optimize-lcp#1_eliminate_resource_load_delay) from the HTML immediately, and [avoiding lazy-loading](https://web.dev/articles/lcp-lazy-loading)',
|
30
21
|
/**
|
31
22
|
* @description Text to tell the user how long after the earliest discovery time their LCP element loaded.
|
32
23
|
* @example {401ms} PH1
|
@@ -54,7 +45,6 @@ const UIStrings = {
|
|
54
45
|
*@example {Server response time} PH1
|
55
46
|
*/
|
56
47
|
failedAriaLabel: 'Insight check failed: {PH1}',
|
57
|
-
|
58
48
|
};
|
59
49
|
|
60
50
|
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/insights/LCPDiscovery.ts', UIStrings);
|
@@ -69,20 +59,18 @@ interface LCPImageDiscoveryData {
|
|
69
59
|
estimatedSavings: Trace.Types.Timing.MilliSeconds|null;
|
70
60
|
}
|
71
61
|
|
72
|
-
function getImageData(
|
73
|
-
|
74
|
-
const insight = Trace.Insights.Common.getInsight('LargestContentfulPaint', insights, insightSetKey);
|
75
|
-
if (!insight) {
|
62
|
+
function getImageData(model: LCPDiscoveryInsightModel|null): LCPImageDiscoveryData|null {
|
63
|
+
if (!model) {
|
76
64
|
return null;
|
77
65
|
}
|
78
66
|
|
79
|
-
if (
|
67
|
+
if (model.lcpRequest === undefined) {
|
80
68
|
return null;
|
81
69
|
}
|
82
70
|
|
83
|
-
const shouldIncreasePriorityHint =
|
84
|
-
const shouldPreloadImage =
|
85
|
-
const shouldRemoveLazyLoading =
|
71
|
+
const shouldIncreasePriorityHint = model.shouldIncreasePriorityHint;
|
72
|
+
const shouldPreloadImage = model.shouldPreloadImage;
|
73
|
+
const shouldRemoveLazyLoading = model.shouldRemoveLazyLoading;
|
86
74
|
|
87
75
|
const imageLCP = shouldIncreasePriorityHint !== undefined && shouldPreloadImage !== undefined &&
|
88
76
|
shouldRemoveLazyLoading !== undefined;
|
@@ -96,25 +84,23 @@ function getImageData(
|
|
96
84
|
shouldIncreasePriorityHint,
|
97
85
|
shouldPreloadImage,
|
98
86
|
shouldRemoveLazyLoading,
|
99
|
-
request:
|
87
|
+
request: model.lcpRequest,
|
100
88
|
discoveryDelay: null,
|
101
|
-
estimatedSavings:
|
89
|
+
estimatedSavings: model.metricSavings?.LCP ?? null,
|
102
90
|
};
|
103
91
|
|
104
|
-
if (
|
105
|
-
const discoveryDelay =
|
92
|
+
if (model.earliestDiscoveryTimeTs && model.lcpRequest) {
|
93
|
+
const discoveryDelay = model.lcpRequest.ts - model.earliestDiscoveryTimeTs;
|
106
94
|
data.discoveryDelay = Trace.Types.Timing.MicroSeconds(discoveryDelay);
|
107
95
|
}
|
108
96
|
|
109
97
|
return data;
|
110
98
|
}
|
111
99
|
|
112
|
-
export class LCPDiscovery extends
|
100
|
+
export class LCPDiscovery extends BaseInsightComponent<LCPDiscoveryInsightModel> {
|
113
101
|
static override readonly litTagName = LitHtml.literal`devtools-performance-lcp-discovery`;
|
114
102
|
override insightCategory: Category = Category.LCP;
|
115
103
|
override internalName: string = 'lcp-discovery';
|
116
|
-
override userVisibleTitle: string = i18nString(UIStrings.title);
|
117
|
-
override description: string = i18nString(UIStrings.description);
|
118
104
|
|
119
105
|
#adviceIcon(didFail: boolean, label: string): LitHtml.TemplateResult {
|
120
106
|
const icon = didFail ? 'clear' : 'check-circle';
|
@@ -138,7 +124,7 @@ export class LCPDiscovery extends BaseInsight {
|
|
138
124
|
}
|
139
125
|
|
140
126
|
override createOverlays(): Overlays.Overlays.TimelineOverlay[] {
|
141
|
-
const imageResults = getImageData(this.
|
127
|
+
const imageResults = getImageData(this.model);
|
142
128
|
if (!imageResults || !imageResults.discoveryDelay) {
|
143
129
|
return [];
|
144
130
|
}
|
@@ -192,19 +178,23 @@ export class LCPDiscovery extends BaseInsight {
|
|
192
178
|
/>`: LitHtml.nothing}
|
193
179
|
<span class="element-img-details">
|
194
180
|
${eventRef(imageData.request)}
|
195
|
-
<span class="element-img-details-size">${
|
181
|
+
<span class="element-img-details-size">${i18n.ByteUtilities.bytesToString(imageData.request.args.data.decodedBodyLength ?? 0)}</span>
|
196
182
|
</span>
|
197
183
|
</div>`;
|
198
184
|
// clang-format on
|
199
185
|
}
|
200
186
|
|
201
|
-
#renderDiscovery(imageData: LCPImageDiscoveryData): LitHtml.
|
187
|
+
#renderDiscovery(imageData: LCPImageDiscoveryData): LitHtml.LitTemplate {
|
188
|
+
if (!this.model) {
|
189
|
+
return LitHtml.nothing;
|
190
|
+
}
|
191
|
+
|
202
192
|
// clang-format off
|
203
193
|
return html`
|
204
194
|
<div class="insights">
|
205
195
|
<devtools-performance-sidebar-insight .data=${{
|
206
|
-
title: this.
|
207
|
-
description: this.description,
|
196
|
+
title: this.model.title,
|
197
|
+
description: this.model.description,
|
208
198
|
internalName: this.internalName,
|
209
199
|
expanded: this.isActive(),
|
210
200
|
estimatedSavingsTime: imageData.estimatedSavings,
|
@@ -235,18 +225,16 @@ export class LCPDiscovery extends BaseInsight {
|
|
235
225
|
}
|
236
226
|
|
237
227
|
override getRelatedEvents(): Trace.Types.Events.Event[] {
|
238
|
-
|
239
|
-
Trace.Insights.Common.getInsight('LargestContentfulPaint', this.data.insights, this.data.insightSetKey);
|
240
|
-
if (!insight?.lcpEvent || !insight?.lcpRequest) {
|
228
|
+
if (!this.model?.lcpEvent || !this.model?.lcpRequest) {
|
241
229
|
return [];
|
242
230
|
}
|
243
231
|
|
244
232
|
// TODO: add entire request initiator chain?
|
245
|
-
return [
|
233
|
+
return [this.model.lcpEvent, this.model.lcpRequest];
|
246
234
|
}
|
247
235
|
|
248
236
|
override render(): void {
|
249
|
-
const imageResults = getImageData(this.
|
237
|
+
const imageResults = getImageData(this.model);
|
250
238
|
const matchesCategory = shouldRenderForCategory({
|
251
239
|
activeCategory: this.data.activeCategory,
|
252
240
|
insightCategory: this.insightCategory,
|
@@ -5,11 +5,12 @@
|
|
5
5
|
import './Table.js';
|
6
6
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
8
|
+
import type {LCPPhasesInsightModel} from '../../../../models/trace/insights/LCPPhases.js';
|
8
9
|
import * as Trace from '../../../../models/trace/trace.js';
|
9
10
|
import * as LitHtml from '../../../../ui/lit-html/lit-html.js';
|
10
11
|
import type * as Overlays from '../../overlays/overlays.js';
|
11
12
|
|
12
|
-
import {
|
13
|
+
import {BaseInsightComponent, shouldRenderForCategory} from './Helpers.js';
|
13
14
|
import type * as SidebarInsight from './SidebarInsight.js';
|
14
15
|
import type {TableData} from './Table.js';
|
15
16
|
import {Category} from './types.js';
|
@@ -17,16 +18,6 @@ import {Category} from './types.js';
|
|
17
18
|
const {html} = LitHtml;
|
18
19
|
|
19
20
|
const UIStrings = {
|
20
|
-
/**
|
21
|
-
*@description Title of an insight that provides details about the LCP metric, broken down by phases / parts.
|
22
|
-
*/
|
23
|
-
title: 'LCP by phase',
|
24
|
-
/**
|
25
|
-
* @description Description of a DevTools insight that presents a breakdown for the LCP metric by phases.
|
26
|
-
* This is displayed after a user expands the section to see more. No character length limits.
|
27
|
-
*/
|
28
|
-
description:
|
29
|
-
'Each [phase has specific improvement strategies](https://web.dev/articles/optimize-lcp#lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.',
|
30
21
|
/**
|
31
22
|
*@description Time to first byte title for the Largest Contentful Paint's phases timespan breakdown.
|
32
23
|
*/
|
@@ -61,29 +52,19 @@ interface PhaseData {
|
|
61
52
|
percent: string;
|
62
53
|
}
|
63
54
|
|
64
|
-
export class LCPPhases extends
|
55
|
+
export class LCPPhases extends BaseInsightComponent<LCPPhasesInsightModel> {
|
65
56
|
static override readonly litTagName = LitHtml.literal`devtools-performance-lcp-by-phases`;
|
66
57
|
override insightCategory: Category = Category.LCP;
|
67
58
|
override internalName: string = 'lcp-by-phase';
|
68
|
-
override userVisibleTitle: string = i18nString(UIStrings.title);
|
69
|
-
override description: string = i18nString(UIStrings.description);
|
70
59
|
#overlay: Overlays.Overlays.TimespanBreakdown|null = null;
|
71
60
|
|
72
|
-
#getPhaseData(
|
73
|
-
if (!
|
74
|
-
return [];
|
75
|
-
}
|
76
|
-
const insightsByNavigation = insights.get(navigationId);
|
77
|
-
if (!insightsByNavigation) {
|
78
|
-
return [];
|
79
|
-
}
|
80
|
-
const lcpInsight = insightsByNavigation.data.LargestContentfulPaint;
|
81
|
-
if (lcpInsight instanceof Error) {
|
61
|
+
#getPhaseData(): PhaseData[] {
|
62
|
+
if (!this.model) {
|
82
63
|
return [];
|
83
64
|
}
|
84
65
|
|
85
|
-
const timing =
|
86
|
-
const phases =
|
66
|
+
const timing = this.model.lcpMs;
|
67
|
+
const phases = this.model.phases;
|
87
68
|
|
88
69
|
if (!timing || !phases) {
|
89
70
|
return [];
|
@@ -128,31 +109,20 @@ export class LCPPhases extends BaseInsight {
|
|
128
109
|
override createOverlays(): Overlays.Overlays.TimelineOverlay[] {
|
129
110
|
this.#overlay = null;
|
130
111
|
|
131
|
-
if (!this.
|
112
|
+
if (!this.model) {
|
132
113
|
return [];
|
133
114
|
}
|
134
|
-
const {insightSetKey: navigationId, insights} = this.data;
|
135
115
|
|
136
|
-
const
|
137
|
-
|
138
|
-
return [];
|
139
|
-
}
|
140
|
-
|
141
|
-
const lcpInsight = insightsByNavigation.data.LargestContentfulPaint;
|
142
|
-
if (lcpInsight instanceof Error) {
|
143
|
-
return [];
|
144
|
-
}
|
145
|
-
|
146
|
-
const phases = lcpInsight.phases;
|
147
|
-
const lcpTs = lcpInsight.lcpTs;
|
116
|
+
const phases = this.model.phases;
|
117
|
+
const lcpTs = this.model.lcpTs;
|
148
118
|
if (!phases || !lcpTs) {
|
149
119
|
return [];
|
150
120
|
}
|
151
121
|
const lcpMicroseconds = Trace.Types.Timing.MicroSeconds(Trace.Helpers.Timing.millisecondsToMicroseconds(lcpTs));
|
152
122
|
|
153
123
|
const overlays: Overlays.Overlays.TimelineOverlay[] = [];
|
154
|
-
if (
|
155
|
-
overlays.push({type: 'ENTRY_OUTLINE', entry:
|
124
|
+
if (this.model.lcpRequest) {
|
125
|
+
overlays.push({type: 'ENTRY_OUTLINE', entry: this.model.lcpRequest, outlineReason: 'INFO'});
|
156
126
|
}
|
157
127
|
|
158
128
|
const sections = [];
|
@@ -220,6 +190,10 @@ export class LCPPhases extends BaseInsight {
|
|
220
190
|
}
|
221
191
|
|
222
192
|
#renderLCPPhases(phaseData: PhaseData[]): LitHtml.LitTemplate {
|
193
|
+
if (!this.model) {
|
194
|
+
return LitHtml.nothing;
|
195
|
+
}
|
196
|
+
|
223
197
|
const rows = phaseData.map(({phase, percent}) => {
|
224
198
|
const section = this.#overlay?.sections.find(section => phase === section.label);
|
225
199
|
return {
|
@@ -235,8 +209,8 @@ export class LCPPhases extends BaseInsight {
|
|
235
209
|
return html`
|
236
210
|
<div class="insights">
|
237
211
|
<devtools-performance-sidebar-insight .data=${{
|
238
|
-
title: this.
|
239
|
-
description: this.description,
|
212
|
+
title: this.model.title,
|
213
|
+
description: this.model.description,
|
240
214
|
internalName: this.internalName,
|
241
215
|
expanded: this.isActive(),
|
242
216
|
} as SidebarInsight.InsightDetails}
|
@@ -261,8 +235,7 @@ export class LCPPhases extends BaseInsight {
|
|
261
235
|
}
|
262
236
|
|
263
237
|
override getRelatedEvents(): Trace.Types.Events.Event[] {
|
264
|
-
const insight =
|
265
|
-
Trace.Insights.Common.getInsight('LargestContentfulPaint', this.data.insights, this.data.insightSetKey);
|
238
|
+
const insight = this.model;
|
266
239
|
if (!insight?.lcpEvent) {
|
267
240
|
return [];
|
268
241
|
}
|
@@ -276,7 +249,7 @@ export class LCPPhases extends BaseInsight {
|
|
276
249
|
}
|
277
250
|
|
278
251
|
override render(): void {
|
279
|
-
const phaseData = this.#getPhaseData(
|
252
|
+
const phaseData = this.#getPhaseData();
|
280
253
|
const matchesCategory = shouldRenderForCategory({
|
281
254
|
activeCategory: this.data.activeCategory,
|
282
255
|
insightCategory: this.insightCategory,
|
@@ -6,27 +6,18 @@ import './Table.js';
|
|
6
6
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
8
8
|
import * as Platform from '../../../../core/platform/platform.js';
|
9
|
-
import
|
9
|
+
import type {RenderBlockingInsightModel} from '../../../../models/trace/insights/RenderBlocking.js';
|
10
|
+
import type * as Trace from '../../../../models/trace/trace.js';
|
10
11
|
import * as LitHtml from '../../../../ui/lit-html/lit-html.js';
|
11
12
|
import type * as Overlays from '../../overlays/overlays.js';
|
12
13
|
|
13
14
|
import {eventRef} from './EventRef.js';
|
14
|
-
import {
|
15
|
+
import {BaseInsightComponent, shouldRenderForCategory} from './Helpers.js';
|
15
16
|
import {Category} from './types.js';
|
16
17
|
|
17
18
|
const {html} = LitHtml;
|
18
19
|
|
19
20
|
const UIStrings = {
|
20
|
-
/**
|
21
|
-
* @description Title of an insight that provides the user with the list of network requests that blocked and therefore slowed down the page rendering and becoming visible to the user.
|
22
|
-
*/
|
23
|
-
title: 'Render blocking requests',
|
24
|
-
/**
|
25
|
-
* @description Text to describe that there are requests blocking rendering, which may affect LCP.
|
26
|
-
*/
|
27
|
-
description: 'Requests are blocking the page\'s initial render, which may delay LCP. ' +
|
28
|
-
'[Deferring or inlining](https://web.dev/learn/performance/understanding-the-critical-path#render-blocking_resources/) ' +
|
29
|
-
'can move these network requests out of the critical path.',
|
30
21
|
/**
|
31
22
|
* @description Label to describe a network request (that happens to be render-blocking).
|
32
23
|
*/
|
@@ -40,20 +31,17 @@ const UIStrings = {
|
|
40
31
|
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/insights/RenderBlocking.ts', UIStrings);
|
41
32
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
42
33
|
|
43
|
-
export class
|
34
|
+
export class RenderBlocking extends BaseInsightComponent<RenderBlockingInsightModel> {
|
44
35
|
static override readonly litTagName = LitHtml.literal`devtools-performance-render-blocking-requests`;
|
45
36
|
override insightCategory: Category = Category.LCP;
|
46
37
|
override internalName: string = 'render-blocking-requests';
|
47
|
-
override userVisibleTitle: string = i18nString(UIStrings.title);
|
48
|
-
override description: string = i18nString(UIStrings.description);
|
49
38
|
|
50
39
|
override createOverlays(): Overlays.Overlays.TimelineOverlay[] {
|
51
|
-
|
52
|
-
if (!insight) {
|
40
|
+
if (!this.model) {
|
53
41
|
return [];
|
54
42
|
}
|
55
43
|
|
56
|
-
return
|
44
|
+
return this.model.renderBlockingRequests.map(request => this.#createOverlayForRequest(request));
|
57
45
|
}
|
58
46
|
|
59
47
|
#createOverlayForRequest(request: Trace.Types.Events.SyntheticNetworkRequest): Overlays.Overlays.EntryOutline {
|
@@ -64,7 +52,11 @@ export class RenderBlockingRequests extends BaseInsight {
|
|
64
52
|
};
|
65
53
|
}
|
66
54
|
|
67
|
-
#renderRenderBlocking(insightResult: Trace.Insights.Types.
|
55
|
+
#renderRenderBlocking(insightResult: Trace.Insights.Types.InsightModels['RenderBlocking']): LitHtml.LitTemplate {
|
56
|
+
if (!this.model) {
|
57
|
+
return LitHtml.nothing;
|
58
|
+
}
|
59
|
+
|
68
60
|
const estimatedSavings = insightResult.metricSavings?.FCP;
|
69
61
|
const MAX_REQUESTS = 3;
|
70
62
|
const topRequests = insightResult.renderBlockingRequests.slice(0, MAX_REQUESTS);
|
@@ -73,8 +65,8 @@ export class RenderBlockingRequests extends BaseInsight {
|
|
73
65
|
return html`
|
74
66
|
<div class="insights">
|
75
67
|
<devtools-performance-sidebar-insight .data=${{
|
76
|
-
title: this.
|
77
|
-
description: this.description,
|
68
|
+
title: this.model.title,
|
69
|
+
description: this.model.description,
|
78
70
|
internalName: this.internalName,
|
79
71
|
expanded: this.isActive(),
|
80
72
|
estimatedSavingsTime: estimatedSavings,
|
@@ -101,26 +93,25 @@ export class RenderBlockingRequests extends BaseInsight {
|
|
101
93
|
}
|
102
94
|
|
103
95
|
override getRelatedEvents(): Trace.Types.Events.Event[] {
|
104
|
-
|
105
|
-
return insight?.relatedEvents ?? [];
|
96
|
+
return this.model?.relatedEvents ?? [];
|
106
97
|
}
|
107
98
|
|
108
99
|
override render(): void {
|
109
|
-
const
|
110
|
-
const hasBlockingRequests =
|
100
|
+
const model = this.model;
|
101
|
+
const hasBlockingRequests = model?.renderBlockingRequests && model.renderBlockingRequests.length > 0;
|
111
102
|
const matchesCategory = shouldRenderForCategory({
|
112
103
|
activeCategory: this.data.activeCategory,
|
113
104
|
insightCategory: this.insightCategory,
|
114
105
|
});
|
115
|
-
const output = hasBlockingRequests && matchesCategory ? this.#renderRenderBlocking(
|
106
|
+
const output = hasBlockingRequests && matchesCategory ? this.#renderRenderBlocking(model) : LitHtml.nothing;
|
116
107
|
LitHtml.render(output, this.shadow, {host: this});
|
117
108
|
}
|
118
109
|
}
|
119
110
|
|
120
111
|
declare global {
|
121
112
|
interface HTMLElementTagNameMap {
|
122
|
-
'devtools-performance-render-blocking-requests':
|
113
|
+
'devtools-performance-render-blocking-requests': RenderBlocking;
|
123
114
|
}
|
124
115
|
}
|
125
116
|
|
126
|
-
customElements.define('devtools-performance-render-blocking-requests',
|
117
|
+
customElements.define('devtools-performance-render-blocking-requests', RenderBlocking);
|
@@ -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 * as Platform from '../../../../core/platform/platform.js';
|
7
6
|
import type * as Trace from '../../../../models/trace/trace.js';
|
8
7
|
import * as Buttons from '../../../../ui/components/buttons/buttons.js';
|
9
8
|
import * as ComponentHelpers from '../../../../ui/components/helpers/helpers.js';
|
@@ -186,7 +185,7 @@ export class SidebarInsight extends HTMLElement {
|
|
186
185
|
timeString = i18n.TimeUtilities.millisToString(this.#estimatedSavingsTime);
|
187
186
|
}
|
188
187
|
if (this.#estimatedSavingsBytes !== undefined && this.#estimatedSavingsBytes > 0) {
|
189
|
-
bytesString =
|
188
|
+
bytesString = i18n.ByteUtilities.bytesToString(this.#estimatedSavingsBytes);
|
190
189
|
}
|
191
190
|
|
192
191
|
if (timeString && bytesString) {
|