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
@@ -19,9 +19,6 @@ async function processTrace(events: readonly Trace.Types.Events.Event[]): Promis
|
|
19
19
|
for (const handlerName of handlersInOrder) {
|
20
20
|
const handler = Trace.Handlers.ModelHandlers[handlerName];
|
21
21
|
handler.reset();
|
22
|
-
if ('initialize' in handler) {
|
23
|
-
handler.initialize();
|
24
|
-
}
|
25
22
|
}
|
26
23
|
for (const event of events) {
|
27
24
|
for (const handlerName of handlersInOrder) {
|
@@ -30,9 +27,7 @@ async function processTrace(events: readonly Trace.Types.Events.Event[]): Promis
|
|
30
27
|
}
|
31
28
|
for (const handlerName of handlersInOrder) {
|
32
29
|
const handler = Trace.Handlers.ModelHandlers[handlerName];
|
33
|
-
|
34
|
-
await handler.finalize();
|
35
|
-
}
|
30
|
+
await handler.finalize();
|
36
31
|
}
|
37
32
|
}
|
38
33
|
|
@@ -11,7 +11,7 @@ import {data as layerTreeHandlerData, type LayerTreeData} from './LayerTreeHandl
|
|
11
11
|
import {data as metaHandlerData, type MetaHandlerData} from './MetaHandler.js';
|
12
12
|
import {data as rendererHandlerData, type RendererHandlerData} from './RendererHandler.js';
|
13
13
|
import * as Threads from './Threads.js';
|
14
|
-
import
|
14
|
+
import type {HandlerName} from './types.js';
|
15
15
|
|
16
16
|
/**
|
17
17
|
* IMPORTANT: this handler is slightly different to the rest. This is because
|
@@ -23,32 +23,19 @@ import {type HandlerName, HandlerState} from './types.js';
|
|
23
23
|
*
|
24
24
|
* In time we expect to migrate this code to a more "typical" handler.
|
25
25
|
*/
|
26
|
-
let handlerState = HandlerState.UNINITIALIZED;
|
27
26
|
|
28
27
|
const allEvents: Types.Events.Event[] = [];
|
29
28
|
let model: TimelineFrameModel|null = null;
|
30
29
|
|
31
30
|
export function reset(): void {
|
32
|
-
handlerState = HandlerState.UNINITIALIZED;
|
33
31
|
allEvents.length = 0;
|
34
32
|
}
|
35
|
-
export function initialize(): void {
|
36
|
-
if (handlerState !== HandlerState.UNINITIALIZED) {
|
37
|
-
throw new Error('FramesHandler was not reset before being initialized');
|
38
|
-
}
|
39
|
-
|
40
|
-
handlerState = HandlerState.INITIALIZED;
|
41
|
-
}
|
42
33
|
|
43
34
|
export function handleEvent(event: Types.Events.Event): void {
|
44
35
|
allEvents.push(event);
|
45
36
|
}
|
46
37
|
|
47
38
|
export async function finalize(): Promise<void> {
|
48
|
-
if (handlerState !== HandlerState.INITIALIZED) {
|
49
|
-
throw new Error('FramesHandler is not initialized');
|
50
|
-
}
|
51
|
-
|
52
39
|
// Snapshot events can be emitted out of order, so we need to sort before
|
53
40
|
// building the frames model.
|
54
41
|
Helpers.Trace.sortTraceEventsInPlace(allEvents);
|
@@ -8,8 +8,6 @@ import * as Trace from '../trace.js';
|
|
8
8
|
describe('GPUHandler', function() {
|
9
9
|
beforeEach(() => {
|
10
10
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
11
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
12
|
-
Trace.Handlers.ModelHandlers.GPU.initialize();
|
13
11
|
});
|
14
12
|
|
15
13
|
it('finds all the GPU Tasks for the main GPU Thread', async function() {
|
@@ -6,9 +6,7 @@ import * as Helpers from '../helpers/helpers.js';
|
|
6
6
|
import * as Types from '../types/types.js';
|
7
7
|
|
8
8
|
import {data as metaHandlerData} from './MetaHandler.js';
|
9
|
-
import
|
10
|
-
|
11
|
-
let handlerState = HandlerState.UNINITIALIZED;
|
9
|
+
import type {HandlerName} from './types.js';
|
12
10
|
|
13
11
|
// Each thread contains events. Events indicate the thread and process IDs, which are
|
14
12
|
// used to store the event in the correct process thread entry below.
|
@@ -19,23 +17,9 @@ let mainGPUThreadTasks: Types.Events.GPUTask[] = [];
|
|
19
17
|
export function reset(): void {
|
20
18
|
eventsInProcessThread.clear();
|
21
19
|
mainGPUThreadTasks = [];
|
22
|
-
|
23
|
-
handlerState = HandlerState.UNINITIALIZED;
|
24
|
-
}
|
25
|
-
|
26
|
-
export function initialize(): void {
|
27
|
-
if (handlerState !== HandlerState.UNINITIALIZED) {
|
28
|
-
throw new Error('GPU Handler was not reset before being initialized');
|
29
|
-
}
|
30
|
-
|
31
|
-
handlerState = HandlerState.INITIALIZED;
|
32
20
|
}
|
33
21
|
|
34
22
|
export function handleEvent(event: Types.Events.Event): void {
|
35
|
-
if (handlerState !== HandlerState.INITIALIZED) {
|
36
|
-
throw new Error('GPU Handler is not initialized');
|
37
|
-
}
|
38
|
-
|
39
23
|
if (!Types.Events.isGPUTask(event)) {
|
40
24
|
return;
|
41
25
|
}
|
@@ -44,16 +28,11 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
44
28
|
}
|
45
29
|
|
46
30
|
export async function finalize(): Promise<void> {
|
47
|
-
if (handlerState !== HandlerState.INITIALIZED) {
|
48
|
-
throw new Error('GPU Handler is not initialized');
|
49
|
-
}
|
50
|
-
|
51
31
|
const {gpuProcessId, gpuThreadId} = metaHandlerData();
|
52
32
|
const gpuThreadsForProcess = eventsInProcessThread.get(gpuProcessId);
|
53
33
|
if (gpuThreadsForProcess && gpuThreadId) {
|
54
34
|
mainGPUThreadTasks = gpuThreadsForProcess.get(gpuThreadId) || [];
|
55
35
|
}
|
56
|
-
handlerState = HandlerState.FINALIZED;
|
57
36
|
}
|
58
37
|
|
59
38
|
export interface GPUHandlerReturnData {
|
@@ -61,9 +40,6 @@ export interface GPUHandlerReturnData {
|
|
61
40
|
}
|
62
41
|
|
63
42
|
export function data(): GPUHandlerReturnData {
|
64
|
-
if (handlerState !== HandlerState.FINALIZED) {
|
65
|
-
throw new Error('GPU Handler is not finalized');
|
66
|
-
}
|
67
43
|
return {
|
68
44
|
mainGPUThreadTasks,
|
69
45
|
};
|
@@ -112,6 +112,9 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
112
112
|
}
|
113
113
|
}
|
114
114
|
|
115
|
+
export async function finalize(): Promise<void> {
|
116
|
+
}
|
117
|
+
|
115
118
|
export interface ImagePaintData {
|
116
119
|
paintImageByDrawLazyPixelRef: Map<number, Types.Events.PaintImage>;
|
117
120
|
paintImageForEvent: Map<Types.Events.Event, Types.Events.PaintImage>;
|
@@ -8,7 +8,6 @@ import * as Trace from '../trace.js';
|
|
8
8
|
describe('InitiatorsHandler', () => {
|
9
9
|
beforeEach(() => {
|
10
10
|
Trace.Handlers.ModelHandlers.Initiators.reset();
|
11
|
-
Trace.Handlers.ModelHandlers.Initiators.initialize();
|
12
11
|
});
|
13
12
|
|
14
13
|
it('for an UpdateLayoutTree event it sets the initiator to the previous ScheduledStyleRecalculation event',
|
@@ -5,10 +5,6 @@
|
|
5
5
|
import * as Helpers from '../helpers/helpers.js';
|
6
6
|
import * as Types from '../types/types.js';
|
7
7
|
|
8
|
-
import {HandlerState} from './types.js';
|
9
|
-
|
10
|
-
let handlerState = HandlerState.UNINITIALIZED;
|
11
|
-
|
12
8
|
const lastScheduleStyleRecalcByFrame = new Map<string, Types.Events.ScheduleStyleRecalculation>();
|
13
9
|
|
14
10
|
// This tracks the last event that is considered to have invalidated the layout
|
@@ -54,16 +50,6 @@ export function reset(): void {
|
|
54
50
|
schedulePostTaskCallbackEventsById.clear();
|
55
51
|
schedulePostMessageEventByTraceId.clear();
|
56
52
|
postMessageHandlerEvents.length = 0;
|
57
|
-
|
58
|
-
handlerState = HandlerState.UNINITIALIZED;
|
59
|
-
}
|
60
|
-
|
61
|
-
export function initialize(): void {
|
62
|
-
if (handlerState !== HandlerState.UNINITIALIZED) {
|
63
|
-
throw new Error('InitiatorsHandler was not reset before being initialized');
|
64
|
-
}
|
65
|
-
|
66
|
-
handlerState = HandlerState.INITIALIZED;
|
67
53
|
}
|
68
54
|
|
69
55
|
function storeInitiator(data: {initiator: Types.Events.Event, event: Types.Events.Event}): void {
|
@@ -202,16 +188,10 @@ function finalizeInitiatorRelationship(): void {
|
|
202
188
|
}
|
203
189
|
|
204
190
|
export async function finalize(): Promise<void> {
|
205
|
-
if (handlerState !== HandlerState.INITIALIZED) {
|
206
|
-
throw new Error('InitiatorsHandler is not initialized');
|
207
|
-
}
|
208
|
-
|
209
191
|
// During event processing, we may encounter initiators before the handler events themselves
|
210
192
|
// (e.g dispatch events on worker and handler events on the main thread)
|
211
193
|
// we don't want to miss out on events whose initiators haven't been processed yet
|
212
194
|
finalizeInitiatorRelationship();
|
213
|
-
|
214
|
-
handlerState = HandlerState.FINALIZED;
|
215
195
|
}
|
216
196
|
|
217
197
|
export interface InitiatorsData {
|
@@ -23,7 +23,6 @@ function invalidationDataForTestAssertion(invalidation: Trace.Types.Events.Inval
|
|
23
23
|
describe('InvalidationsHandler', () => {
|
24
24
|
beforeEach(() => {
|
25
25
|
Trace.Handlers.ModelHandlers.Invalidations.reset();
|
26
|
-
Trace.Handlers.ModelHandlers.Invalidations.initialize();
|
27
26
|
});
|
28
27
|
|
29
28
|
it('finds the right invalidators for a layout where attributes have been changed', async function() {
|
@@ -4,10 +4,6 @@
|
|
4
4
|
|
5
5
|
import * as Types from '../types/types.js';
|
6
6
|
|
7
|
-
import {HandlerState} from './types.js';
|
8
|
-
|
9
|
-
let handlerState = HandlerState.UNINITIALIZED;
|
10
|
-
|
11
7
|
const invalidationsForEvent = new Map<Types.Events.Event, Types.Events.InvalidationTrackingEvent[]>();
|
12
8
|
const invalidationCountForEvent = new Map<Types.Events.Event, number>();
|
13
9
|
|
@@ -19,7 +15,6 @@ let hasPainted = false;
|
|
19
15
|
const allInvalidationTrackingEvents: Array<Types.Events.InvalidationTrackingEvent> = [];
|
20
16
|
|
21
17
|
export function reset(): void {
|
22
|
-
handlerState = HandlerState.UNINITIALIZED;
|
23
18
|
invalidationsForEvent.clear();
|
24
19
|
lastRecalcStyleEvent = null;
|
25
20
|
allInvalidationTrackingEvents.length = 0;
|
@@ -32,14 +27,6 @@ export function handleUserConfig(userConfig: Types.Configuration.Configuration):
|
|
32
27
|
maxInvalidationsPerEvent = userConfig.maxInvalidationEventsPerEvent;
|
33
28
|
}
|
34
29
|
|
35
|
-
export function initialize(): void {
|
36
|
-
if (handlerState !== HandlerState.UNINITIALIZED) {
|
37
|
-
throw new Error('InvalidationsHandler was not reset before being initialized');
|
38
|
-
}
|
39
|
-
|
40
|
-
handlerState = HandlerState.INITIALIZED;
|
41
|
-
}
|
42
|
-
|
43
30
|
function addInvalidationToEvent(event: Types.Events.Event, invalidation: Types.Events.InvalidationTrackingEvent): void {
|
44
31
|
const existingInvalidations = invalidationsForEvent.get(event) || [];
|
45
32
|
existingInvalidations.push(invalidation);
|
@@ -132,11 +119,6 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
132
119
|
}
|
133
120
|
|
134
121
|
export async function finalize(): Promise<void> {
|
135
|
-
if (handlerState !== HandlerState.INITIALIZED) {
|
136
|
-
throw new Error('InvalidationsHandler is not initialized');
|
137
|
-
}
|
138
|
-
|
139
|
-
handlerState = HandlerState.FINALIZED;
|
140
122
|
}
|
141
123
|
|
142
124
|
interface InvalidationsData {
|
@@ -18,8 +18,8 @@ describe('LargestImagePaintHandler', function() {
|
|
18
18
|
}
|
19
19
|
|
20
20
|
const data = Trace.Handlers.ModelHandlers.LargestImagePaint.data();
|
21
|
-
assert.strictEqual(data.size, 1);
|
22
|
-
const imageForLCP = data.get(10 as Protocol.DOM.BackendNodeId);
|
21
|
+
assert.strictEqual(data.imageByDOMNodeId.size, 1);
|
22
|
+
const imageForLCP = data.imageByDOMNodeId.get(10 as Protocol.DOM.BackendNodeId);
|
23
23
|
assert.exists(imageForLCP);
|
24
24
|
assert.strictEqual(imageForLCP?.args.data?.DOMNodeId, 10 as Protocol.DOM.BackendNodeId);
|
25
25
|
assert.strictEqual(imageForLCP?.args.data?.imageUrl, 'https://via.placeholder.com/2000.jpg');
|
@@ -2,8 +2,13 @@
|
|
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 * as Types from '../types/types.js';
|
6
5
|
import type * as Protocol from '../../../generated/protocol.js';
|
6
|
+
import * as Types from '../types/types.js';
|
7
|
+
|
8
|
+
import {data as metaData} from './MetaHandler.js';
|
9
|
+
import {data as networkRequestsData} from './NetworkRequestsHandler.js';
|
10
|
+
import type {HandlerName} from './types.js';
|
11
|
+
|
7
12
|
/**
|
8
13
|
* If the LCP resource was an image, and that image was fetched over the
|
9
14
|
* network, we want to be able to find the network request in order to construct
|
@@ -22,12 +27,23 @@ import type * as Protocol from '../../../generated/protocol.js';
|
|
22
27
|
* to the image.
|
23
28
|
**/
|
24
29
|
const imageByDOMNodeId = new Map<Protocol.DOM.BackendNodeId, Types.Events.LargestImagePaintCandidate>();
|
30
|
+
const lcpRequestByNavigation = new Map<Types.Events.NavigationStart|null, Types.Events.SyntheticNetworkRequest>();
|
31
|
+
const lcpPaintEventByNavigation = new Map<Types.Events.NavigationStart|null, Types.Events.LargestImagePaintCandidate>();
|
32
|
+
let currentNavigation: Types.Events.NavigationStart|null;
|
25
33
|
|
26
34
|
export function reset(): void {
|
27
35
|
imageByDOMNodeId.clear();
|
36
|
+
lcpRequestByNavigation.clear();
|
37
|
+
lcpPaintEventByNavigation.clear();
|
38
|
+
currentNavigation = null;
|
28
39
|
}
|
29
40
|
|
30
41
|
export function handleEvent(event: Types.Events.Event): void {
|
42
|
+
if (Types.Events.isNavigationStart(event)) {
|
43
|
+
currentNavigation = event;
|
44
|
+
return;
|
45
|
+
}
|
46
|
+
|
31
47
|
if (!Types.Events.isLargestImagePaintCandidate(event)) {
|
32
48
|
return;
|
33
49
|
}
|
@@ -37,8 +53,52 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
37
53
|
}
|
38
54
|
|
39
55
|
imageByDOMNodeId.set(event.args.data.DOMNodeId, event);
|
56
|
+
lcpPaintEventByNavigation.set(currentNavigation, event);
|
57
|
+
}
|
58
|
+
|
59
|
+
export async function finalize(): Promise<void> {
|
60
|
+
const requests = networkRequestsData().byTime;
|
61
|
+
const traceBounds = metaData().traceBounds;
|
62
|
+
|
63
|
+
for (const [navigation, event] of lcpPaintEventByNavigation) {
|
64
|
+
const lcpUrl = event.args.data?.imageUrl;
|
65
|
+
if (!lcpUrl) {
|
66
|
+
continue;
|
67
|
+
}
|
68
|
+
|
69
|
+
const startTime = navigation?.ts ?? traceBounds.min;
|
70
|
+
const endTime = event.ts;
|
71
|
+
|
72
|
+
let lcpRequest;
|
73
|
+
for (const request of requests) {
|
74
|
+
if (request.ts < startTime) {
|
75
|
+
continue;
|
76
|
+
}
|
77
|
+
if (request.ts >= endTime) {
|
78
|
+
break;
|
79
|
+
}
|
80
|
+
|
81
|
+
if (request.args.data.url === lcpUrl || request.args.data.redirects.some(r => r.url === lcpUrl)) {
|
82
|
+
lcpRequest = request;
|
83
|
+
break;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
if (lcpRequest) {
|
88
|
+
lcpRequestByNavigation.set(navigation, lcpRequest);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
export interface LargestImagePaintData {
|
94
|
+
imageByDOMNodeId: Map<Protocol.DOM.BackendNodeId, Types.Events.LargestImagePaintCandidate>;
|
95
|
+
lcpRequestByNavigation: Map<Types.Events.NavigationStart|null, Types.Events.SyntheticNetworkRequest>;
|
96
|
+
}
|
97
|
+
|
98
|
+
export function data(): LargestImagePaintData {
|
99
|
+
return {imageByDOMNodeId, lcpRequestByNavigation};
|
40
100
|
}
|
41
101
|
|
42
|
-
export function
|
43
|
-
return
|
102
|
+
export function deps(): HandlerName[] {
|
103
|
+
return ['Meta', 'NetworkRequests'];
|
44
104
|
}
|
@@ -27,6 +27,9 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
27
27
|
textPaintByDOMNodeId.set(event.args.data.DOMNodeId, event);
|
28
28
|
}
|
29
29
|
|
30
|
+
export async function finalize(): Promise<void> {
|
31
|
+
}
|
32
|
+
|
30
33
|
export function data(): Map<Protocol.DOM.BackendNodeId, Types.Events.LargestTextPaintCandidate> {
|
31
34
|
return textPaintByDOMNodeId;
|
32
35
|
}
|
@@ -15,8 +15,6 @@ describe('LayerTreeHandler', function() {
|
|
15
15
|
beforeEach(() => {
|
16
16
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
17
17
|
Trace.Handlers.ModelHandlers.LayerTree.reset();
|
18
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
19
|
-
Trace.Handlers.ModelHandlers.LayerTree.initialize();
|
20
18
|
});
|
21
19
|
|
22
20
|
it('creates a relationship between paint events and the snapshot event', async function() {
|
@@ -6,9 +6,7 @@ import * as Helpers from '../helpers/helpers.js';
|
|
6
6
|
import * as Types from '../types/types.js';
|
7
7
|
|
8
8
|
import {data as metaHandlerData} from './MetaHandler.js';
|
9
|
-
import
|
10
|
-
|
11
|
-
let handlerState = HandlerState.UNINITIALIZED;
|
9
|
+
import type {HandlerName} from './types.js';
|
12
10
|
|
13
11
|
const paintEvents: Types.Events.Paint[] = [];
|
14
12
|
const snapshotEvents: Types.Events.DisplayItemListSnapshot[] = [];
|
@@ -24,7 +22,6 @@ type RelevantLayerTreeEvent =
|
|
24
22
|
|
25
23
|
const relevantEvents: RelevantLayerTreeEvent[] = [];
|
26
24
|
export function reset(): void {
|
27
|
-
handlerState = HandlerState.UNINITIALIZED;
|
28
25
|
paintEvents.length = 0;
|
29
26
|
snapshotEvents.length = 0;
|
30
27
|
paintToSnapshotMap.clear();
|
@@ -35,14 +32,6 @@ export function reset(): void {
|
|
35
32
|
relevantEvents.length = 0;
|
36
33
|
}
|
37
34
|
|
38
|
-
export function initialize(): void {
|
39
|
-
if (handlerState !== HandlerState.UNINITIALIZED) {
|
40
|
-
throw new Error('LayerTree Handler was not reset before being initialized');
|
41
|
-
}
|
42
|
-
|
43
|
-
handlerState = HandlerState.INITIALIZED;
|
44
|
-
}
|
45
|
-
|
46
35
|
export function handleEvent(event: Types.Events.Event): void {
|
47
36
|
// We gather up the events here but do all the processing in finalize(). This
|
48
37
|
// is because we need to have all the events before we process them, and we
|
@@ -55,10 +44,6 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
55
44
|
}
|
56
45
|
|
57
46
|
export async function finalize(): Promise<void> {
|
58
|
-
if (handlerState !== HandlerState.INITIALIZED) {
|
59
|
-
throw new Error('LayerTree Handler is not initialized');
|
60
|
-
}
|
61
|
-
|
62
47
|
const metaData = metaHandlerData();
|
63
48
|
Helpers.Trace.sortTraceEventsInPlace(relevantEvents);
|
64
49
|
|
@@ -117,8 +102,6 @@ export async function finalize(): Promise<void> {
|
|
117
102
|
paintToSnapshotMap.set(paintEvent, event);
|
118
103
|
}
|
119
104
|
}
|
120
|
-
|
121
|
-
handlerState = HandlerState.FINALIZED;
|
122
105
|
}
|
123
106
|
|
124
107
|
export interface LayerTreeData {
|
@@ -7,10 +7,8 @@ import * as Trace from '../trace.js';
|
|
7
7
|
|
8
8
|
async function processTrace(context: Mocha.Suite|Mocha.Context|null, url: string): Promise<void> {
|
9
9
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
10
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
11
10
|
|
12
11
|
Trace.Handlers.ModelHandlers.LayoutShifts.reset();
|
13
|
-
Trace.Handlers.ModelHandlers.LayoutShifts.initialize();
|
14
12
|
|
15
13
|
try {
|
16
14
|
const events = await TraceLoader.rawEvents(context, url);
|
@@ -33,7 +31,6 @@ describe('LayoutShiftsHandler', function() {
|
|
33
31
|
// run the meta handler here, too, so that later on we can get the IDs of
|
34
32
|
// the main renderer process and thread.
|
35
33
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
36
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
37
34
|
|
38
35
|
Trace.Handlers.ModelHandlers.LayoutShifts.reset();
|
39
36
|
});
|
@@ -10,7 +10,7 @@ import * as Types from '../types/types.js';
|
|
10
10
|
import {data as metaHandlerData} from './MetaHandler.js';
|
11
11
|
import {ScoreClassification} from './PageLoadMetricsHandler.js';
|
12
12
|
import {data as screenshotsHandlerData} from './ScreenshotsHandler.js';
|
13
|
-
import
|
13
|
+
import type {HandlerName} from './types.js';
|
14
14
|
|
15
15
|
// We start with a score of zero and step through all Layout Shift records from
|
16
16
|
// all renderers. Each record not only tells us which renderer it is, but also
|
@@ -114,17 +114,7 @@ type ScoreRecord = {
|
|
114
114
|
// Includes drops to 0 when session windows end.
|
115
115
|
const scoreRecords: ScoreRecord[] = [];
|
116
116
|
|
117
|
-
let handlerState = HandlerState.UNINITIALIZED;
|
118
|
-
|
119
|
-
export function initialize(): void {
|
120
|
-
if (handlerState !== HandlerState.UNINITIALIZED) {
|
121
|
-
throw new Error('LayoutShifts Handler was not reset');
|
122
|
-
}
|
123
|
-
handlerState = HandlerState.INITIALIZED;
|
124
|
-
}
|
125
|
-
|
126
117
|
export function reset(): void {
|
127
|
-
handlerState = HandlerState.UNINITIALIZED;
|
128
118
|
layoutShiftEvents.length = 0;
|
129
119
|
layoutInvalidationEvents.length = 0;
|
130
120
|
scheduleStyleInvalidationEvents.length = 0;
|
@@ -144,10 +134,6 @@ export function reset(): void {
|
|
144
134
|
}
|
145
135
|
|
146
136
|
export function handleEvent(event: Types.Events.Event): void {
|
147
|
-
if (handlerState !== HandlerState.INITIALIZED) {
|
148
|
-
throw new Error('Handler is not initialized');
|
149
|
-
}
|
150
|
-
|
151
137
|
if (Types.Events.isLayoutShift(event) && !event.args.data?.had_recent_input) {
|
152
138
|
layoutShiftEvents.push(event);
|
153
139
|
return;
|
@@ -273,7 +259,6 @@ export async function finalize(): Promise<void> {
|
|
273
259
|
await buildLayoutShiftsClusters();
|
274
260
|
buildScoreRecords();
|
275
261
|
collectNodes();
|
276
|
-
handlerState = HandlerState.FINALIZED;
|
277
262
|
}
|
278
263
|
|
279
264
|
async function buildLayoutShiftsClusters(): Promise<void> {
|
@@ -509,10 +494,6 @@ async function buildLayoutShiftsClusters(): Promise<void> {
|
|
509
494
|
}
|
510
495
|
|
511
496
|
export function data(): LayoutShifts {
|
512
|
-
if (handlerState !== HandlerState.FINALIZED) {
|
513
|
-
throw new Error('Layout Shifts Handler is not finalized');
|
514
|
-
}
|
515
|
-
|
516
497
|
return {
|
517
498
|
clusters,
|
518
499
|
sessionMaxScore,
|
@@ -13,7 +13,6 @@ describe('MemoryHandler', function() {
|
|
13
13
|
|
14
14
|
it('gathers update counters', async function() {
|
15
15
|
const events = await TraceLoader.rawEvents(this, 'web-dev.json.gz');
|
16
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
17
16
|
for (const event of events) {
|
18
17
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
19
18
|
Trace.Handlers.ModelHandlers.Memory.handleEvent(event);
|
@@ -50,7 +50,7 @@ describe('MetaHandler', function() {
|
|
50
50
|
tid: Trace.Types.Events.ThreadID(775),
|
51
51
|
ts: Trace.Types.Timing.MicroSeconds(800),
|
52
52
|
name: 'navigationStart',
|
53
|
-
} as Trace.Types.Events.
|
53
|
+
} as Trace.Types.Events.NavigationStartUnreliable,
|
54
54
|
{
|
55
55
|
...defaultTraceEvent,
|
56
56
|
args: {
|
@@ -69,27 +69,6 @@ describe('MetaHandler', function() {
|
|
69
69
|
];
|
70
70
|
|
71
71
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
72
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
73
|
-
});
|
74
|
-
|
75
|
-
describe('error handling', function() {
|
76
|
-
it('throws if data is called before finalize', function() {
|
77
|
-
for (const event of baseEvents) {
|
78
|
-
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
79
|
-
}
|
80
|
-
|
81
|
-
assert.throws(() => {
|
82
|
-
Trace.Handlers.ModelHandlers.Meta.data();
|
83
|
-
}, 'Handler is not finalized');
|
84
|
-
});
|
85
|
-
|
86
|
-
it('throws if initialize is called without a reset', function() {
|
87
|
-
// Due to the beforeEach the handler is already initialized, so calling
|
88
|
-
// it a second time should throw an error.
|
89
|
-
assert.throws(() => {
|
90
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
91
|
-
}, 'Handler was not reset');
|
92
|
-
});
|
93
72
|
});
|
94
73
|
|
95
74
|
describe('browser process ID', function() {
|
@@ -154,7 +133,6 @@ describe('MetaHandler', function() {
|
|
154
133
|
it('provides a list of main frame only navigations', async function() {
|
155
134
|
const events = await TraceLoader.rawEvents(this, 'multiple-navigations-with-iframes.json.gz');
|
156
135
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
157
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
158
136
|
for (const event of events) {
|
159
137
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
160
138
|
}
|
@@ -183,7 +161,6 @@ describe('MetaHandler', function() {
|
|
183
161
|
it('finds the main frame ID for a trace that started with a page reload', async function() {
|
184
162
|
const events = await TraceLoader.rawEvents(this, 'reload-and-trace-page.json.gz');
|
185
163
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
186
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
187
164
|
for (const event of events) {
|
188
165
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
189
166
|
}
|
@@ -195,7 +172,6 @@ describe('MetaHandler', function() {
|
|
195
172
|
it('tracks the frames for found processes', async function() {
|
196
173
|
const events = await TraceLoader.rawEvents(this, 'reload-and-trace-page.json.gz');
|
197
174
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
198
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
199
175
|
for (const event of events) {
|
200
176
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
201
177
|
}
|
@@ -215,7 +191,6 @@ describe('MetaHandler', function() {
|
|
215
191
|
it('finds the GPU process and GPU Thread', async function() {
|
216
192
|
const events = await TraceLoader.rawEvents(this, 'threejs-gpu.json.gz');
|
217
193
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
218
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
219
194
|
for (const event of events) {
|
220
195
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
221
196
|
}
|
@@ -250,7 +225,6 @@ describe('MetaHandler', function() {
|
|
250
225
|
}
|
251
226
|
|
252
227
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
253
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
254
228
|
for (const event of traceEvents) {
|
255
229
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
256
230
|
}
|
@@ -288,7 +262,6 @@ describe('MetaHandler', function() {
|
|
288
262
|
}
|
289
263
|
|
290
264
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
291
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
292
265
|
for (const event of traceEvents) {
|
293
266
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
294
267
|
}
|
@@ -345,7 +318,6 @@ describe('MetaHandler', function() {
|
|
345
318
|
}
|
346
319
|
|
347
320
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
348
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
349
321
|
for (const event of traceEvents) {
|
350
322
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
351
323
|
}
|
@@ -403,7 +375,6 @@ describe('MetaHandler', function() {
|
|
403
375
|
}
|
404
376
|
|
405
377
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
406
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
407
378
|
for (const event of traceEvents) {
|
408
379
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
409
380
|
}
|
@@ -433,7 +404,6 @@ describe('MetaHandler', function() {
|
|
433
404
|
});
|
434
405
|
|
435
406
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
436
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
437
407
|
for (const event of traceEvents) {
|
438
408
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
439
409
|
}
|
@@ -455,7 +425,6 @@ describe('MetaHandler', function() {
|
|
455
425
|
}
|
456
426
|
|
457
427
|
Trace.Handlers.ModelHandlers.Meta.reset();
|
458
|
-
Trace.Handlers.ModelHandlers.Meta.initialize();
|
459
428
|
for (const event of traceEvents) {
|
460
429
|
Trace.Handlers.ModelHandlers.Meta.handleEvent(event);
|
461
430
|
}
|