chrome-devtools-frontend 1.0.1522145 → 1.0.1524741
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/AUTHORS +1 -0
- package/docs/README.md +1 -0
- package/docs/policy/README.md +1 -0
- package/docs/policy/console-policy.md +144 -0
- package/docs/policy/images/console-policy1.png +0 -0
- package/docs/policy/images/console-policy2.png +0 -0
- package/docs/policy/images/console-policy3.png +0 -0
- package/docs/ui_engineering.md +98 -0
- package/front_end/Tests.js +1 -1
- package/front_end/core/common/Color.ts +13 -9
- package/front_end/core/common/ColorConverter.ts +9 -7
- package/front_end/core/common/Gzip.ts +1 -1
- package/front_end/core/common/MapWithDefault.ts +5 -3
- package/front_end/core/common/ResourceType.ts +0 -12
- package/front_end/core/common/ReturnToPanel.ts +6 -4
- package/front_end/core/common/Trie.ts +4 -2
- package/front_end/core/host/AidaClient.ts +3 -3
- package/front_end/core/host/GdpClient.ts +7 -5
- package/front_end/core/host/InspectorFrontendHostAPI.ts +7 -5
- package/front_end/core/host/Platform.ts +5 -3
- package/front_end/core/host/UserMetrics.ts +6 -4
- package/front_end/core/platform/ArrayUtilities.ts +1 -1
- package/front_end/core/platform/StringUtilities.ts +34 -31
- package/front_end/core/root/Runtime.ts +1 -1
- package/front_end/core/sdk/CSSMetadata.ts +6 -4
- package/front_end/core/sdk/CSSPropertyParser.ts +17 -13
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +19 -13
- package/front_end/core/sdk/ChildTargetManager.ts +35 -0
- package/front_end/core/sdk/DOMModel.ts +1 -1
- package/front_end/core/sdk/EnhancedTracesParser.ts +13 -6
- package/front_end/core/sdk/EventBreakpointsModel.ts +4 -2
- package/front_end/core/sdk/HttpReasonPhraseStrings.ts +4 -2
- package/front_end/core/sdk/NetworkManager.ts +8 -48
- package/front_end/core/sdk/NetworkRequest.ts +0 -28
- package/front_end/core/sdk/PageResourceLoader.ts +1 -1
- package/front_end/core/sdk/PreloadingModel.ts +22 -18
- package/front_end/core/sdk/RehydratingConnection.ts +1 -1
- package/front_end/core/sdk/RehydratingObject.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +2 -0
- package/front_end/core/sdk/ScreenCaptureModel.ts +24 -20
- package/front_end/core/sdk/Target.ts +7 -1
- package/front_end/core/sdk/TraceObject.ts +2 -2
- package/front_end/entrypoints/formatter_worker/Substitute.ts +6 -4
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -16
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -1
- package/front_end/entrypoints/main/MainImpl.ts +6 -4
- package/front_end/generated/Deprecation.ts +4 -4
- package/front_end/generated/InspectorBackendCommands.js +2 -2
- package/front_end/generated/protocol-mapping.d.ts +3 -2
- package/front_end/generated/protocol-proxy-api.d.ts +3 -1
- package/front_end/generated/protocol.ts +7 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +600 -0
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +83 -222
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +23 -0
- package/front_end/models/ai_assistance/performance/AIContext.ts +19 -4
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +4 -2
- package/front_end/models/autofill_manager/AutofillManager.ts +4 -2
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +1 -1
- package/front_end/models/crux-manager/CrUXManager.ts +1 -1
- package/front_end/models/extensions/HostUrlPattern.ts +13 -5
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +1 -1
- package/front_end/models/issues_manager/CookieIssue.ts +2 -2
- package/front_end/models/issues_manager/MarkdownIssueDescription.ts +1 -1
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +20 -0
- package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
- package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +9 -1
- package/front_end/models/network_time_calculator/Calculator.ts +4 -2
- package/front_end/models/network_time_calculator/RequestTimeRanges.ts +6 -4
- package/front_end/models/source_map_scopes/NamesResolver.ts +7 -5
- package/front_end/models/text_utils/ContentProvider.ts +6 -4
- package/front_end/models/trace/LanternComputationData.ts +1 -0
- package/front_end/models/trace/extras/TraceTree.ts +1 -1
- package/front_end/models/trace/handlers/FramesHandler.ts +7 -5
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +13 -7
- package/front_end/models/trace/handlers/MetaHandler.ts +16 -14
- package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +30 -8
- package/front_end/models/trace/handlers/helpers.ts +1 -1
- package/front_end/models/trace/handlers/types.ts +23 -19
- package/front_end/models/trace/helpers/Timing.ts +4 -2
- package/front_end/models/trace/helpers/Trace.ts +8 -4
- package/front_end/models/trace/insights/DocumentLatency.ts +10 -11
- package/front_end/models/trace/insights/INPBreakdown.ts +13 -2
- package/front_end/models/trace/insights/LCPBreakdown.ts +14 -2
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +2 -2
- package/front_end/models/trace/types/File.ts +12 -8
- package/front_end/models/trace/types/Timing.ts +1 -1
- package/front_end/models/trace/types/TraceEvents.ts +43 -28
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +1 -1
- package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +12 -10
- package/front_end/panels/application/KeyValueStorageItemsView.ts +31 -33
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +6 -11
- package/front_end/panels/application/components/OriginTrialTreeView.ts +7 -5
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -0
- package/front_end/panels/application/components/ReportsGrid.ts +4 -10
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +5 -13
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +3 -7
- package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -2
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +3 -10
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -2
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +7 -5
- package/front_end/panels/changes/ChangesSidebar.ts +97 -95
- package/front_end/panels/changes/changesSidebar.css +3 -0
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +22 -35
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +12 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +9 -5
- package/front_end/panels/elements/ElementsTreeOutline.ts +11 -8
- package/front_end/panels/elements/PropertyRenderer.ts +19 -15
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -4
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +4 -2
- package/front_end/panels/elements/components/AdornerManager.ts +5 -3
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +6 -4
- package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +2 -44
- package/front_end/panels/network/NetworkLogView.ts +6 -4
- package/front_end/panels/network/RequestPreviewView.ts +0 -7
- package/front_end/panels/network/components/RequestHeadersView.ts +0 -6
- package/front_end/panels/network/components/components.ts +0 -2
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +4 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +40 -48
- package/front_end/panels/search/SearchResultsPane.ts +2 -3
- package/front_end/panels/security/IPProtectionView.ts +1 -1
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +4 -0
- package/front_end/panels/settings/emulation/utils/StructuredHeaders.ts +45 -37
- package/front_end/panels/sources/BreakpointsViewUtils.ts +11 -9
- package/front_end/panels/sources/DebuggerPlugin.ts +8 -4
- package/front_end/panels/sources/SourcesPanel.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +4 -2
- package/front_end/panels/timeline/CountersGraph.ts +12 -5
- package/front_end/panels/timeline/EasterEgg.d.ts +5 -3
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +8 -6
- package/front_end/panels/timeline/ModificationsManager.ts +5 -3
- package/front_end/panels/timeline/ThreadAppender.ts +7 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -8
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +17 -0
- package/front_end/panels/timeline/TimelinePanel.ts +15 -8
- package/front_end/panels/timeline/TimelineSelection.ts +4 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +17 -6
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +6 -4
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +21 -9
- package/front_end/panels/timeline/components/Utils.ts +1 -1
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +5 -3
- package/front_end/panels/timeline/timelineDetailsView.css +5 -0
- package/front_end/panels/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/utils/utils.ts +1 -7
- package/front_end/services/trace_bounds/TraceBounds.ts +4 -2
- package/front_end/services/tracing/PerformanceTracing.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
- package/front_end/third_party/codemirror.next/package.json +3 -2
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js +8 -10
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +28 -30
- 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 +27 -29
- 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/Frame.d.ts +34 -38
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +34 -38
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js +12 -14
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +92 -108
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +33 -39
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +5 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.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/HTTPRequest.d.ts +4 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +14 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +12 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js +24 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts +13 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts +6 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js +6 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js.map +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/node/BrowserLauncher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +6 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +5 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +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/es5-iife/puppeteer-core-browser.d.ts +188 -224
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +140 -166
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js +8 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Dialog.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +28 -30
- 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 +27 -29
- 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/Frame.d.ts +34 -38
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +34 -38
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js +12 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +92 -108
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +33 -39
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +5 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.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/HTTPRequest.d.ts +4 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +15 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +12 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js +24 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts +13 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js +13 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts +6 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js +6 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js.map +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/node/BrowserLauncher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +6 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +5 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +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/types.d.ts +188 -224
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/Dialog.ts +8 -10
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +27 -29
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +34 -38
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +17 -14
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +92 -108
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +5 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +28 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +16 -7
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +28 -2
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/PredefinedNetworkConditions.ts +13 -22
- package/front_end/third_party/puppeteer/package/src/common/Device.ts +6 -8
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +6 -3
- package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +5 -7
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/ui/components/chrome_link/ChromeLink.ts +4 -2
- package/front_end/ui/components/dialogs/Dialog.ts +13 -9
- package/front_end/ui/components/highlighting/HighlightElement.ts +77 -0
- package/front_end/ui/components/highlighting/HighlightManager.ts +37 -0
- package/front_end/ui/components/highlighting/highlighting.ts +2 -0
- package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +5 -3
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -3
- package/front_end/ui/components/menus/SelectMenu.ts +6 -4
- package/front_end/ui/components/survey_link/SurveyLink.ts +4 -2
- package/front_end/ui/components/text_editor/config.ts +10 -6
- package/front_end/ui/components/text_editor/javascript.ts +8 -4
- package/front_end/ui/components/tooltips/Tooltip.ts +13 -4
- package/front_end/ui/legacy/ForwardedInputEventHandler.ts +4 -2
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/SettingsUI.ts +1 -5
- package/front_end/ui/legacy/Treeoutline.ts +12 -33
- package/front_end/ui/legacy/UIUtils.ts +19 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +12 -10
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +30 -32
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +25 -25
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +4 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +4 -2
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +8 -6
- package/front_end/ui/legacy/components/perf_ui/PieChart.ts +6 -4
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +22 -16
- package/front_end/ui/legacy/components/source_frame/xmlView.css +0 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +6 -4
- package/front_end/ui/visual_logging/Debugging.ts +10 -6
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -3
- package/inspector_overlay/common.ts +5 -3
- package/inspector_overlay/highlight_grid_common.ts +1 -1
- package/package.json +1 -1
- package/front_end/Images/src/bundle.svg +0 -3
- package/front_end/panels/network/components/WebBundleInfoView.css +0 -27
- package/front_end/panels/network/components/WebBundleInfoView.ts +0 -95
package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# The `ttl` field of the `Use-As-Dictionary` HTTP response header must be an integer
|
|
@@ -7085,6 +7085,10 @@ export const NativeFunctions = [
|
|
|
7085
7085
|
name: "sendMessageToEmbedder",
|
|
7086
7086
|
signatures: [["message"]]
|
|
7087
7087
|
},
|
|
7088
|
+
{
|
|
7089
|
+
name: "IntersectionObserver",
|
|
7090
|
+
signatures: [["callback","?options"]]
|
|
7091
|
+
},
|
|
7088
7092
|
{
|
|
7089
7093
|
name: "layoutNextFragment",
|
|
7090
7094
|
signatures: [["?options"]]
|
|
@@ -7982,7 +7986,7 @@ export const NativeFunctions = [
|
|
|
7982
7986
|
},
|
|
7983
7987
|
{
|
|
7984
7988
|
name: "constant",
|
|
7985
|
-
signatures: [["tensor"],["desc","buffer"]]
|
|
7989
|
+
signatures: [["tensor"],["desc","buffer"],["type","value"]]
|
|
7986
7990
|
},
|
|
7987
7991
|
{
|
|
7988
7992
|
name: "argMin",
|
|
@@ -8830,6 +8834,10 @@ export const NativeFunctions = [
|
|
|
8830
8834
|
name: "VideoEncoder",
|
|
8831
8835
|
signatures: [["init"]]
|
|
8832
8836
|
},
|
|
8837
|
+
{
|
|
8838
|
+
name: "VideoFrame",
|
|
8839
|
+
signatures: [["source","?init"],["data","init"]]
|
|
8840
|
+
},
|
|
8833
8841
|
{
|
|
8834
8842
|
name: "clipControlEXT",
|
|
8835
8843
|
signatures: [["origin","depth"]]
|
|
@@ -2,8 +2,10 @@
|
|
|
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
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The TimelineGrid is used in the Performance panel and Memory panel -> Allocating sampling, so the value can be either
|
|
7
|
+
* milliseconds or bytes
|
|
8
|
+
**/
|
|
7
9
|
export interface Calculator {
|
|
8
10
|
computePosition(value: number): number;
|
|
9
11
|
formatValue(value: number, precision?: number): string;
|
|
@@ -72,10 +72,12 @@ export function calculateRequestTimeRanges(
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
/**
|
|
76
|
+
* In some situations, argument `start` may come before `startTime` (`timing.requestStart`). This is especially true
|
|
77
|
+
* in cases such as SW static routing API where fields like `workerRouterEvaluationStart` or `workerCacheLookupStart`
|
|
78
|
+
* is set before setting `timing.requestStart`. If the `start` and `end` is known to be a valid value (i.e. not default
|
|
79
|
+
* invalid value -1 or undefined), we allow adding the range.
|
|
80
|
+
**/
|
|
79
81
|
function addMaybeNegativeOffsetRange(name: RequestTimeRangeNames, start: number, end: number): void {
|
|
80
82
|
addRange(name, startTime + (start / 1000), startTime + (end / 1000));
|
|
81
83
|
}
|
|
@@ -240,7 +240,7 @@ const resolveScope = async(script: SDK.Script.Script, scopeChain: Formatter.Form
|
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
/** If there is no entry with the name field, try to infer the name from the source positions. **/
|
|
244
244
|
async function resolvePosition(): Promise<void> {
|
|
245
245
|
if (!sourceMap) {
|
|
246
246
|
return;
|
|
@@ -684,10 +684,12 @@ export class RemoteObject extends SDK.RemoteObject.RemoteObject {
|
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
686
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
687
|
+
/**
|
|
688
|
+
* Resolve the frame's function name using the name associated with the opening
|
|
689
|
+
* paren that starts the scope. If there is no name associated with the scope
|
|
690
|
+
* start or if the function scope does not start with a left paren (e.g., arrow
|
|
691
|
+
* function with one parameter), the resolution returns null.
|
|
692
|
+
**/
|
|
691
693
|
async function getFunctionNameFromScopeStart(
|
|
692
694
|
script: SDK.Script.Script, lineNumber: number, columnNumber: number): Promise<string|null> {
|
|
693
695
|
// To reduce the overhead of resolving function names,
|
|
@@ -53,10 +53,12 @@ export type DeferredContent = {
|
|
|
53
53
|
isEncoded: boolean,
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Some ContentProvider like NetworkRequests might never actually be able to return
|
|
58
|
+
* a fully completed "requestContentData" as the request keeps on going indefinitely.
|
|
59
|
+
* Such proivders can implement the "StreamingContentProvider" addition, which allows
|
|
60
|
+
* for partial/streaming content.
|
|
61
|
+
**/
|
|
60
62
|
export interface StreamingContentProvider extends ContentProvider {
|
|
61
63
|
requestStreamingContent(): Promise<StreamingContentDataOrError>;
|
|
62
64
|
}
|
|
@@ -192,6 +192,7 @@ function createLanternRequest(
|
|
|
192
192
|
priority: request.args.data.priority,
|
|
193
193
|
frameId: request.args.data.frame,
|
|
194
194
|
fromWorker,
|
|
195
|
+
serverResponseTime: request.args.data.lrServerResponseTime ?? undefined,
|
|
195
196
|
// Set later.
|
|
196
197
|
redirects: undefined,
|
|
197
198
|
redirectSource: undefined,
|
|
@@ -668,7 +668,7 @@ export function eventStackFrame(event: Types.Events.Event): Protocol.Runtime.Cal
|
|
|
668
668
|
return {...topFrame, scriptId: String(topFrame.scriptId) as Protocol.Runtime.ScriptId};
|
|
669
669
|
}
|
|
670
670
|
|
|
671
|
-
|
|
671
|
+
/** TODO(paulirish): rename to generateNodeId **/
|
|
672
672
|
export function generateEventID(event: Types.Events.Event): string {
|
|
673
673
|
if (Types.Events.isProfileCall(event)) {
|
|
674
674
|
const name = SamplesIntegrator.isNativeRuntimeFrame(event.callFrame) ?
|
|
@@ -483,7 +483,7 @@ export class PendingFrame {
|
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
-
|
|
486
|
+
/** The parameters of an impl-side BeginFrame. **/
|
|
487
487
|
class BeginFrameInfo {
|
|
488
488
|
seqId: number;
|
|
489
489
|
startTime: Types.Timing.Micro;
|
|
@@ -497,10 +497,12 @@ class BeginFrameInfo {
|
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
500
|
+
/**
|
|
501
|
+
* A queue of BeginFrames pending visualization.
|
|
502
|
+
* BeginFrames are added into this queue as they occur; later when their
|
|
503
|
+
* corresponding DrawFrames occur (or lack thereof), the BeginFrames are removed
|
|
504
|
+
* from the queue and their timestamps are used for visualization.
|
|
505
|
+
**/
|
|
504
506
|
export class TimelineFrameBeginFrameQueue {
|
|
505
507
|
private queueFrames: number[] = [];
|
|
506
508
|
|
|
@@ -64,12 +64,16 @@ interface RemoteFont {
|
|
|
64
64
|
beginRemoteFontLoadEvent: Types.Events.BeginRemoteFontLoad;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
/**
|
|
68
|
+
* This represents the maximum #time we will allow a cluster to go before we
|
|
69
|
+
* reset it.
|
|
70
|
+
**/
|
|
69
71
|
export const MAX_CLUSTER_DURATION = Helpers.Timing.milliToMicro(Types.Timing.Milli(5000));
|
|
70
72
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
/**
|
|
74
|
+
* This represents the maximum #time we will allow between layout shift events
|
|
75
|
+
* before considering it to be the start of a new cluster.
|
|
76
|
+
**/
|
|
73
77
|
export const MAX_SHIFT_TIME_DELTA = Helpers.Timing.milliToMicro(Types.Timing.Milli(1000));
|
|
74
78
|
|
|
75
79
|
// Layout shifts are reported globally to the developer, irrespective of which
|
|
@@ -108,8 +112,10 @@ let clsWindowID = -1;
|
|
|
108
112
|
let clusters: Types.Events.SyntheticLayoutShiftCluster[] = [];
|
|
109
113
|
let clustersByNavigationId = new Map<Types.Events.NavigationId, Types.Events.SyntheticLayoutShiftCluster[]>();
|
|
110
114
|
|
|
111
|
-
|
|
112
|
-
|
|
115
|
+
/**
|
|
116
|
+
* Represents a point in time in which a LS score change
|
|
117
|
+
* was recorded.
|
|
118
|
+
**/
|
|
113
119
|
interface ScoreRecord {
|
|
114
120
|
ts: number;
|
|
115
121
|
score: number;
|
|
@@ -559,7 +565,7 @@ export function scoreClassificationForLayoutShift(score: number): ScoreClassific
|
|
|
559
565
|
return state;
|
|
560
566
|
}
|
|
561
567
|
|
|
562
|
-
|
|
568
|
+
/** Based on https://web.dev/cls/ **/
|
|
563
569
|
export const enum LayoutShiftsThreshold {
|
|
564
570
|
GOOD = 0,
|
|
565
571
|
NEEDS_IMPROVEMENT = 0.1,
|
|
@@ -472,20 +472,22 @@ export interface MetaHandlerData {
|
|
|
472
472
|
devicePixelRatio?: number;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
475
|
+
/**
|
|
476
|
+
* Each frame has a single render process at a given time but it can have
|
|
477
|
+
* multiple render processes during a trace, for example if a navigation
|
|
478
|
+
* occurred in the frame. This map tracks the process that was active for
|
|
479
|
+
* each frame at each point in time. Also, because a process can be
|
|
480
|
+
* assigned to multiple URLs, there is a window for each URL a process
|
|
481
|
+
* was assigned.
|
|
482
|
+
*
|
|
483
|
+
* Note that different sites always end up in different render
|
|
484
|
+
* processes, however two different URLs can point to the same site.
|
|
485
|
+
* For example: https://google.com and https://maps.google.com point to
|
|
486
|
+
* the same site.
|
|
487
|
+
* Read more about this in
|
|
488
|
+
* https://developer.chrome.com/articles/renderingng-architecture/#threads
|
|
489
|
+
* and https://web.dev/same-site-same-origin/
|
|
490
|
+
**/
|
|
489
491
|
export type FrameProcessData =
|
|
490
492
|
Map<string,
|
|
491
493
|
Map<Types.Events.ProcessID, Array<{frame: Types.Events.TraceFrame, window: Types.Timing.TraceWindowMicro}>>>;
|
|
@@ -14,14 +14,16 @@ import type {HandlerName} from './types.js';
|
|
|
14
14
|
const MILLISECONDS_TO_MICROSECONDS = 1000;
|
|
15
15
|
const SECONDS_TO_MICROSECONDS = 1000000;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Network requests from traces are actually formed of 5 trace records.
|
|
19
|
+
* This handler tracks all trace records based on the request ID, and
|
|
20
|
+
* then creates a new synthetic trace event for those network requests.
|
|
21
|
+
*
|
|
22
|
+
* This interface, then, defines the shape of the object we intend to
|
|
23
|
+
* keep for each request in the trace. In the finalize we will convert
|
|
24
|
+
* these 5 types of trace records to a synthetic complete event that
|
|
25
|
+
* represents a composite of these trace records.
|
|
26
|
+
**/
|
|
25
27
|
export interface TraceEventsForNetworkRequest {
|
|
26
28
|
changePriority?: Types.Events.ResourceChangePriority;
|
|
27
29
|
willSendRequests?: Types.Events.ResourceWillSendRequest[];
|
|
@@ -295,6 +297,7 @@ export async function finalize(): Promise<void> {
|
|
|
295
297
|
*
|
|
296
298
|
* See `_updateTimingsForLightrider` in Lighthouse for more detail.
|
|
297
299
|
*/
|
|
300
|
+
let lrServerResponseTime;
|
|
298
301
|
if (isLightrider && request.receiveResponse?.args.data.headers) {
|
|
299
302
|
timing = {
|
|
300
303
|
requestTime: Helpers.Timing.microToSeconds(request.sendRequests.at(0)?.ts ?? 0 as Types.Timing.Micro),
|
|
@@ -330,6 +333,14 @@ export async function finalize(): Promise<void> {
|
|
|
330
333
|
timing.connectEnd = TCPMs as Types.Timing.Milli;
|
|
331
334
|
timing.sslEnd = TCPMs as Types.Timing.Milli;
|
|
332
335
|
}
|
|
336
|
+
|
|
337
|
+
// Lightrider does not have any equivalent for `sendEnd` timing values. The
|
|
338
|
+
// closest we can get to the server response time is from a header that
|
|
339
|
+
// Lightrider sets.
|
|
340
|
+
const ResponseMsHeader = request.receiveResponse.args.data.headers.find(h => h.name === 'X-ResponseMs');
|
|
341
|
+
if (ResponseMsHeader) {
|
|
342
|
+
lrServerResponseTime = Math.max(0, parseInt(ResponseMsHeader.value, 10)) as Types.Timing.Milli;
|
|
343
|
+
}
|
|
333
344
|
}
|
|
334
345
|
|
|
335
346
|
// TODO: consider allowing chrome / about.
|
|
@@ -437,6 +448,15 @@ export async function finalize(): Promise<void> {
|
|
|
437
448
|
Types.Timing.Micro((timing.receiveHeadersEnd - timing.sendEnd) * MILLISECONDS_TO_MICROSECONDS) :
|
|
438
449
|
Types.Timing.Micro(0);
|
|
439
450
|
|
|
451
|
+
// Server Response Time
|
|
452
|
+
// =======================
|
|
453
|
+
// Time from when the send finished going to when the first byte of headers were received.
|
|
454
|
+
const serverResponseTime = timing ?
|
|
455
|
+
Types.Timing.Micro(
|
|
456
|
+
((timing.receiveHeadersStart ?? timing.receiveHeadersEnd) - timing.sendEnd) *
|
|
457
|
+
MILLISECONDS_TO_MICROSECONDS) :
|
|
458
|
+
Types.Timing.Micro(0);
|
|
459
|
+
|
|
440
460
|
// Download
|
|
441
461
|
// =======================
|
|
442
462
|
// Time from receipt of headers to the finish time.
|
|
@@ -502,6 +522,7 @@ export async function finalize(): Promise<void> {
|
|
|
502
522
|
stalled,
|
|
503
523
|
totalTime,
|
|
504
524
|
waiting,
|
|
525
|
+
serverResponseTime,
|
|
505
526
|
},
|
|
506
527
|
// All fields below are from TraceEventsForNetworkRequest.
|
|
507
528
|
decodedBodyLength,
|
|
@@ -526,6 +547,7 @@ export async function finalize(): Promise<void> {
|
|
|
526
547
|
initiator: finalSendRequest.args.data.initiator,
|
|
527
548
|
stackTrace: finalSendRequest.args.data.stackTrace,
|
|
528
549
|
timing,
|
|
550
|
+
lrServerResponseTime,
|
|
529
551
|
url,
|
|
530
552
|
failed: request.resourceFinish?.args.data.didFail ?? false,
|
|
531
553
|
finished: Boolean(request.resourceFinish),
|
|
@@ -184,7 +184,7 @@ export function addEventToEntityMapping(event: Types.Events.Event, entityMapping
|
|
|
184
184
|
entityMappings.entityByEvent.set(event, entity);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
/** A slight upgrade of addEventToEntityMapping to handle the sub-events of a network request. **/
|
|
188
188
|
export function addNetworkRequestToEntityMapping(
|
|
189
189
|
networkRequest: Types.Events.SyntheticNetworkRequest, entityMappings: EntityMappings,
|
|
190
190
|
requestTraceEvents: TraceEventsForNetworkRequest): void {
|
|
@@ -20,22 +20,24 @@ export interface Handler {
|
|
|
20
20
|
|
|
21
21
|
export type HandlerName = keyof typeof ModelHandlers;
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
/**
|
|
24
|
+
* This type maps Handler names to the return type of their data
|
|
25
|
+
* function. So, for example, if we are given an object with a key of 'foo'
|
|
26
|
+
* and a value which is a TraceHandler containing a data() function that
|
|
27
|
+
* returns a string, this type will be { foo: string }.
|
|
28
|
+
*
|
|
29
|
+
* This allows us to model the behavior of the TraceProcessor in the model,
|
|
30
|
+
* which takes an object with Handlers as part of its config, and
|
|
31
|
+
* which ultimately returns an object keyed off the names of the
|
|
32
|
+
* Handlers, and with values that are derived from each
|
|
33
|
+
* Handler's data function.
|
|
34
|
+
*
|
|
35
|
+
* So, concretely, we provide a Handler for calculating the #time
|
|
36
|
+
* bounds of a trace called TraceBounds, whose data() function returns a
|
|
37
|
+
* TraceWindow. The HandlerData, therefore, would determine that the
|
|
38
|
+
* TraceProcessor would contain a key called 'TraceBounds' whose value is
|
|
39
|
+
* a TraceWindow.
|
|
40
|
+
**/
|
|
39
41
|
export type EnabledHandlerDataWithMeta<T extends Record<string, Handler>> = {
|
|
40
42
|
// We allow the user to configure which handlers are created by passing them
|
|
41
43
|
// in when constructing a model instance. However, we then ensure that the
|
|
@@ -58,9 +60,11 @@ export type HandlersWithMeta<T extends Record<string, Handler>> = {
|
|
|
58
60
|
[K in keyof T]: T[K];
|
|
59
61
|
};
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Represents the final data from all of the handlers. If you instantiate a
|
|
65
|
+
* TraceProcessor with a subset of handlers, you should instead use
|
|
66
|
+
* `EnabledHandlerDataWithMeta<>`.
|
|
67
|
+
**/
|
|
64
68
|
export type HandlerData = Readonly<EnabledHandlerDataWithMeta<typeof ModelHandlers>>;
|
|
65
69
|
|
|
66
70
|
type DeepWriteable<T> = {
|
|
@@ -39,8 +39,10 @@ export function timeStampForEventAdjustedByClosestNavigation(
|
|
|
39
39
|
return Types.Timing.Micro(eventTimeStamp);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Expands the trace window by a provided percentage or, if it the expanded window is smaller than 1 millisecond, expands it to 1 millisecond.
|
|
44
|
+
* If the expanded window is outside of the max trace window, cut the overflowing bound to the max trace window bound.
|
|
45
|
+
**/
|
|
44
46
|
export function expandWindowByPercentOrToOneMillisecond(
|
|
45
47
|
annotationWindow: Types.Timing.TraceWindowMicro, maxTraceWindow: Types.Timing.TraceWindowMicro,
|
|
46
48
|
percentage: number): Types.Timing.TraceWindowMicro {
|
|
@@ -85,8 +85,10 @@ export function extractOriginFromTrace(firstNavigationURL: string): string|null
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
export type EventsInThread<T extends Types.Events.Event> = Map<Types.Events.ThreadID, T[]>;
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Each thread contains events. Events indicate the thread and process IDs, which are
|
|
90
|
+
* used to store the event in the correct process thread entry below.
|
|
91
|
+
**/
|
|
90
92
|
export function addEventToProcessThread<T extends Types.Events.Event>(
|
|
91
93
|
event: T,
|
|
92
94
|
eventsInProcessThread: Map<Types.Events.ProcessID, EventsInThread<T>>,
|
|
@@ -822,8 +824,10 @@ export function extractSampleTraceId(event: Types.Events.Event): number|null {
|
|
|
822
824
|
return event.args?.sampleTraceId ?? event.args?.data?.sampleTraceId ?? null;
|
|
823
825
|
}
|
|
824
826
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
+
/**
|
|
828
|
+
* This exactly matches Trace.Styles.visibleTypes. See the runtime verification in maybeInitStylesMap.
|
|
829
|
+
* TODO(crbug.com/410884528)
|
|
830
|
+
**/
|
|
827
831
|
export const VISIBLE_TRACE_EVENT_TYPES = new Set<Types.Events.Name>([
|
|
828
832
|
Types.Events.Name.ABORT_POST_TASK_CALLBACK,
|
|
829
833
|
Types.Events.Name.ANIMATION,
|
|
@@ -95,15 +95,14 @@ export type DocumentLatencyInsightModel = InsightModel<typeof UIStrings, {
|
|
|
95
95
|
},
|
|
96
96
|
}>;
|
|
97
97
|
|
|
98
|
-
function getServerResponseTime(
|
|
99
|
-
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return lanternRequest.serverResponseTime as Types.Timing.Milli;
|
|
98
|
+
function getServerResponseTime(request: Types.Events.SyntheticNetworkRequest): Types.Timing.Milli|null {
|
|
99
|
+
// For technical reasons, Lightrider does not have `sendEnd` timing values. The
|
|
100
|
+
// closest we can get to the server response time is from a header that Lightrider
|
|
101
|
+
// sets.
|
|
102
|
+
// @ts-expect-error
|
|
103
|
+
const isLightrider = globalThis.isLightrider;
|
|
104
|
+
if (isLightrider) {
|
|
105
|
+
return request.args.data.lrServerResponseTime ?? null;
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
const timing = request.args.data.timing;
|
|
@@ -111,7 +110,7 @@ function getServerResponseTime(
|
|
|
111
110
|
return null;
|
|
112
111
|
}
|
|
113
112
|
|
|
114
|
-
const ms = Helpers.Timing.microToMilli(request.args.data.syntheticData.
|
|
113
|
+
const ms = Helpers.Timing.microToMilli(request.args.data.syntheticData.serverResponseTime);
|
|
115
114
|
return Math.round(ms) as Types.Timing.Milli;
|
|
116
115
|
}
|
|
117
116
|
|
|
@@ -202,7 +201,7 @@ export function generateInsight(
|
|
|
202
201
|
return finalize({warnings: [InsightWarning.NO_DOCUMENT_REQUEST]});
|
|
203
202
|
}
|
|
204
203
|
|
|
205
|
-
const serverResponseTime = getServerResponseTime(documentRequest
|
|
204
|
+
const serverResponseTime = getServerResponseTime(documentRequest);
|
|
206
205
|
if (serverResponseTime === null) {
|
|
207
206
|
throw new Error('missing document request timing');
|
|
208
207
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
-
import
|
|
6
|
+
import * as Handlers from '../handlers/handlers.js';
|
|
7
7
|
import * as Helpers from '../helpers/helpers.js';
|
|
8
8
|
import type {SyntheticInteractionPair} from '../types/TraceEvents.js';
|
|
9
9
|
import type * as Types from '../types/types.js';
|
|
@@ -67,13 +67,24 @@ export function isINPBreakdownInsight(insight: InsightModel): insight is INPBrea
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
function finalize(partialModel: PartialInsightModel<INPBreakdownInsightModel>): INPBreakdownInsightModel {
|
|
70
|
+
let state: INPBreakdownInsightModel['state'] = 'pass';
|
|
71
|
+
if (partialModel.longestInteractionEvent) {
|
|
72
|
+
const classification = Handlers.ModelHandlers.UserInteractions.scoreClassificationForInteractionToNextPaint(
|
|
73
|
+
partialModel.longestInteractionEvent.dur);
|
|
74
|
+
if (classification === Handlers.ModelHandlers.PageLoadMetrics.ScoreClassification.GOOD) {
|
|
75
|
+
state = 'informative';
|
|
76
|
+
} else {
|
|
77
|
+
state = 'fail';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
70
81
|
return {
|
|
71
82
|
insightKey: InsightKeys.INP_BREAKDOWN,
|
|
72
83
|
strings: UIStrings,
|
|
73
84
|
title: i18nString(UIStrings.title),
|
|
74
85
|
description: i18nString(UIStrings.description),
|
|
75
86
|
category: InsightCategory.INP,
|
|
76
|
-
state
|
|
87
|
+
state,
|
|
77
88
|
...partialModel,
|
|
78
89
|
};
|
|
79
90
|
}
|
|
@@ -65,7 +65,7 @@ export const UIStrings = {
|
|
|
65
65
|
const str_ = i18n.i18n.registerUIStrings('models/trace/insights/LCPBreakdown.ts', UIStrings);
|
|
66
66
|
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
/** A TraceWindow plus its UIString. **/
|
|
69
69
|
export type Subpart = Types.Timing.TraceWindowMicro&{label: Common.UIString.LocalizedString};
|
|
70
70
|
interface LCPSubparts {
|
|
71
71
|
/**
|
|
@@ -180,13 +180,25 @@ function finalize(partialModel: PartialInsightModel<LCPBreakdownInsightModel>):
|
|
|
180
180
|
if (partialModel.lcpRequest) {
|
|
181
181
|
relatedEvents.push(partialModel.lcpRequest);
|
|
182
182
|
}
|
|
183
|
+
|
|
184
|
+
let state: LCPBreakdownInsightModel['state'] = 'pass';
|
|
185
|
+
if (partialModel.lcpMs !== undefined) {
|
|
186
|
+
const classification = Handlers.ModelHandlers.PageLoadMetrics.scoreClassificationForLargestContentfulPaint(
|
|
187
|
+
Helpers.Timing.milliToMicro(partialModel.lcpMs));
|
|
188
|
+
if (classification === Handlers.ModelHandlers.PageLoadMetrics.ScoreClassification.GOOD) {
|
|
189
|
+
state = 'informative';
|
|
190
|
+
} else {
|
|
191
|
+
state = 'fail';
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
183
195
|
return {
|
|
184
196
|
insightKey: InsightKeys.LCP_BREAKDOWN,
|
|
185
197
|
strings: UIStrings,
|
|
186
198
|
title: i18nString(UIStrings.title),
|
|
187
199
|
description: i18nString(UIStrings.description),
|
|
188
200
|
category: InsightCategory.LCP,
|
|
189
|
-
state
|
|
201
|
+
state,
|
|
190
202
|
...partialModel,
|
|
191
203
|
relatedEvents,
|
|
192
204
|
};
|
|
@@ -458,7 +458,7 @@ export function handleLinkResponseHeader(linkHeaderValue: string): Array<{url: s
|
|
|
458
458
|
return preconnectedOrigins;
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
-
|
|
461
|
+
/** Export the function for test purpose. **/
|
|
462
462
|
export function generatePreconnectedOrigins(
|
|
463
463
|
data: Handlers.Types.HandlerData, context: InsightSetContextWithNavigation,
|
|
464
464
|
contextRequests: Types.Events.SyntheticNetworkRequest[],
|
|
@@ -584,7 +584,7 @@ function candidateRequestsByOrigin(
|
|
|
584
584
|
return origins;
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
-
|
|
587
|
+
/** Export the function for test purpose. **/
|
|
588
588
|
export function generatePreconnectCandidates(
|
|
589
589
|
data: Handlers.Types.HandlerData, context: InsightSetContextWithNavigation,
|
|
590
590
|
contextRequests: Types.Events.SyntheticNetworkRequest[]): PreconnectCandidate[] {
|
|
@@ -124,17 +124,19 @@ export function isEntriesLinkAnnotation(annotation: Annotation): annotation is E
|
|
|
124
124
|
return annotation.type === 'ENTRIES_LINK';
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Serializable keys are created for trace events to be able to save
|
|
129
|
+
* references to timeline events in a trace file. These keys enable
|
|
130
|
+
* user modifications that can be saved. See go/cpq:event-data-json for
|
|
131
|
+
* more details on the key format.
|
|
132
|
+
**/
|
|
131
133
|
export type RawEventKey = `${EventKeyType.RAW_EVENT}-${number}`;
|
|
132
134
|
export type SyntheticEventKey = `${EventKeyType.SYNTHETIC_EVENT}-${number}`;
|
|
133
135
|
export type ProfileCallKey = `${EventKeyType.PROFILE_CALL}-${ProcessID}-${ThreadID}-${SampleIndex}-${Protocol.integer}`;
|
|
134
136
|
export type LegacyTimelineFrameKey = `${EventKeyType.LEGACY_TIMELINE_FRAME}-${number}`;
|
|
135
137
|
export type SerializableKey = RawEventKey|ProfileCallKey|SyntheticEventKey|LegacyTimelineFrameKey;
|
|
136
138
|
|
|
137
|
-
|
|
139
|
+
/** Serializable keys values objects contain data that maps the keys to original Trace Events **/
|
|
138
140
|
export interface RawEventKeyValues {
|
|
139
141
|
type: EventKeyType.RAW_EVENT;
|
|
140
142
|
rawIndex: number;
|
|
@@ -172,9 +174,11 @@ export interface Modifications {
|
|
|
172
174
|
annotations: SerializedAnnotations;
|
|
173
175
|
}
|
|
174
176
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
/**
|
|
178
|
+
* IMPORTANT: this is the same as PerfUI.FlameChart.PersistedGroupConfig
|
|
179
|
+
* However, the PerfUI code should not depend on the model/trace, and similarly
|
|
180
|
+
* this model cannot depend on that code, so we duplicate it.
|
|
181
|
+
**/
|
|
178
182
|
export interface TrackVisualConfig {
|
|
179
183
|
hidden: boolean;
|
|
180
184
|
expanded: boolean;
|
|
@@ -25,6 +25,6 @@ export interface TraceWindow<TimeFormat extends Micro|Milli> {
|
|
|
25
25
|
range: TimeFormat;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
/** See front_end/models/trace/helpers/Timing.ts for helpful utility functions like traceWindowFromMicroSeconds **/
|
|
29
29
|
export type TraceWindowMicro = TraceWindow<Micro>;
|
|
30
30
|
export type TraceWindowMilli = TraceWindow<Milli>;
|