chrome-devtools-frontend 1.0.1689415 → 1.0.1690531
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/.gitmodules +4 -0
- package/eslint.config.mjs +8 -2
- package/front_end/core/common/Object.ts +10 -4
- package/front_end/core/i18n/collect-ui-strings.js +5 -5
- package/front_end/core/i18n/generate-locales-js.js +1 -1
- package/front_end/core/i18n/i18n.ts +6 -0
- package/front_end/core/root/Runtime.ts +1 -5
- package/front_end/core/sdk/CSSMetadata.ts +3 -5
- package/front_end/core/sdk/DOMModel.ts +46 -11
- package/front_end/core/sdk/EmulationModel.ts +18 -0
- package/front_end/core/sdk/NetworkRequest.ts +50 -4
- package/front_end/core/sdk/NetworkRequestAccess.ts +172 -0
- package/front_end/core/sdk/SDKSettings.ts +9 -0
- package/front_end/core/sdk/Script.ts +0 -1
- package/front_end/core/sdk/SecurityOrigin.ts +160 -25
- package/front_end/core/sdk/Target.ts +1 -5
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/generated/SupportedCSSProperties.ts +1 -1
- package/front_end/models/ai_assistance/AiAgent2.ts +4 -1
- package/front_end/models/ai_assistance/AiConversation.ts +29 -18
- package/front_end/models/ai_assistance/AiUtils.ts +0 -10
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +6 -10
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -1
- package/front_end/models/ai_assistance/injected.ts +0 -2
- package/front_end/models/javascript_metadata/NativeFunctions.ts +1 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +1 -2
- package/front_end/models/trace/insights/Cache.ts +1 -3
- package/front_end/models/trace/insights/CharacterSet.ts +1 -3
- package/front_end/models/trace/insights/DOMSize.ts +1 -3
- package/front_end/models/trace/insights/DocumentLatency.ts +1 -3
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -3
- package/front_end/models/trace/insights/FontDisplay.ts +1 -2
- package/front_end/models/trace/insights/ForcedReflow.ts +1 -2
- package/front_end/models/trace/insights/INPBreakdown.ts +1 -3
- package/front_end/models/trace/insights/ImageDelivery.ts +1 -3
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -3
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -3
- package/front_end/models/trace/insights/LegacyJavaScript.ts +1 -3
- package/front_end/models/trace/insights/ModernHTTP.ts +1 -2
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -2
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -3
- package/front_end/models/trace/insights/SlowCSSSelector.ts +1 -3
- package/front_end/models/trace/insights/ThirdParties.ts +1 -3
- package/front_end/models/trace/insights/Viewport.ts +1 -2
- package/front_end/panels/accessibility/ARIAAttributesView.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +3 -3
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -2
- package/front_end/panels/accessibility/AccessibilityStrings.ts +7 -3
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -2
- package/front_end/panels/ai_assistance/components/AccessibilityAgentMarkdownRenderer.ts +1 -3
- package/front_end/panels/ai_assistance/components/chatMessage.css +3 -1
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/AnimationUI.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +6 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -4
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +1 -1
- package/front_end/panels/application/IndexedDBViews.ts +3 -2
- package/front_end/panels/application/ReportingApiTreeElement.ts +1 -1
- package/front_end/panels/application/ReportingApiView.ts +2 -2
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
- package/front_end/panels/application/StorageItemsToolbar.ts +6 -2
- package/front_end/panels/application/StorageView.ts +9 -8
- package/front_end/panels/application/TrustTokensTreeElement.ts +1 -1
- package/front_end/panels/application/WebMCPView.ts +2 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +1 -1
- package/front_end/panels/application/components/CrashReportContextGrid.ts +1 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +3 -2
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ReportsGrid.ts +1 -1
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +2 -2
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -1
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +7 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +2 -0
- package/front_end/panels/autofill/AutofillView.ts +2 -2
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
- package/front_end/panels/changes/ChangesSidebar.ts +56 -15
- package/front_end/panels/changes/ChangesView.ts +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +12 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionView.ts +2 -1
- package/front_end/panels/console/ConsolePinPane.ts +4 -2
- package/front_end/panels/console/ConsolePrompt.ts +6 -2
- package/front_end/panels/console/ConsoleSidebar.ts +12 -4
- package/front_end/panels/console/PromptBuilder.ts +1 -1
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageModel.ts +6 -4
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -9
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +3 -3
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +16 -3
- package/front_end/panels/elements/ElementsTreeOutline.ts +402 -130
- package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PropertyNameCategories.ts +1 -1
- package/front_end/panels/elements/PropertyRenderer.ts +22 -15
- package/front_end/panels/elements/ShortcutTreeElement.ts +2 -1
- package/front_end/panels/elements/StandaloneStylesContainer.ts +7 -3
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +75 -26
- package/front_end/panels/elements/StylesSidebarPane.ts +9 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +160 -148
- package/front_end/panels/elements/elementsTreeOutline.css +4 -0
- package/front_end/panels/emulation/DeviceModeView.ts +6 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +6 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +2 -1
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +6 -2
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +7 -2
- package/front_end/panels/layer_viewer/Layers3DView.ts +8 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +6 -2
- package/front_end/panels/lighthouse/lighthousePanel.css +5 -5
- package/front_end/panels/lighthouse/lighthouseStartView.css +13 -13
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +6 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +6 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryNavigator.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +5 -5
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +2 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +6 -2
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +25 -54
- package/front_end/panels/network/NetworkDataGridNode.ts +11 -9
- package/front_end/panels/network/NetworkLogView.ts +12 -4
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +1 -1
- package/front_end/panels/network/RequestResponseView.ts +1 -1
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
- package/front_end/panels/network/components/RequestHeadersView.css +5 -0
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/network/networkLogView.css +4 -0
- package/front_end/panels/network/requestInitiatorViewTree.css +2 -0
- package/front_end/panels/performance_monitor/performanceMonitor.css +3 -3
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +7 -2
- package/front_end/panels/profiler/HeapProfileView.ts +7 -2
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +8 -4
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +8 -4
- package/front_end/panels/profiler/HeapSnapshotView.ts +15 -6
- package/front_end/panels/profiler/HeapTimelineOverview.ts +6 -2
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +12 -5
- package/front_end/panels/profiler/ProfileLauncherView.ts +6 -2
- package/front_end/panels/profiler/profilesPanel.css +8 -9
- package/front_end/panels/profiler/profilesSidebarTree.css +13 -13
- package/front_end/panels/protocol_monitor/JSONEditor.css +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +6 -1
- package/front_end/panels/protocol_monitor/protocolMonitor.css +2 -2
- package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -6
- package/front_end/panels/sources/ProfilePlugin.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/SourcesView.ts +7 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +6 -2
- package/front_end/panels/sources/UISourceCodeFrame.ts +10 -3
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/AnnotationHelpers.ts +9 -9
- package/front_end/panels/timeline/CountersGraph.ts +8 -8
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/ExtensionTrackAppender.ts +1 -1
- package/front_end/panels/timeline/GPUTrackAppender.ts +1 -1
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/IsolateSelector.ts +3 -3
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +4 -4
- package/front_end/panels/timeline/NetworkTrackAppender.ts +2 -2
- package/front_end/panels/timeline/StatusDialog.ts +5 -6
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +4 -4
- package/front_end/panels/timeline/ThreadAppender.ts +12 -14
- package/front_end/panels/timeline/TimelineController.ts +5 -8
- package/front_end/panels/timeline/TimelineDetailsView.ts +13 -9
- package/front_end/panels/timeline/TimelineEventOverview.ts +4 -4
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +18 -18
- package/front_end/panels/timeline/TimelineFlameChartView.ts +8 -3
- package/front_end/panels/timeline/TimelineHistoryManager.ts +9 -9
- package/front_end/panels/timeline/TimelineLoader.ts +1 -1
- package/front_end/panels/timeline/TimelineMiniMap.ts +7 -2
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +7 -3
- package/front_end/panels/timeline/TimelinePanel.ts +60 -62
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +27 -27
- package/front_end/panels/timeline/TimelineTreeView.ts +47 -45
- package/front_end/panels/timeline/TimelineUIUtils.ts +146 -120
- package/front_end/panels/timeline/TimingsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TrackConfigBanner.ts +4 -4
- package/front_end/panels/timeline/UIDevtoolsUtils.ts +15 -15
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +25 -24
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +4 -3
- package/front_end/panels/timeline/components/Sidebar.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -3
- package/front_end/panels/timeline/components/insights/Table.ts +1 -1
- package/front_end/panels/timeline/enable-easter-egg.js +1 -1
- package/front_end/panels/timeline/timeline-meta.ts +30 -30
- package/front_end/panels/timeline/timelineFlameChartView.css +10 -10
- package/front_end/panels/timeline/timelineFlamechartPopover.css +5 -5
- package/front_end/panels/timeline/timelineHistoryManager.css +7 -7
- package/front_end/panels/timeline/timelinePaintProfiler.css +2 -2
- package/front_end/panels/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/timeline/utils/IgnoreList.ts +4 -4
- package/front_end/panels/timeline/utils/ImageCache.ts +5 -3
- package/front_end/panels/web_audio/WebAudioView.ts +3 -3
- package/front_end/panels/webauthn/WebauthnPane.ts +5 -11
- package/front_end/third_party/acorn/acorn.ts +3 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/chromium/ahem/ahem.d.ts +1 -0
- package/front_end/third_party/csp_evaluator/package/csp.ts +4 -4
- package/front_end/third_party/csp_evaluator/package/parser.ts +3 -1
- package/front_end/third_party/csp_evaluator/package/utils.ts +1 -1
- package/front_end/third_party/diff/diff_match_patch.d.ts +10 -0
- package/front_end/third_party/json5/json5.ts +2 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +12 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +9 -1
- package/front_end/ui/components/buttons/Button.docs.ts +1 -1
- package/front_end/ui/components/buttons/button.css +21 -0
- package/front_end/ui/components/buttons/floatingButton.css +25 -0
- package/front_end/ui/components/report_view/ReportView.docs.ts +1 -1
- package/front_end/ui/components/snackbars/Snackbars.docs.ts +1 -1
- package/front_end/ui/components/spinners/Spinner.ts +1 -1
- package/front_end/ui/components/spinners/Spinners.docs.ts +1 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +46 -27
- package/front_end/ui/components/switch/Switch.docs.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +10 -8
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +2 -1
- package/front_end/ui/components/text_editor/ExecutionPositionHighlighter.ts +2 -2
- package/front_end/ui/components/text_editor/TextEditor.ts +19 -0
- package/front_end/ui/components/text_editor/config.ts +109 -96
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +1 -1
- package/front_end/ui/components/text_editor/theme.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.docs.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
- package/front_end/ui/components/tree_outline/TreeOutlineUtils.ts +4 -1
- package/front_end/ui/kit/cards/Card.ts +1 -1
- package/front_end/ui/kit/icons/Icon.ts +1 -1
- package/front_end/ui/kit/link/Link.docs.ts +1 -1
- package/front_end/ui/kit/link/Link.ts +1 -1
- package/front_end/ui/legacy/ContextMenu.docs.ts +1 -1
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/Dialog.ts +10 -2
- package/front_end/ui/legacy/DropTarget.ts +6 -1
- package/front_end/ui/legacy/EmptyWidget.ts +1 -1
- package/front_end/ui/legacy/FilterBar.ts +6 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/RadioButton.docs.ts +1 -1
- package/front_end/ui/legacy/SelectMenu.docs.ts +1 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +2 -2
- package/front_end/ui/legacy/Slider.docs.ts +1 -1
- package/front_end/ui/legacy/SplitWidget.ts +7 -2
- package/front_end/ui/legacy/StackedPane.ts +1 -1
- package/front_end/ui/legacy/TabbedPane.ts +5 -1
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +13 -37
- package/front_end/ui/legacy/UIUtils.ts +6 -3
- package/front_end/ui/legacy/ViewManager.ts +1 -1
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +13 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -2
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +6 -2
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +54 -45
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +6 -2
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +141 -106
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -10
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -0
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +6 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +6 -2
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -4
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +7 -5
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +8 -3
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +6 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +15 -7
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
- package/front_end/ui/legacy/inspectorCommon.css +11 -0
- package/front_end/ui/visual_logging/Debugging.ts +2 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -1
- package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
- package/front_end/ui/visual_logging/LoggingEvents.ts +5 -5
- package/front_end/ui/visual_logging/LoggingState.ts +1 -1
- package/front_end/ui/visual_logging/visual_logging.ts +67 -56
- package/package.json +3 -2
- package/front_end/third_party/acorn/acorn-tsconfig.json +0 -12
- package/front_end/third_party/acorn/estree-tsconfig.json +0 -8
- package/front_end/third_party/chromium/client-variations/client-variations-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-legacy-types-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +0 -15
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
- package/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
- package/front_end/third_party/json5/json5-tsconfig.json +0 -8
- package/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +0 -11
- package/front_end/third_party/lighthouse/report/bundle-tsconfig.json +0 -8
- package/front_end/third_party/lit/lit-tsconfig.json +0 -15
- package/front_end/third_party/marked/marked-tsconfig.json +0 -8
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +0 -191
- package/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
- package/front_end/third_party/wasmparser/wasmparser-tsconfig.json +0 -9
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -47
|
@@ -37,7 +37,7 @@ const UIStrings = {
|
|
|
37
37
|
prefetchFallbackReady: 'Prefetch fallback ready',
|
|
38
38
|
} as const;
|
|
39
39
|
const str_ = i18n.i18n.registerUIStrings('panels/application/preloading/components/PreloadingGrid.ts', UIStrings);
|
|
40
|
-
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
40
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
41
41
|
|
|
42
42
|
const {render, html, nothing, Directives: {styleMap}} = Lit;
|
|
43
43
|
|
|
@@ -79,7 +79,8 @@ export class RuleSetDetailsView extends UI.Widget.VBox {
|
|
|
79
79
|
#ruleSet: RuleSet|null = null;
|
|
80
80
|
#shouldPrettyPrint = true;
|
|
81
81
|
|
|
82
|
-
constructor(element?: HTMLElement,
|
|
82
|
+
constructor(element?: HTMLElement,
|
|
83
|
+
view: (input: ViewInput|null, _output: object, target: HTMLElement) => void = DEFAULT_VIEW) {
|
|
83
84
|
super(element, {useShadowDom: true});
|
|
84
85
|
this.#view = view;
|
|
85
86
|
}
|
|
@@ -49,7 +49,7 @@ const UIStrings = {
|
|
|
49
49
|
buttonRevealPreloadsAssociatedWithRuleSet: 'Reveal speculative loads associated with this rule set',
|
|
50
50
|
} as const;
|
|
51
51
|
const str_ = i18n.i18n.registerUIStrings('panels/application/preloading/components/RuleSetGrid.ts', UIStrings);
|
|
52
|
-
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
52
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
53
53
|
|
|
54
54
|
export interface RuleSetGridData {
|
|
55
55
|
rows: RuleSetGridRow[];
|
|
@@ -169,7 +169,12 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
/** Grid component to show SpeculationRules rule sets. **/
|
|
172
|
-
|
|
172
|
+
const RuleSetGridBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Widget.VBox> =
|
|
173
|
+
Common.ObjectWrapper.eventMixin(
|
|
174
|
+
UI.Widget.VBox,
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
export class RuleSetGrid extends RuleSetGridBase {
|
|
173
178
|
readonly #view: View;
|
|
174
179
|
#data: RuleSetGridData|null = null;
|
|
175
180
|
|
|
@@ -425,7 +425,7 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
425
425
|
export class UsedPreloadingView extends UI.Widget.VBox {
|
|
426
426
|
readonly #view: View;
|
|
427
427
|
|
|
428
|
-
constructor(view = DEFAULT_VIEW) {
|
|
428
|
+
constructor(view: View = DEFAULT_VIEW) {
|
|
429
429
|
super({useShadowDom: true});
|
|
430
430
|
this.#view = view;
|
|
431
431
|
}
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
|
|
57
57
|
.service-worker-update-timing-bar-clickable:focus-visible {
|
|
58
58
|
background-color: var(--sys-color-state-focus-highlight);
|
|
59
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
60
|
+
outline-offset: calc(-1 * var(--sys-size-2));
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
.service-worker-update-timing-bar-clickable[aria-checked="true"]::before {
|
|
@@ -103,7 +103,7 @@ const AUTOFILL_INFO_URL = 'https://goo.gle/devtools-autofill-panel' as Platform.
|
|
|
103
103
|
const AUTOFILL_FEEDBACK_URL = 'https://crbug.com/329106326' as Platform.DevToolsPath.UrlString;
|
|
104
104
|
|
|
105
105
|
const str_ = i18n.i18n.registerUIStrings('panels/autofill/AutofillView.ts', UIStrings);
|
|
106
|
-
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
106
|
+
export const i18nString: i18n.LocalizeString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
107
107
|
|
|
108
108
|
interface ViewInput {
|
|
109
109
|
autoOpenViewSetting: Common.Settings.Setting<boolean>;
|
|
@@ -298,7 +298,7 @@ export class AutofillView extends UI.Widget.VBox {
|
|
|
298
298
|
#matches: AutofillManager.AutofillManager.Match[] = [];
|
|
299
299
|
#highlightedMatches: AutofillManager.AutofillManager.Match[] = [];
|
|
300
300
|
|
|
301
|
-
constructor(autofillManager: AutofillManager.AutofillManager.AutofillManager, view = DEFAULT_VIEW) {
|
|
301
|
+
constructor(autofillManager: AutofillManager.AutofillManager.AutofillManager, view: View = DEFAULT_VIEW) {
|
|
302
302
|
super({useShadowDom: true});
|
|
303
303
|
this.#autofillManager = autofillManager;
|
|
304
304
|
this.#view = view;
|
|
@@ -262,9 +262,8 @@ export abstract class CategorizedBreakpointsSidebarPane extends UI.Widget.VBox<S
|
|
|
262
262
|
#filterText: string|null = null;
|
|
263
263
|
#view: View;
|
|
264
264
|
#selectedItem: SDK.CategorizedBreakpoint.Category|SDK.CategorizedBreakpoint.CategorizedBreakpoint|null = null;
|
|
265
|
-
constructor(
|
|
266
|
-
|
|
267
|
-
view = DEFAULT_VIEW) {
|
|
265
|
+
constructor(breakpoints: SDK.CategorizedBreakpoint.CategorizedBreakpoint[], jslog: string, viewId: string,
|
|
266
|
+
view: View = DEFAULT_VIEW) {
|
|
268
267
|
super({useShadowDom: 'pure'});
|
|
269
268
|
this.#view = view;
|
|
270
269
|
this.#jslog = jslog;
|
|
@@ -63,27 +63,39 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
63
63
|
target, {container: {attributes: {jslog: `${VisualLogging.pane('sidebar').track({resize: true})}`}}});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
const ChangesSidebarBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Widget.Widget> =
|
|
67
|
+
Common.ObjectWrapper.eventMixin(
|
|
68
|
+
UI.Widget.Widget,
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
export class ChangesSidebar extends ChangesSidebarBase {
|
|
68
72
|
#workspaceDiff: WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl|null = null;
|
|
69
73
|
readonly #view: View;
|
|
70
74
|
readonly #sourceCodes = new Set<Workspace.UISourceCode.UISourceCode>();
|
|
71
75
|
#selectedUISourceCode: Workspace.UISourceCode.UISourceCode|null = null;
|
|
72
|
-
constructor(target?: HTMLElement, view = DEFAULT_VIEW) {
|
|
76
|
+
constructor(target?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
73
77
|
super(target);
|
|
74
78
|
this.#view = view;
|
|
75
79
|
}
|
|
76
80
|
|
|
77
|
-
set workspaceDiff(
|
|
81
|
+
set workspaceDiff(
|
|
82
|
+
workspaceDiff: WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl,
|
|
83
|
+
) {
|
|
78
84
|
if (this.#workspaceDiff) {
|
|
79
85
|
this.#workspaceDiff.modifiedUISourceCodes().forEach(this.#removeUISourceCode.bind(this));
|
|
80
86
|
this.#workspaceDiff.removeEventListener(
|
|
81
|
-
WorkspaceDiff.WorkspaceDiff.Events.MODIFIED_STATUS_CHANGED,
|
|
87
|
+
WorkspaceDiff.WorkspaceDiff.Events.MODIFIED_STATUS_CHANGED,
|
|
88
|
+
this.uiSourceCodeModifiedStatusChanged,
|
|
89
|
+
this,
|
|
90
|
+
);
|
|
82
91
|
}
|
|
83
92
|
this.#workspaceDiff = workspaceDiff;
|
|
84
93
|
this.#workspaceDiff.modifiedUISourceCodes().forEach(this.#addUISourceCode.bind(this));
|
|
85
94
|
this.#workspaceDiff.addEventListener(
|
|
86
|
-
WorkspaceDiff.WorkspaceDiff.Events.MODIFIED_STATUS_CHANGED,
|
|
95
|
+
WorkspaceDiff.WorkspaceDiff.Events.MODIFIED_STATUS_CHANGED,
|
|
96
|
+
this.uiSourceCodeModifiedStatusChanged,
|
|
97
|
+
this,
|
|
98
|
+
);
|
|
87
99
|
this.requestUpdate();
|
|
88
100
|
}
|
|
89
101
|
|
|
@@ -100,7 +112,9 @@ export class ChangesSidebar extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
100
112
|
this.#view(input, {}, this.contentElement);
|
|
101
113
|
}
|
|
102
114
|
|
|
103
|
-
#selectionChanged(
|
|
115
|
+
#selectionChanged(
|
|
116
|
+
selectedUISourceCode: Workspace.UISourceCode.UISourceCode|null,
|
|
117
|
+
): void {
|
|
104
118
|
this.#selectedUISourceCode = selectedUISourceCode;
|
|
105
119
|
this.dispatchEventToListeners(Events.SELECTED_UI_SOURCE_CODE_CHANGED);
|
|
106
120
|
this.requestUpdate();
|
|
@@ -108,16 +122,40 @@ export class ChangesSidebar extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
108
122
|
|
|
109
123
|
#addUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
|
110
124
|
this.#sourceCodes.add(uiSourceCode);
|
|
111
|
-
uiSourceCode.addEventListener(
|
|
112
|
-
|
|
113
|
-
|
|
125
|
+
uiSourceCode.addEventListener(
|
|
126
|
+
Workspace.UISourceCode.Events.TitleChanged,
|
|
127
|
+
this.requestUpdate,
|
|
128
|
+
this,
|
|
129
|
+
);
|
|
130
|
+
uiSourceCode.addEventListener(
|
|
131
|
+
Workspace.UISourceCode.Events.WorkingCopyChanged,
|
|
132
|
+
this.requestUpdate,
|
|
133
|
+
this,
|
|
134
|
+
);
|
|
135
|
+
uiSourceCode.addEventListener(
|
|
136
|
+
Workspace.UISourceCode.Events.WorkingCopyCommitted,
|
|
137
|
+
this.requestUpdate,
|
|
138
|
+
this,
|
|
139
|
+
);
|
|
114
140
|
this.requestUpdate();
|
|
115
141
|
}
|
|
116
142
|
|
|
117
143
|
#removeUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
|
118
|
-
uiSourceCode.removeEventListener(
|
|
119
|
-
|
|
120
|
-
|
|
144
|
+
uiSourceCode.removeEventListener(
|
|
145
|
+
Workspace.UISourceCode.Events.TitleChanged,
|
|
146
|
+
this.requestUpdate,
|
|
147
|
+
this,
|
|
148
|
+
);
|
|
149
|
+
uiSourceCode.removeEventListener(
|
|
150
|
+
Workspace.UISourceCode.Events.WorkingCopyChanged,
|
|
151
|
+
this.requestUpdate,
|
|
152
|
+
this,
|
|
153
|
+
);
|
|
154
|
+
uiSourceCode.removeEventListener(
|
|
155
|
+
Workspace.UISourceCode.Events.WorkingCopyCommitted,
|
|
156
|
+
this.requestUpdate,
|
|
157
|
+
this,
|
|
158
|
+
);
|
|
121
159
|
if (uiSourceCode === this.#selectedUISourceCode) {
|
|
122
160
|
let newSelection;
|
|
123
161
|
for (const sourceCode of this.#sourceCodes.values()) {
|
|
@@ -127,7 +165,9 @@ export class ChangesSidebar extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
127
165
|
newSelection = sourceCode;
|
|
128
166
|
}
|
|
129
167
|
this.#sourceCodes.delete(uiSourceCode);
|
|
130
|
-
this.#selectionChanged(
|
|
168
|
+
this.#selectionChanged(
|
|
169
|
+
newSelection ?? this.#sourceCodes.values().next().value ?? null,
|
|
170
|
+
);
|
|
131
171
|
} else {
|
|
132
172
|
this.#sourceCodes.delete(uiSourceCode);
|
|
133
173
|
}
|
|
@@ -135,7 +175,8 @@ export class ChangesSidebar extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
135
175
|
}
|
|
136
176
|
|
|
137
177
|
private uiSourceCodeModifiedStatusChanged(
|
|
138
|
-
event: Common.EventTarget.EventTargetEvent<WorkspaceDiff.WorkspaceDiff.ModifiedStatusChangedEvent
|
|
178
|
+
event: Common.EventTarget.EventTargetEvent<WorkspaceDiff.WorkspaceDiff.ModifiedStatusChangedEvent>,
|
|
179
|
+
): void {
|
|
139
180
|
const {isModified, uiSourceCode} = event.data;
|
|
140
181
|
if (isModified) {
|
|
141
182
|
this.#addUISourceCode(uiSourceCode);
|
|
@@ -77,7 +77,7 @@ export class ChangesView extends UI.Widget.VBox<ShadowRoot> {
|
|
|
77
77
|
#selectedUISourceCode: Workspace.UISourceCode.UISourceCode|null = null;
|
|
78
78
|
readonly #view: View;
|
|
79
79
|
|
|
80
|
-
constructor(target?: HTMLElement, view = DEFAULT_VIEW) {
|
|
80
|
+
constructor(target?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
81
81
|
super(target, {useShadowDom: 'pure'});
|
|
82
82
|
|
|
83
83
|
this.#workspaceDiff = WorkspaceDiff.WorkspaceDiff.workspaceDiff();
|
|
@@ -66,10 +66,14 @@ function makeFixedPresetThrottlingOption(rate: CPUThrottlingRates): CPUThrottlin
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
export const NoThrottlingOption =
|
|
70
|
-
|
|
71
|
-
export const
|
|
72
|
-
|
|
69
|
+
export const NoThrottlingOption: CPUThrottlingOption =
|
|
70
|
+
makeFixedPresetThrottlingOption(CPUThrottlingRates.NO_THROTTLING);
|
|
71
|
+
export const MidTierThrottlingOption: CPUThrottlingOption =
|
|
72
|
+
makeFixedPresetThrottlingOption(CPUThrottlingRates.MID_TIER_MOBILE);
|
|
73
|
+
export const LowTierThrottlingOption: CPUThrottlingOption =
|
|
74
|
+
makeFixedPresetThrottlingOption(CPUThrottlingRates.LOW_TIER_MOBILE);
|
|
75
|
+
export const ExtraSlowThrottlingOption: CPUThrottlingOption =
|
|
76
|
+
makeFixedPresetThrottlingOption(CPUThrottlingRates.EXTRA_SLOW);
|
|
73
77
|
|
|
74
78
|
function makeCalibratedThrottlingOption(calibratedDeviceType: CalibratedDeviceType): CPUThrottlingOption {
|
|
75
79
|
const getSettingValue = (): number|CalibrationError|null => {
|
|
@@ -109,8 +113,10 @@ function makeCalibratedThrottlingOption(calibratedDeviceType: CalibratedDeviceTy
|
|
|
109
113
|
};
|
|
110
114
|
}
|
|
111
115
|
|
|
112
|
-
export const CalibratedLowTierMobileThrottlingOption =
|
|
113
|
-
|
|
116
|
+
export const CalibratedLowTierMobileThrottlingOption: CPUThrottlingOption =
|
|
117
|
+
makeCalibratedThrottlingOption('low-tier-mobile');
|
|
118
|
+
export const CalibratedMidTierMobileThrottlingOption: CPUThrottlingOption =
|
|
119
|
+
makeCalibratedThrottlingOption('mid-tier-mobile');
|
|
114
120
|
|
|
115
121
|
export function calibrationErrorToString(error: CalibrationError): string {
|
|
116
122
|
if (error === CalibrationError.DEVICE_TOO_WEAK) {
|
|
@@ -91,7 +91,7 @@ export class DOMNodeLink extends UI.Widget.Widget {
|
|
|
91
91
|
#options: Options|undefined = undefined;
|
|
92
92
|
#view: View;
|
|
93
93
|
|
|
94
|
-
constructor(element?: HTMLElement, node?: SDK.DOMModel.DOMNode, options?: Options, view = DEFAULT_VIEW) {
|
|
94
|
+
constructor(element?: HTMLElement, node?: SDK.DOMModel.DOMNode, options?: Options, view: View = DEFAULT_VIEW) {
|
|
95
95
|
super(element, {useShadowDom: true});
|
|
96
96
|
this.element.classList.remove('vbox');
|
|
97
97
|
this.#node = node;
|
|
@@ -41,7 +41,8 @@ export class ExtensionView extends UI.Widget.Widget {
|
|
|
41
41
|
#frameIndex?: number;
|
|
42
42
|
|
|
43
43
|
#view: typeof DEFAULT_VIEW;
|
|
44
|
-
constructor(server: ExtensionServer, id: string, src: string, className: string,
|
|
44
|
+
constructor(server: ExtensionServer, id: string, src: string, className: string,
|
|
45
|
+
view: (input: ViewInput, output: ViewOutput, target: HTMLElement) => void = DEFAULT_VIEW) {
|
|
45
46
|
super();
|
|
46
47
|
this.#view = view;
|
|
47
48
|
this.#server = server;
|
|
@@ -109,7 +109,8 @@ export class ConsolePinPane extends UI.Widget.VBox {
|
|
|
109
109
|
readonly #pinModel: ConsolePinModel;
|
|
110
110
|
readonly #focusOut: () => void;
|
|
111
111
|
|
|
112
|
-
constructor(focusOut: () => void,
|
|
112
|
+
constructor(focusOut: () => void,
|
|
113
|
+
view: (input: PaneViewInput, _output: object, target: HTMLElement) => void = DEFAULT_PANE_VIEW) {
|
|
113
114
|
super({useShadowDom: true});
|
|
114
115
|
this.#focusOut = focusOut;
|
|
115
116
|
this.#view = view;
|
|
@@ -294,7 +295,8 @@ export class ConsolePinPresenter extends UI.Widget.Widget {
|
|
|
294
295
|
#deletePinIcon!: Buttons.Button.Button;
|
|
295
296
|
readonly #selfXssWarningDisabledSetting: Common.Settings.Setting<boolean>;
|
|
296
297
|
|
|
297
|
-
constructor(element?: HTMLElement,
|
|
298
|
+
constructor(element?: HTMLElement,
|
|
299
|
+
view: (input: ViewInput, output: ViewOutput, target: HTMLElement) => void = DEFAULT_VIEW) {
|
|
298
300
|
super(element);
|
|
299
301
|
this.#view = view;
|
|
300
302
|
|
|
@@ -44,8 +44,12 @@ const UIStrings = {
|
|
|
44
44
|
const str_ = i18n.i18n.registerUIStrings('panels/console/ConsolePrompt.ts', UIStrings);
|
|
45
45
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const ConsolePromptBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Widget.Widget> =
|
|
48
|
+
Common.ObjectWrapper.eventMixin(
|
|
49
|
+
UI.Widget.Widget,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export class ConsolePrompt extends ConsolePromptBase {
|
|
49
53
|
private addCompletionsFromHistory: boolean;
|
|
50
54
|
#history: TextEditor.AutocompleteHistory.AutocompleteHistory;
|
|
51
55
|
private initialText: string;
|
|
@@ -117,7 +117,11 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
export class ConsoleFilterGroup {
|
|
120
|
-
readonly urlGroups
|
|
120
|
+
readonly urlGroups: Map<string|null, {
|
|
121
|
+
filter: ConsoleFilter,
|
|
122
|
+
url: string|null,
|
|
123
|
+
count: number,
|
|
124
|
+
}> = new Map<string|null, {filter: ConsoleFilter, url: string|null, count: number}>();
|
|
121
125
|
messageCount = 0;
|
|
122
126
|
readonly name: GroupName;
|
|
123
127
|
readonly filter: ConsoleFilter;
|
|
@@ -171,8 +175,12 @@ const CONSOLE_API_PARSED_FILTERS = [{
|
|
|
171
175
|
regex: undefined,
|
|
172
176
|
}];
|
|
173
177
|
|
|
174
|
-
|
|
175
|
-
|
|
178
|
+
const ConsoleSidebarBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Widget.VBox<ShadowRoot>> =
|
|
179
|
+
Common.ObjectWrapper.eventMixin(
|
|
180
|
+
UI.Widget.VBox,
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
export class ConsoleSidebar extends ConsoleSidebarBase {
|
|
176
184
|
#view: View;
|
|
177
185
|
readonly #groups = [
|
|
178
186
|
new ConsoleFilterGroup(GroupName.ALL, [], ConsoleFilter.allLevelsFilterValue()),
|
|
@@ -186,7 +194,7 @@ export class ConsoleSidebar extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
186
194
|
Common.Settings.Settings.instance().createSetting<string|null>('console.sidebar-selected-filter', null);
|
|
187
195
|
#selectedFilter = this.#groups.find(group => group.name === this.#selectedFilterSetting.get())?.filter;
|
|
188
196
|
|
|
189
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
197
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
190
198
|
super(element, {
|
|
191
199
|
useShadowDom: 'pure',
|
|
192
200
|
});
|
|
@@ -203,7 +203,7 @@ export function lineWhitespace(line: string): string|null {
|
|
|
203
203
|
|
|
204
204
|
export function formatRelatedCode(
|
|
205
205
|
{text, columnNumber, lineNumber}: {text: string, columnNumber: number, lineNumber: number},
|
|
206
|
-
maxCodeSize = MAX_CODE_SIZE): string {
|
|
206
|
+
maxCodeSize: number = MAX_CODE_SIZE): string {
|
|
207
207
|
const lines = text.split('\n');
|
|
208
208
|
if (lines[lineNumber].length >= maxCodeSize / 2) {
|
|
209
209
|
const start = Math.max(columnNumber - maxCodeSize / 2, 0);
|
|
@@ -189,7 +189,7 @@ export class CoverageListView extends UI.Widget.VBox {
|
|
|
189
189
|
#expandedUrls = new Set<Platform.DevToolsPath.UrlString>();
|
|
190
190
|
#view: View;
|
|
191
191
|
|
|
192
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
192
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
193
193
|
super(element, {useShadowDom: true, delegatesFocus: true});
|
|
194
194
|
this.#view = view;
|
|
195
195
|
this.#highlightRegExp = null;
|
|
@@ -690,7 +690,8 @@ export class URLCoverageInfo extends Common.ObjectWrapper.ObjectWrapper<URLCover
|
|
|
690
690
|
#usedSize: number;
|
|
691
691
|
#type!: CoverageType;
|
|
692
692
|
#isContentScript: boolean;
|
|
693
|
-
sourcesURLCoverageInfo
|
|
693
|
+
sourcesURLCoverageInfo: Map<Platform.DevToolsPath.UrlString, SourceURLCoverageInfo> =
|
|
694
|
+
new Map<Platform.DevToolsPath.UrlString, SourceURLCoverageInfo>();
|
|
694
695
|
sourceSegments: SourceSegment[]|undefined;
|
|
695
696
|
|
|
696
697
|
constructor(url: Platform.DevToolsPath.UrlString) {
|
|
@@ -938,9 +939,10 @@ export class CoverageInfo {
|
|
|
938
939
|
private coverageType: CoverageType;
|
|
939
940
|
private segments: CoverageSegment[];
|
|
940
941
|
private generatedUrlCoverageInfo: URLCoverageInfo;
|
|
941
|
-
sourceUsedSizeMap = new Map<Platform.DevToolsPath.UrlString, number>();
|
|
942
|
-
sourceDeltaMap = new Map<Platform.DevToolsPath.UrlString, number>();
|
|
943
|
-
sourceUsedRangeMap
|
|
942
|
+
sourceUsedSizeMap: Map<Platform.DevToolsPath.UrlString, number> = new Map<Platform.DevToolsPath.UrlString, number>();
|
|
943
|
+
sourceDeltaMap: Map<Platform.DevToolsPath.UrlString, number> = new Map<Platform.DevToolsPath.UrlString, number>();
|
|
944
|
+
sourceUsedRangeMap: Map<Platform.DevToolsPath.UrlString, RangeOffset[]> =
|
|
945
|
+
new Map<Platform.DevToolsPath.UrlString, RangeOffset[]>();
|
|
944
946
|
|
|
945
947
|
constructor(
|
|
946
948
|
contentProvider: TextUtils.ContentProvider.ContentProvider, size: number, lineOffset: number,
|
|
@@ -219,7 +219,7 @@ export interface OverviewData {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
export type FontInfo = Map<string, Map<string, Map<string, number[]>>>;
|
|
222
|
-
interface FontMetric {
|
|
222
|
+
export interface FontMetric {
|
|
223
223
|
label: string;
|
|
224
224
|
values: Array<{title: string, nodes: number[]}>;
|
|
225
225
|
}
|
|
@@ -236,7 +236,7 @@ function getBorderString(color: Common.Color.Color): string {
|
|
|
236
236
|
return `1px solid hsl(${h}deg ${s}% ${l}%)`;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
interface ViewInput {
|
|
239
|
+
export interface ViewInput {
|
|
240
240
|
elementCount: number;
|
|
241
241
|
backgroundColors: string[];
|
|
242
242
|
textColors: string[];
|
|
@@ -253,7 +253,7 @@ interface ViewInput {
|
|
|
253
253
|
onReset: () => void;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
interface ViewOutput {
|
|
256
|
+
export interface ViewOutput {
|
|
257
257
|
revealSection: Map<string, (setFocus: boolean) => void>;
|
|
258
258
|
closeAllTabs: () => void;
|
|
259
259
|
addTab: (id: string, tabTitle: string, view: UI.Widget.Widget, jslogContext: string) => void;
|
|
@@ -261,7 +261,7 @@ interface ViewOutput {
|
|
|
261
261
|
|
|
262
262
|
const formatter = new Intl.NumberFormat('en-US');
|
|
263
263
|
|
|
264
|
-
type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
264
|
+
export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
265
265
|
|
|
266
266
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
267
267
|
function revealSection(section: Element|undefined, setFocus: boolean): void {
|
|
@@ -541,7 +541,7 @@ function renderColor(section: string, color: string): LitTemplate {
|
|
|
541
541
|
// clang-format on
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
type PopulateNodesEvent = {
|
|
544
|
+
export type PopulateNodesEvent = {
|
|
545
545
|
type: 'contrast',
|
|
546
546
|
key: string,
|
|
547
547
|
section: string|undefined,
|
|
@@ -583,7 +583,7 @@ export class CSSOverviewCompletedView extends UI.Widget.VBox {
|
|
|
583
583
|
addTab: (_id, _tabTitle, _view, _jslogContext) => {},
|
|
584
584
|
};
|
|
585
585
|
|
|
586
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
586
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
587
587
|
super(element);
|
|
588
588
|
this.#view = view;
|
|
589
589
|
this.registerRequiredCSS(cssOverviewCompletedViewStyles);
|
|
@@ -879,10 +879,10 @@ export class CSSOverviewCompletedView extends UI.Widget.VBox {
|
|
|
879
879
|
this.requestUpdate();
|
|
880
880
|
}
|
|
881
881
|
|
|
882
|
-
static readonly pushedNodes = new Set<Protocol.DOM.BackendNodeId>();
|
|
882
|
+
static readonly pushedNodes: Set<Protocol.DOM.BackendNodeId> = new Set<Protocol.DOM.BackendNodeId>();
|
|
883
883
|
}
|
|
884
884
|
|
|
885
|
-
interface ElementDetailsViewInput {
|
|
885
|
+
export interface ElementDetailsViewInput {
|
|
886
886
|
items: Array<{
|
|
887
887
|
data: PopulateNodesEventNodeTypes,
|
|
888
888
|
link?: LitTemplate,
|
|
@@ -890,7 +890,7 @@ interface ElementDetailsViewInput {
|
|
|
890
890
|
}>;
|
|
891
891
|
visibility: Set<string>;
|
|
892
892
|
}
|
|
893
|
-
type ElementDetailsViewFunction = (input: ElementDetailsViewInput, output: object, target: HTMLElement) => void;
|
|
893
|
+
export type ElementDetailsViewFunction = (input: ElementDetailsViewInput, output: object, target: HTMLElement) => void;
|
|
894
894
|
|
|
895
895
|
export const ELEMENT_DETAILS_DEFAULT_VIEW: ElementDetailsViewFunction = (input, _output, target) => {
|
|
896
896
|
const {items, visibility} = input;
|
|
@@ -16,7 +16,7 @@ import type {UnusedDeclaration} from './CSSOverviewUnusedDeclarations.js';
|
|
|
16
16
|
|
|
17
17
|
const {widget} = UI.Widget;
|
|
18
18
|
|
|
19
|
-
interface ViewInput {
|
|
19
|
+
export interface ViewInput {
|
|
20
20
|
state: 'start'|'processing'|'completed';
|
|
21
21
|
onStartCapture: () => void;
|
|
22
22
|
onCancel: () => void;
|
|
@@ -25,7 +25,7 @@ interface ViewInput {
|
|
|
25
25
|
target?: SDK.Target.Target;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
28
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
29
29
|
|
|
30
30
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
31
31
|
render(
|
|
@@ -55,7 +55,7 @@ export class CSSOverviewPanel extends UI.Panel.Panel implements SDK.TargetManage
|
|
|
55
55
|
#state!: 'start'|'processing'|'completed';
|
|
56
56
|
#view: View;
|
|
57
57
|
|
|
58
|
-
constructor(view = DEFAULT_VIEW) {
|
|
58
|
+
constructor(view: View = DEFAULT_VIEW) {
|
|
59
59
|
super('css-overview');
|
|
60
60
|
this.#currentUrl = SDK.TargetManager.TargetManager.instance().inspectedURL();
|
|
61
61
|
SDK.TargetManager.TargetManager.instance().addEventListener(
|
|
@@ -18,11 +18,11 @@ const UIStrings = {
|
|
|
18
18
|
const str_ = i18n.i18n.registerUIStrings('panels/css_overview/CSSOverviewProcessingView.ts', UIStrings);
|
|
19
19
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
|
-
interface ViewInput {
|
|
21
|
+
export interface ViewInput {
|
|
22
22
|
onCancel: () => void;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
25
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
26
26
|
|
|
27
27
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
28
28
|
// clang-format off
|
|
@@ -27,14 +27,14 @@ const UIStrings = {
|
|
|
27
27
|
const str_ = i18n.i18n.registerUIStrings('panels/css_overview/CSSOverviewSidebarPanel.ts', UIStrings);
|
|
28
28
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
29
29
|
|
|
30
|
-
interface ViewInput {
|
|
30
|
+
export interface ViewInput {
|
|
31
31
|
items: Array<{name: string, id: string}>;
|
|
32
32
|
selectedId?: string;
|
|
33
33
|
onReset: () => void;
|
|
34
34
|
onItemClick: (id: string) => void;
|
|
35
35
|
onItemKeyDown: (id: string, key: string) => void;
|
|
36
36
|
}
|
|
37
|
-
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
37
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
38
38
|
|
|
39
39
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
40
40
|
const onClick = (event: Event): void => {
|
|
@@ -94,7 +94,7 @@ export class CSSOverviewSidebarPanel extends UI.Widget.VBox {
|
|
|
94
94
|
#onItemSelected = (_id: string, _shouldFocus: boolean): void => {};
|
|
95
95
|
#onReset = (): void => {};
|
|
96
96
|
|
|
97
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
97
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
98
98
|
super(element, {useShadowDom: true, delegatesFocus: true});
|
|
99
99
|
this.#view = view;
|
|
100
100
|
}
|
|
@@ -46,11 +46,11 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
46
46
|
const FEEDBACK_LINK = 'https://g.co/devtools/css-overview-feedback' as Platform.DevToolsPath.UrlString;
|
|
47
47
|
const DOC_LINK = 'https://developer.chrome.com/docs/devtools/css-overview' as Platform.DevToolsPath.UrlString;
|
|
48
48
|
|
|
49
|
-
interface ViewInput {
|
|
49
|
+
export interface ViewInput {
|
|
50
50
|
onStartCapture: () => void;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
53
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
54
54
|
|
|
55
55
|
const DEFAULT_VIEW: View = (input, output, target) => {
|
|
56
56
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
@@ -93,7 +93,7 @@ export class CSSOverviewStartView extends UI.Widget.Widget {
|
|
|
93
93
|
#view: View;
|
|
94
94
|
onStartCapture = (): void => {};
|
|
95
95
|
|
|
96
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
96
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
97
97
|
super(element, {useShadowDom: true, delegatesFocus: true});
|
|
98
98
|
this.#view = view;
|
|
99
99
|
this.performUpdate();
|
|
@@ -183,7 +183,7 @@ export class DeveloperResourcesListView extends UI.Widget.VBox {
|
|
|
183
183
|
#onSelect: ((item: SDK.PageResourceLoader.PageResource|null) => void)|null = null;
|
|
184
184
|
readonly #view: View;
|
|
185
185
|
#filters: TextUtils.TextUtils.ParsedFilter[] = [];
|
|
186
|
-
constructor(element: HTMLElement, view = DEFAULT_VIEW) {
|
|
186
|
+
constructor(element: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
187
187
|
super(element, {useShadowDom: true});
|
|
188
188
|
this.#view = view;
|
|
189
189
|
}
|
|
@@ -344,7 +344,7 @@ export class ComputedStyleWidget extends UI.Widget.VBox {
|
|
|
344
344
|
#filterIsRegex = false;
|
|
345
345
|
#allowUserControl = true;
|
|
346
346
|
|
|
347
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
347
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
348
348
|
super(element, {useShadowDom: true});
|
|
349
349
|
this.#view = view;
|
|
350
350
|
|
|
@@ -1110,7 +1110,8 @@ export interface InitialEditState {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
|
|
1112
1112
|
export class ElementsTreeWidget extends UI.Widget.Widget {
|
|
1113
|
-
static override readonly INJECT
|
|
1113
|
+
static override readonly INJECT: readonly[typeof IssuesManager.DOMIssuesManager.DOMIssuesManager] =
|
|
1114
|
+
[IssuesManager.DOMIssuesManager.DOMIssuesManager] as const;
|
|
1114
1115
|
#domIssuesManager?: IssuesManager.DOMIssuesManager.DOMIssuesManager;
|
|
1115
1116
|
|
|
1116
1117
|
#node!: SDK.DOMModel.DOMNode;
|
|
@@ -1187,6 +1188,18 @@ export class ElementsTreeWidget extends UI.Widget.Widget {
|
|
|
1187
1188
|
|
|
1188
1189
|
#updateRecord: Elements.ElementUpdateRecord.ElementUpdateRecord|null = null;
|
|
1189
1190
|
|
|
1191
|
+
get updateRecord(): Elements.ElementUpdateRecord.ElementUpdateRecord|null {
|
|
1192
|
+
return this.#updateRecord;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
set updateRecord(updateRecord: Elements.ElementUpdateRecord.ElementUpdateRecord|null) {
|
|
1196
|
+
if (this.#updateRecord === updateRecord) {
|
|
1197
|
+
return;
|
|
1198
|
+
}
|
|
1199
|
+
this.#updateRecord = updateRecord;
|
|
1200
|
+
this.requestUpdate();
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1190
1203
|
get node(): SDK.DOMModel.DOMNode {
|
|
1191
1204
|
return this.#node;
|
|
1192
1205
|
}
|
|
@@ -3191,13 +3204,13 @@ export const InitialChildrenLimit = 500;
|
|
|
3191
3204
|
* A union of HTML4 and HTML5-Draft elements that explicitly
|
|
3192
3205
|
* or implicitly (for HTML5) forbid the closing tag.
|
|
3193
3206
|
**/
|
|
3194
|
-
export const ForbiddenClosingTagElements = new Set<string>([
|
|
3207
|
+
export const ForbiddenClosingTagElements: Set<string> = new Set<string>([
|
|
3195
3208
|
'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed', 'frame', 'hr',
|
|
3196
3209
|
'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr',
|
|
3197
3210
|
]);
|
|
3198
3211
|
|
|
3199
3212
|
/** These tags we do not allow editing their tag name. **/
|
|
3200
|
-
export const EditTagBlocklist = new Set<string>(['html', 'head', 'body']);
|
|
3213
|
+
export const EditTagBlocklist: Set<string> = new Set<string>(['html', 'head', 'body']);
|
|
3201
3214
|
|
|
3202
3215
|
export function convertUnicodeCharsToHTMLEntities(text: string): {
|
|
3203
3216
|
text: string,
|