chrome-devtools-frontend 1.0.1526203 → 1.0.1528866
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/docs/ui_engineering.md +159 -0
- package/eslint.config.mjs +6 -1
- package/front_end/core/i18n/i18nImpl.ts +5 -0
- package/front_end/core/protocol_client/protocol_client.ts +1 -1
- package/front_end/core/root/Runtime.ts +28 -4
- package/front_end/core/sdk/CSSMatchedStyles.ts +50 -7
- package/front_end/core/sdk/CSSRule.ts +35 -6
- package/front_end/core/sdk/ChildTargetManager.ts +2 -0
- package/front_end/core/sdk/Connections.ts +2 -1
- package/front_end/core/sdk/DOMModel.ts +4 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -1
- package/front_end/core/sdk/NetworkManager.ts +214 -31
- package/front_end/core/sdk/PreloadingModel.ts +82 -17
- package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1 -1
- package/front_end/core/sdk/RehydratingConnection.ts +29 -4
- package/front_end/core/sdk/ScopeTreeCache.ts +8 -3
- package/front_end/core/sdk/SourceMap.ts +37 -11
- package/front_end/core/sdk/SourceMapManager.ts +13 -2
- package/front_end/core/sdk/SourceMapScopesInfo.ts +17 -0
- package/front_end/core/sdk/TargetManager.ts +0 -22
- package/front_end/core/sdk/TraceObject.ts +8 -7
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +81 -0
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
- package/front_end/entrypoints/main/GlobalAiButton.ts +1 -0
- package/front_end/entrypoints/main/MainImpl.ts +20 -25
- package/front_end/generated/InspectorBackendCommands.js +4 -3
- package/front_end/generated/protocol-mapping.d.ts +3 -1
- package/front_end/generated/protocol-proxy-api.d.ts +3 -1
- package/front_end/generated/protocol.ts +17 -3
- package/front_end/models/ai_assistance/BuiltInAi.ts +111 -0
- package/front_end/models/ai_assistance/ai_assistance.ts +53 -24
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +105 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +6 -1
- package/front_end/models/extensions/ExtensionView.ts +3 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +23 -27
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +31 -29
- package/front_end/models/persistence/EditFileSystemView.ts +1 -0
- package/front_end/models/source_map_scopes/NamesResolver.ts +5 -11
- package/front_end/models/stack_trace/Trie.ts +9 -0
- package/front_end/models/trace/lantern/types/Lantern.ts +1 -1
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -0
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +1 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +120 -113
- package/front_end/panels/ai_assistance/PatchWidget.ts +9 -8
- package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +2 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +29 -29
- package/front_end/panels/ai_assistance/components/UserActionRow.ts +1 -0
- package/front_end/panels/animation/AnimationTimeline.ts +1 -0
- package/front_end/panels/application/CookieItemsView.ts +1 -0
- package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +2 -0
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +11 -5
- package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +7 -5
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +22 -10
- package/front_end/panels/changes/CombinedDiffView.ts +1 -0
- package/front_end/panels/console/ConsoleInsightTeaser.ts +106 -0
- package/front_end/panels/console/ConsolePanel.ts +2 -0
- package/front_end/panels/console/ConsolePrompt.ts +12 -2
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +12 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +27 -0
- package/front_end/panels/{explain → console}/PromptBuilder.ts +12 -7
- package/front_end/panels/console/console.ts +6 -0
- package/front_end/panels/console/consoleInsightTeaser.css +55 -0
- package/front_end/panels/coverage/CoverageListView.ts +141 -277
- package/front_end/panels/coverage/CoverageView.ts +330 -324
- package/front_end/panels/coverage/coverageView.css +17 -0
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -0
- package/front_end/panels/elements/LayoutPane.ts +1 -0
- package/front_end/panels/elements/NodeStackTraceWidget.ts +1 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +5 -1
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +17 -0
- package/front_end/panels/emulation/DeviceModeView.ts +2 -0
- package/front_end/panels/explain/ActionDelegate.ts +1 -2
- package/front_end/panels/explain/components/ConsoleInsight.ts +14 -12
- package/front_end/panels/explain/explain.ts +0 -1
- package/front_end/panels/js_timeline/js_timeline-meta.ts +1 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -0
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +1 -0
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +12 -19
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +27 -43
- package/front_end/panels/media/MainView.ts +1 -0
- package/front_end/panels/media/TickingFlameChart.ts +2 -0
- package/front_end/panels/network/BlockedURLsPane.ts +111 -85
- package/front_end/panels/network/EventSourceMessagesView.ts +1 -0
- package/front_end/panels/network/NetworkItemView.ts +1 -0
- package/front_end/panels/network/NetworkLogView.ts +9 -7
- package/front_end/panels/network/NetworkOverview.ts +1 -0
- package/front_end/panels/network/RequestCookiesView.ts +1 -0
- package/front_end/panels/network/RequestHTMLView.ts +1 -0
- package/front_end/panels/network/RequestInitiatorView.ts +1 -0
- package/front_end/panels/network/RequestPayloadView.ts +1 -0
- package/front_end/panels/network/RequestPreviewView.ts +1 -0
- package/front_end/panels/network/RequestResponseView.ts +2 -1
- package/front_end/panels/network/RequestTimingView.ts +2 -0
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -0
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +1 -0
- package/front_end/panels/network/components/RequestHeadersView.ts +2 -0
- package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -0
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +2 -0
- package/front_end/panels/profiler/HeapSnapshotView.ts +7 -0
- package/front_end/panels/profiler/IsolateSelector.ts +1 -0
- package/front_end/panels/profiler/LiveHeapProfileView.ts +1 -0
- package/front_end/panels/profiler/ProfileView.ts +1 -0
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
- package/front_end/panels/recorder/RecorderPanel.ts +2 -0
- package/front_end/panels/screencast/ScreencastView.ts +1 -0
- package/front_end/panels/search/SearchView.ts +1 -0
- package/front_end/panels/settings/AISettingsTab.ts +3 -3
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -0
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +12 -0
- package/front_end/panels/sources/BreakpointsView.ts +1 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -0
- package/front_end/panels/sources/UISourceCodeFrame.ts +17 -2
- package/front_end/panels/timeline/README.md +2 -2
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -3
- package/front_end/panels/timeline/TimelineLayersView.ts +1 -0
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +114 -37
- package/front_end/panels/timeline/TimelinePanel.ts +43 -62
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -0
- package/front_end/panels/timeline/components/LiveMetricsView.ts +4 -8
- package/front_end/panels/timeline/components/Sidebar.ts +2 -0
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -1
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +7 -7
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +4 -4
- package/front_end/panels/web_audio/WebAudioView.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1530 -2426
- package/front_end/third_party/lighthouse/locales/ar-XB.json +107 -455
- package/front_end/third_party/lighthouse/locales/ar.json +107 -455
- package/front_end/third_party/lighthouse/locales/bg.json +96 -444
- package/front_end/third_party/lighthouse/locales/ca.json +96 -444
- package/front_end/third_party/lighthouse/locales/cs.json +96 -444
- package/front_end/third_party/lighthouse/locales/da.json +96 -444
- package/front_end/third_party/lighthouse/locales/de.json +96 -444
- package/front_end/third_party/lighthouse/locales/el.json +96 -444
- package/front_end/third_party/lighthouse/locales/en-GB.json +96 -444
- package/front_end/third_party/lighthouse/locales/en-US.json +116 -467
- package/front_end/third_party/lighthouse/locales/en-XA.json +93 -441
- package/front_end/third_party/lighthouse/locales/en-XL.json +116 -467
- package/front_end/third_party/lighthouse/locales/es-419.json +96 -444
- package/front_end/third_party/lighthouse/locales/es.json +96 -444
- package/front_end/third_party/lighthouse/locales/fi.json +96 -444
- package/front_end/third_party/lighthouse/locales/fil.json +96 -444
- package/front_end/third_party/lighthouse/locales/fr.json +96 -444
- package/front_end/third_party/lighthouse/locales/he.json +118 -466
- package/front_end/third_party/lighthouse/locales/hi.json +96 -444
- package/front_end/third_party/lighthouse/locales/hr.json +100 -448
- package/front_end/third_party/lighthouse/locales/hu.json +96 -444
- package/front_end/third_party/lighthouse/locales/id.json +96 -444
- package/front_end/third_party/lighthouse/locales/it.json +96 -444
- package/front_end/third_party/lighthouse/locales/ja.json +96 -444
- package/front_end/third_party/lighthouse/locales/ko.json +97 -445
- package/front_end/third_party/lighthouse/locales/lt.json +96 -444
- package/front_end/third_party/lighthouse/locales/lv.json +97 -445
- package/front_end/third_party/lighthouse/locales/nl.json +96 -444
- package/front_end/third_party/lighthouse/locales/no.json +96 -444
- package/front_end/third_party/lighthouse/locales/pl.json +96 -444
- package/front_end/third_party/lighthouse/locales/pt-PT.json +96 -444
- package/front_end/third_party/lighthouse/locales/pt.json +97 -445
- package/front_end/third_party/lighthouse/locales/ro.json +97 -445
- package/front_end/third_party/lighthouse/locales/ru.json +96 -444
- package/front_end/third_party/lighthouse/locales/sk.json +96 -444
- package/front_end/third_party/lighthouse/locales/sl.json +96 -444
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +96 -444
- package/front_end/third_party/lighthouse/locales/sr.json +96 -444
- package/front_end/third_party/lighthouse/locales/sv.json +96 -444
- package/front_end/third_party/lighthouse/locales/ta.json +96 -444
- package/front_end/third_party/lighthouse/locales/te.json +97 -445
- package/front_end/third_party/lighthouse/locales/th.json +96 -444
- package/front_end/third_party/lighthouse/locales/tr.json +96 -444
- package/front_end/third_party/lighthouse/locales/uk.json +96 -444
- package/front_end/third_party/lighthouse/locales/vi.json +96 -444
- package/front_end/third_party/lighthouse/locales/zh-HK.json +96 -444
- package/front_end/third_party/lighthouse/locales/zh-TW.json +97 -445
- package/front_end/third_party/lighthouse/locales/zh.json +96 -444
- package/front_end/third_party/lighthouse/report/bundle.d.ts +8 -14
- package/front_end/third_party/lighthouse/report/bundle.js +10 -49
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/third_party/web-vitals/README.chromium +5 -8
- package/front_end/third_party/web-vitals/package/README.md +191 -152
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.js +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +45 -26
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +3 -3
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +10 -10
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +307 -206
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +69 -49
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/index.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/index.js +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +33 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +111 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/{attribution/deprecated.js → lib/LCPEntryManager.js} +6 -7
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.d.ts +6 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.js +44 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/generateUniqueID.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getNavigationEntry.js +5 -7
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.js +9 -12
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.d.ts +1 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +52 -33
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +0 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.js +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initUnique.d.ts +6 -0
- package/front_end/third_party/web-vitals/package/dist/modules/{deprecated.js → lib/initUnique.js} +11 -4
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +3 -6
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +6 -6
- package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.d.ts → whenIdleOrHidden.d.ts} +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.js → whenIdleOrHidden.js} +10 -8
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +17 -35
- package/front_end/third_party/web-vitals/package/dist/modules/onFCP.js +3 -5
- package/front_end/third_party/web-vitals/package/dist/modules/onINP.d.ts +9 -7
- package/front_end/third_party/web-vitals/package/dist/modules/onINP.js +27 -19
- package/front_end/third_party/web-vitals/package/dist/modules/onLCP.js +33 -26
- package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.js +2 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types/base.d.ts +6 -5
- package/front_end/third_party/web-vitals/package/dist/modules/types/cls.d.ts +5 -3
- package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +80 -33
- package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +6 -2
- package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +28 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
- package/front_end/third_party/web-vitals/package/package.json +4 -10
- package/front_end/third_party/web-vitals/package/src/attribution/index.ts +0 -1
- package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +58 -33
- package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +4 -4
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +382 -258
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +96 -69
- package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +3 -3
- package/front_end/third_party/web-vitals/package/src/index.ts +0 -1
- package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +146 -0
- package/front_end/third_party/web-vitals/package/src/{attribution/deprecated.ts → lib/LCPEntryManager.ts} +6 -9
- package/front_end/third_party/web-vitals/package/src/lib/LayoutShiftManager.ts +50 -0
- package/front_end/third_party/web-vitals/package/src/lib/bindReporter.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/generateUniqueID.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getNavigationEntry.ts +5 -8
- package/front_end/third_party/web-vitals/package/src/lib/getSelector.ts +12 -12
- package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +57 -35
- package/front_end/third_party/web-vitals/package/src/lib/initMetric.ts +2 -2
- package/front_end/third_party/web-vitals/package/src/{deprecated.ts → lib/initUnique.ts} +14 -8
- package/front_end/third_party/web-vitals/package/src/lib/observe.ts +3 -11
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +12 -6
- package/front_end/third_party/web-vitals/package/src/lib/{whenIdle.ts → whenIdleOrHidden.ts} +10 -8
- package/front_end/third_party/web-vitals/package/src/onCLS.ts +17 -38
- package/front_end/third_party/web-vitals/package/src/onFCP.ts +3 -6
- package/front_end/third_party/web-vitals/package/src/onINP.ts +33 -28
- package/front_end/third_party/web-vitals/package/src/onLCP.ts +36 -29
- package/front_end/third_party/web-vitals/package/src/onTTFB.ts +2 -5
- package/front_end/third_party/web-vitals/package/src/types/base.ts +5 -5
- package/front_end/third_party/web-vitals/package/src/types/cls.ts +5 -3
- package/front_end/third_party/web-vitals/package/src/types/inp.ts +88 -33
- package/front_end/third_party/web-vitals/package/src/types/lcp.ts +6 -2
- package/front_end/third_party/web-vitals/package/src/types.ts +47 -4
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +75 -0
- package/front_end/third_party/web-vitals/rebuild.sh +32 -18
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +5 -10
- package/front_end/third_party/web-vitals/web-vitals.ts +0 -2
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/components/docs/console_insight/basic.ts +3 -2
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +2 -0
- package/front_end/ui/components/text_editor/TextEditor.ts +0 -2
- package/front_end/ui/legacy/EmptyWidget.ts +11 -1
- package/front_end/ui/legacy/InspectorView.ts +2 -0
- package/front_end/ui/legacy/SplitWidget.ts +2 -0
- package/front_end/ui/legacy/TabbedPane.ts +1 -0
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -0
- package/front_end/ui/legacy/Toolbar.ts +25 -4
- package/front_end/ui/legacy/UIUtils.ts +28 -13
- package/front_end/ui/legacy/ViewManager.ts +1 -0
- package/front_end/ui/legacy/Widget.ts +5 -0
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +7 -20
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +1 -0
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +1 -0
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +9 -8
- package/front_end/ui/visual_logging/KnownContextValues.ts +17 -0
- package/mcp/README.md +7 -0
- package/mcp/mcp.ts +8 -0
- package/package.json +1 -1
- package/front_end/models/live-metrics/web-vitals-injected/OnEachInteraction.ts +0 -34
- package/front_end/third_party/web-vitals/package/attribution.d.ts +0 -16
- package/front_end/third_party/web-vitals/package/attribution.js +0 -18
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/deprecated.d.ts +0 -7
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.d.ts +0 -11
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.js +0 -46
- package/front_end/third_party/web-vitals/package/dist/modules/deprecated.d.ts +0 -5
- package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.d.ts +0 -31
- package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.js +0 -107
- package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.js +0 -22
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.d.ts +0 -7
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.js +0 -147
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.js +0 -25
- package/front_end/third_party/web-vitals/package/dist/modules/onFID.d.ts +0 -13
- package/front_end/third_party/web-vitals/package/dist/modules/onFID.js +0 -70
- package/front_end/third_party/web-vitals/package/dist/modules/types/fid.d.ts +0 -46
- package/front_end/third_party/web-vitals/package/dist/modules/types/fid.js +0 -16
- package/front_end/third_party/web-vitals/package/src/attribution/onFID.ts +0 -62
- package/front_end/third_party/web-vitals/package/src/lib/interactions.ts +0 -139
- package/front_end/third_party/web-vitals/package/src/lib/onHidden.ts +0 -23
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/firstInputPolyfill.ts +0 -174
- package/front_end/third_party/web-vitals/package/src/onFID.ts +0 -105
- package/front_end/third_party/web-vitals/package/src/types/fid.ts +0 -65
- package/front_end/ui/components/text_editor/textEditor.css +0 -18
- package/front_end/ui/legacy/inlineButton.css +0 -22
- /package/front_end/entrypoints/{rehydrated_devtools_app/rehydrated_devtools_app.ts → trace_app/trace_app.ts} +0 -0
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
// Copyright 2017 The Chromium Authors
|
|
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
|
-
|
|
5
|
-
|
|
4
|
+
|
|
5
|
+
import '../../ui/components/highlighting/highlighting.js';
|
|
6
|
+
import '../../ui/legacy/components/data_grid/data_grid.js';
|
|
6
7
|
|
|
7
8
|
import * as Common from '../../core/common/common.js';
|
|
8
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
9
10
|
import type * as Platform from '../../core/platform/platform.js';
|
|
10
|
-
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
11
11
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
12
|
-
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
13
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
14
|
-
import {Directives, html, nothing, render} from '../../ui/lit/lit.js';
|
|
13
|
+
import {Directives, html, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
|
|
15
14
|
|
|
16
15
|
import coverageListViewStyles from './coverageListView.css.js';
|
|
17
16
|
import {CoverageType} from './CoverageModel.js';
|
|
@@ -124,7 +123,7 @@ const UIStrings = {
|
|
|
124
123
|
} as const;
|
|
125
124
|
const str_ = i18n.i18n.registerUIStrings('panels/coverage/CoverageListView.ts', UIStrings);
|
|
126
125
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
127
|
-
const {styleMap} = Directives;
|
|
126
|
+
const {styleMap, repeat} = Directives;
|
|
128
127
|
|
|
129
128
|
export function coverageTypeToString(type: CoverageType): string {
|
|
130
129
|
const types = [];
|
|
@@ -139,165 +138,115 @@ export function coverageTypeToString(type: CoverageType): string {
|
|
|
139
138
|
return types.join('+');
|
|
140
139
|
}
|
|
141
140
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
interface ViewInput {
|
|
142
|
+
items: CoverageListItem[];
|
|
143
|
+
selectedUrl: Platform.DevToolsPath.UrlString|null;
|
|
144
|
+
maxSize: number;
|
|
145
|
+
onOpen: (url: Platform.DevToolsPath.UrlString) => void;
|
|
146
|
+
highlightRegExp: RegExp|null;
|
|
147
|
+
}
|
|
146
148
|
|
|
147
|
-
|
|
148
|
-
super({useShadowDom: true});
|
|
149
|
-
this.registerRequiredCSS(coverageListViewStyles);
|
|
150
|
-
this.nodeForUrl = new Map();
|
|
151
|
-
this.highlightRegExp = null;
|
|
149
|
+
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
152
150
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
{
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
sort: DataGrid.DataGrid.Order.Descending,
|
|
181
|
-
weight: 1,
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
id: 'bars',
|
|
185
|
-
title: i18nString(UIStrings.usageVisualization),
|
|
186
|
-
width: '250px',
|
|
187
|
-
fixedWidth: false,
|
|
188
|
-
sortable: true,
|
|
189
|
-
weight: 1,
|
|
190
|
-
},
|
|
191
|
-
] as DataGrid.DataGrid.ColumnDescriptor[];
|
|
192
|
-
this.dataGrid =
|
|
193
|
-
DataGrid.SortableDataGrid.SortableDataGrid.create(['dummy'], [], i18nString(UIStrings.codeCoverage)) as
|
|
194
|
-
DataGrid.SortableDataGrid.SortableDataGrid<GridNode>;
|
|
195
|
-
this.dataGrid.removeColumn('dummy');
|
|
196
|
-
for (const column of columns) {
|
|
197
|
-
this.dataGrid.addColumn(column);
|
|
198
|
-
}
|
|
199
|
-
this.dataGrid.setColumnsVisibility(new Set(columns.map(column => column.id)));
|
|
200
|
-
this.dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.LAST);
|
|
201
|
-
this.dataGrid.setStriped(true);
|
|
202
|
-
this.dataGrid.element.classList.add('flex-auto');
|
|
203
|
-
this.dataGrid.addEventListener(DataGrid.DataGrid.Events.OPENED_NODE, this.onOpenedNode, this);
|
|
204
|
-
|
|
205
|
-
const dataGridWidget = this.dataGrid.asWidget();
|
|
206
|
-
dataGridWidget.show(this.contentElement);
|
|
207
|
-
this.setDefaultFocusedChild(dataGridWidget);
|
|
208
|
-
}
|
|
151
|
+
const formatBytes = (value: number|undefined): string => {
|
|
152
|
+
return getBytesFormatter().format(value ?? 0);
|
|
153
|
+
};
|
|
154
|
+
const formatPercent = (value: number|undefined): string => {
|
|
155
|
+
return getPercentageFormatter().format(value ?? 0);
|
|
156
|
+
};
|
|
157
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
158
|
+
// clang-format off
|
|
159
|
+
render(html`
|
|
160
|
+
<style>${coverageListViewStyles}</style>
|
|
161
|
+
<devtools-data-grid class="flex-auto" name=${i18nString(UIStrings.codeCoverage)} striped autofocus resize="last"
|
|
162
|
+
.template=${html`
|
|
163
|
+
<table>
|
|
164
|
+
<tr>
|
|
165
|
+
<th id="url" width="250px" weight="3" sortable>${i18nString(UIStrings.url)}</th>
|
|
166
|
+
<th id="type" width="45px" weight="1" fixed sortable>${i18nString(UIStrings.type)}</th>
|
|
167
|
+
<th id="size" width="60px" align="right" weight="1" fixed sortable>${i18nString(UIStrings.totalBytes)}</th>
|
|
168
|
+
<th id="unused-size" width="100px" align="right" weight="1" fixed sortable sort="descending">${
|
|
169
|
+
i18nString(UIStrings.unusedBytes)}</th>
|
|
170
|
+
<th id="bars" width="250px" weight="1" sortable>${i18nString(UIStrings.usageVisualization)}</th>
|
|
171
|
+
</tr>
|
|
172
|
+
${repeat(input.items, info => info.url, info => renderItem(info, input))}
|
|
173
|
+
</table>`}>
|
|
174
|
+
</devtools-data-grid>`,
|
|
175
|
+
target);
|
|
176
|
+
// clang-format on
|
|
177
|
+
};
|
|
209
178
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
179
|
+
export class CoverageListView extends UI.Widget.VBox {
|
|
180
|
+
#highlightRegExp: RegExp|null;
|
|
181
|
+
#coverageInfo: CoverageListItem[] = [];
|
|
182
|
+
#selectedUrl: Platform.DevToolsPath.UrlString|null = null;
|
|
183
|
+
#maxSize = 0;
|
|
184
|
+
#view: View;
|
|
213
185
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
}
|
|
186
|
+
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
187
|
+
super(element, {useShadowDom: true, delegatesFocus: true});
|
|
188
|
+
this.#view = view;
|
|
189
|
+
this.#highlightRegExp = null;
|
|
190
|
+
}
|
|
221
191
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
if (node) {
|
|
226
|
-
hadUpdates = node.refreshIfNeeded(maxSize, entry) || hadUpdates;
|
|
227
|
-
if (entry.sources.length > 0) {
|
|
228
|
-
this.updateSourceNodes(entry.sources, maxSize, node);
|
|
229
|
-
}
|
|
230
|
-
node.setHighlight(this.highlightRegExp);
|
|
231
|
-
continue;
|
|
232
|
-
}
|
|
233
|
-
node = new GridNode(entry, maxSize);
|
|
234
|
-
this.nodeForUrl.set(entry.url, node);
|
|
235
|
-
this.appendNodeByType(node);
|
|
236
|
-
if (entry.sources.length > 0) {
|
|
237
|
-
this.updateSourceNodes(entry.sources, maxSize, node);
|
|
238
|
-
}
|
|
239
|
-
node.setHighlight(this.highlightRegExp);
|
|
240
|
-
hadUpdates = true;
|
|
241
|
-
}
|
|
242
|
-
if (hadUpdates) {
|
|
243
|
-
this.dataGrid.dispatchEventToListeners(DataGrid.DataGrid.Events.SORTING_CHANGED);
|
|
244
|
-
}
|
|
192
|
+
set highlightRegExp(highlightRegExp: RegExp|null) {
|
|
193
|
+
this.#highlightRegExp = highlightRegExp;
|
|
194
|
+
this.requestUpdate();
|
|
245
195
|
}
|
|
246
196
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
const sourceNode = this.nodeForUrl.get(coverageInfo.url);
|
|
250
|
-
if (sourceNode) {
|
|
251
|
-
sourceNode.refreshIfNeeded(maxSize, coverageInfo);
|
|
252
|
-
} else {
|
|
253
|
-
const sourceNode = new GridNode(coverageInfo, maxSize);
|
|
254
|
-
node.appendChild(sourceNode);
|
|
255
|
-
this.nodeForUrl.set(coverageInfo.url, sourceNode);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
197
|
+
get highlightRegExp(): RegExp|null {
|
|
198
|
+
return this.#highlightRegExp;
|
|
258
199
|
}
|
|
259
200
|
|
|
260
|
-
|
|
261
|
-
this
|
|
262
|
-
this.
|
|
201
|
+
set coverageInfo(coverageInfo: CoverageListItem[]) {
|
|
202
|
+
this.#coverageInfo = coverageInfo;
|
|
203
|
+
this.#maxSize = coverageInfo.reduce((acc, entry) => Math.max(acc, entry.size), 0);
|
|
204
|
+
this.requestUpdate();
|
|
263
205
|
}
|
|
264
206
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const parentNode = this.nodeForUrl.get(node.coverageInfo.generatedUrl);
|
|
268
|
-
parentNode?.appendChild(node);
|
|
269
|
-
} else {
|
|
270
|
-
this.dataGrid.rootNode().appendChild(node);
|
|
271
|
-
}
|
|
207
|
+
get coverageInfo(): CoverageListItem[] {
|
|
208
|
+
return this.#coverageInfo;
|
|
272
209
|
}
|
|
273
210
|
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
211
|
+
override performUpdate(): void {
|
|
212
|
+
const input: ViewInput = {
|
|
213
|
+
items: this.#coverageInfo,
|
|
214
|
+
selectedUrl: this.#selectedUrl,
|
|
215
|
+
maxSize: this.#maxSize,
|
|
216
|
+
onOpen: (url: Platform.DevToolsPath.UrlString) => {
|
|
217
|
+
this.selectedUrl = url;
|
|
218
|
+
},
|
|
219
|
+
highlightRegExp: this.#highlightRegExp,
|
|
220
|
+
};
|
|
221
|
+
this.#view(input, {}, this.contentElement);
|
|
279
222
|
}
|
|
280
223
|
|
|
281
|
-
|
|
282
|
-
|
|
224
|
+
reset(): void {
|
|
225
|
+
this.#coverageInfo = [];
|
|
226
|
+
this.#maxSize = 0;
|
|
227
|
+
this.requestUpdate();
|
|
283
228
|
}
|
|
284
229
|
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
if (!
|
|
230
|
+
set selectedUrl(url: Platform.DevToolsPath.UrlString|null) {
|
|
231
|
+
const info = this.#coverageInfo.find(info => info.url === url);
|
|
232
|
+
if (!info) {
|
|
288
233
|
return;
|
|
289
234
|
}
|
|
290
|
-
|
|
291
|
-
|
|
235
|
+
if (this.#selectedUrl !== url) {
|
|
236
|
+
this.#selectedUrl = url as Platform.DevToolsPath.UrlString;
|
|
237
|
+
this.requestUpdate();
|
|
238
|
+
}
|
|
239
|
+
const sourceCode = url ? Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(url) : null;
|
|
292
240
|
if (!sourceCode) {
|
|
293
241
|
return;
|
|
294
242
|
}
|
|
295
243
|
|
|
296
|
-
if (this.dataGrid.selectedNode !== node) {
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
244
|
void Common.Revealer.reveal(sourceCode);
|
|
300
245
|
}
|
|
246
|
+
|
|
247
|
+
get selectedUrl(): Platform.DevToolsPath.UrlString|null {
|
|
248
|
+
return this.#selectedUrl;
|
|
249
|
+
}
|
|
301
250
|
}
|
|
302
251
|
|
|
303
252
|
let percentageFormatter: Intl.NumberFormat|null = null;
|
|
@@ -321,148 +270,63 @@ function getBytesFormatter(): Intl.NumberFormat {
|
|
|
321
270
|
return bytesFormatter;
|
|
322
271
|
}
|
|
323
272
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
private maxSize: number;
|
|
329
|
-
private highlightRegExp: RegExp|null;
|
|
330
|
-
|
|
331
|
-
constructor(coverageInfo: CoverageListItem, maxSize: number) {
|
|
332
|
-
super();
|
|
333
|
-
this.coverageInfo = coverageInfo;
|
|
334
|
-
this.url = coverageInfo.url;
|
|
335
|
-
this.maxSize = maxSize;
|
|
336
|
-
this.highlightRegExp = null;
|
|
337
|
-
this.#updateData(coverageInfo);
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
#updateData(coverageInfo: CoverageListItem): void {
|
|
341
|
-
this.data['url'] = this.url;
|
|
342
|
-
this.data['type'] = coverageTypeToString(coverageInfo.type);
|
|
343
|
-
this.data['size'] = coverageInfo.size;
|
|
344
|
-
this.data['unused-size'] = coverageInfo.unusedSize;
|
|
345
|
-
this.data['bars'] = coverageInfo.unusedSize;
|
|
346
|
-
this.coverageInfo = coverageInfo;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
setHighlight(highlightRegExp: RegExp|null): void {
|
|
350
|
-
if (this.highlightRegExp === highlightRegExp) {
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
this.highlightRegExp = highlightRegExp;
|
|
354
|
-
for (const child of this.children) {
|
|
355
|
-
(child as GridNode).setHighlight(this.highlightRegExp);
|
|
356
|
-
}
|
|
357
|
-
this.refresh();
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
refreshIfNeeded(maxSize: number, coverageInfo: CoverageListItem): boolean {
|
|
361
|
-
if (this.lastUsedSize === coverageInfo.usedSize && maxSize === this.maxSize) {
|
|
362
|
-
return false;
|
|
363
|
-
}
|
|
364
|
-
this.lastUsedSize = coverageInfo.usedSize;
|
|
365
|
-
this.maxSize = maxSize;
|
|
366
|
-
this.refresh();
|
|
367
|
-
this.#updateData(coverageInfo);
|
|
368
|
-
return true;
|
|
273
|
+
function renderItem(info: CoverageListItem, input: ViewInput): TemplateResult {
|
|
274
|
+
function highlightRange(textContent: string): string {
|
|
275
|
+
const matches = input.highlightRegExp?.exec(textContent);
|
|
276
|
+
return matches?.length ? `${matches.index},${matches[0].length}` : '';
|
|
369
277
|
}
|
|
370
278
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
break;
|
|
410
|
-
}
|
|
411
|
-
case 'unused-size': {
|
|
412
|
-
this.setCellAccessibleName(
|
|
413
|
-
i18nString(UIStrings.sBytesS, {n: info.unusedSize, percentage: formatPercent(info.unusedPercentage)}), cell,
|
|
414
|
-
columnId);
|
|
415
|
-
// clang-format off
|
|
416
|
-
render(html`
|
|
417
|
-
<span>${formatBytes(info.unusedSize)}</span>
|
|
418
|
-
<span class="percent-value">
|
|
419
|
-
${formatPercent(info.unusedPercentage)}
|
|
420
|
-
</span>`, cell);
|
|
421
|
-
// clang-format on
|
|
422
|
-
break;
|
|
423
|
-
}
|
|
424
|
-
case 'bars': {
|
|
425
|
-
this.setCellAccessibleName(
|
|
426
|
-
i18nString(
|
|
427
|
-
UIStrings.sOfFileUnusedSOfFileUsed,
|
|
428
|
-
{PH1: formatPercent(info.unusedPercentage), PH2: formatPercent(info.usedPercentage)}),
|
|
429
|
-
cell, columnId);
|
|
430
|
-
// clang-format off
|
|
431
|
-
render(html`
|
|
432
|
-
<div class="bar-container">
|
|
433
|
-
${info.unusedSize > 0 ? html`
|
|
434
|
-
<div class="bar bar-unused-size"
|
|
435
|
-
title=${
|
|
436
|
-
info.type & CoverageType.JAVA_SCRIPT_PER_FUNCTION ? i18nString(UIStrings.sBytesSBelongToFunctionsThatHave, {PH1: info.unusedSize, PH2: formatPercent(info.unusedPercentage)}) :
|
|
437
|
-
info.type & CoverageType.JAVA_SCRIPT ? i18nString(UIStrings.sBytesSBelongToBlocksOf, {PH1: info.unusedSize, PH2: formatPercent(info.unusedPercentage)}) :
|
|
438
|
-
''}
|
|
439
|
-
style=${styleMap({width: ((info.unusedSize / this.maxSize) * 100 || 0) + '%'})}>
|
|
440
|
-
</div>` : nothing}
|
|
441
|
-
${info.usedSize > 0 ? html`
|
|
279
|
+
const splitURL = /^(.*)(\/[^/]*)$/.exec(info.url);
|
|
280
|
+
// clang-format off
|
|
281
|
+
return html`
|
|
282
|
+
<style>${coverageListViewStyles}</style>
|
|
283
|
+
<tr data-url=${info.url} selected=${info.url === input.selectedUrl}
|
|
284
|
+
@open=${() => input.onOpen(info.url)}>
|
|
285
|
+
<td data-value=${info.url} title=${info.url} aria-label=${info.url}>
|
|
286
|
+
<devtools-highlight ranges=${highlightRange(info.url)} class="url-outer" aria-hidden="true">
|
|
287
|
+
<div class="url-prefix">${splitURL ? splitURL[1] : info.url}</div>
|
|
288
|
+
<div class="url-suffix">${splitURL ? splitURL[2] : ''}</div>
|
|
289
|
+
</devtools-highlight>
|
|
290
|
+
</td>
|
|
291
|
+
<td data-value=${coverageTypeToString(info.type)}
|
|
292
|
+
title=${info.type & CoverageType.JAVA_SCRIPT_PER_FUNCTION ? i18nString(UIStrings.jsCoverageWithPerFunction) :
|
|
293
|
+
info.type & CoverageType.JAVA_SCRIPT ? i18nString(UIStrings.jsCoverageWithPerBlock) :
|
|
294
|
+
''}>
|
|
295
|
+
${coverageTypeToString(info.type)}
|
|
296
|
+
</td>
|
|
297
|
+
<td data-value=${info.size} aria-label=${i18nString(UIStrings.sBytes, {n: info.size || 0})}>
|
|
298
|
+
<span>${formatBytes(info.size)}</span>
|
|
299
|
+
</td>
|
|
300
|
+
<td data-value=${info.unusedSize} aria-label=${i18nString(UIStrings.sBytesS, {n: info.unusedSize, percentage: formatPercent(info.unusedPercentage)})}>
|
|
301
|
+
<span>${formatBytes(info.unusedSize)}</span>
|
|
302
|
+
<span class="percent-value">
|
|
303
|
+
${formatPercent(info.unusedPercentage)}
|
|
304
|
+
</span>
|
|
305
|
+
</td>
|
|
306
|
+
<td data-value=${info.unusedSize} aria-label=${i18nString(UIStrings.sOfFileUnusedSOfFileUsed, {PH1: formatPercent(info.unusedPercentage), PH2: formatPercent(info.usedPercentage)})}>
|
|
307
|
+
<div class="bar-container">
|
|
308
|
+
${info.unusedSize > 0 ? html`
|
|
309
|
+
<div class="bar bar-unused-size"
|
|
310
|
+
title=${
|
|
311
|
+
info.type & CoverageType.JAVA_SCRIPT_PER_FUNCTION ? i18nString(UIStrings.sBytesSBelongToFunctionsThatHave, {PH1: info.unusedSize, PH2: formatPercent(info.unusedPercentage)}) :
|
|
312
|
+
info.type & CoverageType.JAVA_SCRIPT ? i18nString(UIStrings.sBytesSBelongToBlocksOf, {PH1: info.unusedSize, PH2: formatPercent(info.unusedPercentage)}) :
|
|
313
|
+
''}
|
|
314
|
+
style=${styleMap({width: ((info.unusedSize / input.maxSize) * 100 || 0) + '%'})}>
|
|
315
|
+
</div>` : nothing}
|
|
316
|
+
${info.usedSize > 0 ? html`
|
|
442
317
|
<div class="bar bar-used-size"
|
|
443
318
|
title=${
|
|
444
319
|
info.type & CoverageType.JAVA_SCRIPT_PER_FUNCTION ? i18nString(UIStrings.sBytesSBelongToFunctionsThatHaveExecuted, {PH1: info.usedSize, PH2: formatPercent(info.usedPercentage)}) :
|
|
445
320
|
info.type & CoverageType.JAVA_SCRIPT ? i18nString(UIStrings.sBytesSBelongToBlocksOfJavascript, {PH1: info.usedSize, PH2: formatPercent(info.usedPercentage)}) :
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
style=${styleMap({width:((info.usedSize / this.maxSize) * 100 || 0) + '%'})}>
|
|
321
|
+
''}
|
|
322
|
+
style=${styleMap({width:((info.usedSize / input.maxSize) * 100 || 0) + '%'})}>
|
|
449
323
|
</div>` : nothing}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
if (!this.highlightRegExp) {
|
|
459
|
-
return;
|
|
460
|
-
}
|
|
461
|
-
const matches = this.highlightRegExp.exec(textContent);
|
|
462
|
-
if (!matches?.length) {
|
|
463
|
-
return;
|
|
464
|
-
}
|
|
465
|
-
const range = new TextUtils.TextRange.SourceRange(matches.index, matches[0].length);
|
|
466
|
-
UI.UIUtils.highlightRangesWithStyleClass(element, [range], 'filter-highlight');
|
|
467
|
-
}
|
|
324
|
+
</div>
|
|
325
|
+
</td>
|
|
326
|
+
${info.sources.length > 0 ? html`
|
|
327
|
+
<td><table>
|
|
328
|
+
${repeat(info.sources, source => source.url, source => renderItem(source, input))}
|
|
329
|
+
</table></td>` : nothing}
|
|
330
|
+
</tr>`;
|
|
331
|
+
// clang-format on
|
|
468
332
|
}
|