chrome-devtools-frontend 1.0.1512349 → 1.0.1513662
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/cookbook/release_management.md +15 -13
- package/docs/get_the_code.md +114 -35
- package/front_end/core/common/Color.ts +40 -44
- package/front_end/core/common/Console.ts +4 -4
- package/front_end/core/common/ParsedURL.ts +14 -14
- package/front_end/core/common/ResourceType.ts +20 -20
- package/front_end/core/common/SegmentedRange.ts +13 -14
- package/front_end/core/common/Settings.ts +4 -4
- package/front_end/core/common/StringOutputStream.ts +4 -4
- package/front_end/core/host/GdpClient.ts +38 -0
- package/front_end/core/host/InspectorFrontendHost.ts +4 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/host/ResourceLoader.ts +2 -2
- package/front_end/core/host/UserMetrics.ts +0 -2
- package/front_end/core/protocol_client/InspectorBackend.ts +9 -9
- package/front_end/core/root/Runtime.ts +5 -2
- package/front_end/core/sdk/AccessibilityModel.ts +48 -48
- package/front_end/core/sdk/AnimationModel.ts +78 -79
- package/front_end/core/sdk/CPUProfilerModel.ts +5 -5
- package/front_end/core/sdk/CPUThrottlingManager.ts +17 -17
- package/front_end/core/sdk/CSSMatchedStyles.ts +44 -44
- package/front_end/core/sdk/CSSMedia.ts +22 -22
- package/front_end/core/sdk/CSSModel.ts +4 -4
- package/front_end/core/sdk/CSSProperty.ts +9 -9
- package/front_end/core/sdk/CSSPropertyParser.ts +1 -2
- package/front_end/core/sdk/CSSRule.ts +3 -3
- package/front_end/core/sdk/CSSStyleDeclaration.ts +27 -28
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +13 -13
- package/front_end/core/sdk/CategorizedBreakpoint.ts +4 -4
- package/front_end/core/sdk/ChildTargetManager.ts +6 -6
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +4 -4
- package/front_end/core/sdk/ConsoleModel.ts +24 -24
- package/front_end/core/sdk/Cookie.ts +16 -16
- package/front_end/core/sdk/CookieParser.ts +6 -6
- package/front_end/core/sdk/DOMDebuggerModel.ts +88 -89
- package/front_end/core/sdk/DOMModel.ts +113 -113
- package/front_end/core/sdk/DebuggerModel.ts +102 -103
- package/front_end/core/sdk/EmulationModel.ts +6 -6
- package/front_end/core/sdk/EventBreakpointsModel.ts +5 -5
- package/front_end/core/sdk/HeapProfilerModel.ts +5 -5
- package/front_end/core/sdk/IsolateManager.ts +26 -26
- package/front_end/core/sdk/LayerTreeBase.ts +29 -30
- package/front_end/core/sdk/OverlayModel.ts +6 -6
- package/front_end/core/sdk/Resource.ts +43 -43
- package/front_end/core/sdk/ResourceTreeModel.ts +58 -61
- package/front_end/core/sdk/RuntimeModel.ts +12 -13
- package/front_end/core/sdk/SDKModel.ts +3 -3
- package/front_end/core/sdk/Script.ts +17 -17
- package/front_end/core/sdk/SecurityOriginManager.ts +14 -14
- package/front_end/core/sdk/ServerTiming.ts +2 -2
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +15 -15
- package/front_end/core/sdk/ServiceWorkerManager.ts +19 -24
- package/front_end/core/sdk/SourceMap.ts +10 -10
- package/front_end/core/sdk/StorageKeyManager.ts +12 -12
- package/front_end/core/sdk/Target.ts +33 -34
- package/front_end/core/sdk/TargetManager.ts +20 -20
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +8 -8
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +7 -7
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +7 -7
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -24
- package/front_end/entrypoints/main/GlobalAiButton.ts +3 -3
- package/front_end/entrypoints/main/MainImpl.ts +16 -14
- package/front_end/entrypoints/main/main-meta.ts +1 -2
- package/front_end/generated/InspectorBackendCommands.js +3 -2
- package/front_end/generated/SupportedCSSProperties.js +20 -0
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +20 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +15 -16
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +127 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +149 -26
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +6 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +9 -10
- package/front_end/models/badges/AiExplorerBadge.ts +21 -0
- package/front_end/models/badges/Badge.ts +3 -5
- package/front_end/models/badges/CodeWhispererBadge.ts +21 -0
- package/front_end/models/badges/DOMDetectiveBadge.ts +4 -3
- package/front_end/models/badges/SpeedsterBadge.ts +6 -4
- package/front_end/models/badges/StarterBadge.ts +4 -3
- package/front_end/models/badges/UserBadges.ts +29 -3
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +6 -6
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +18 -18
- package/front_end/models/bindings/FileUtils.ts +15 -15
- package/front_end/models/bindings/ResourceScriptMapping.ts +14 -14
- package/front_end/models/elements/ElementUpdateRecord.ts +11 -11
- package/front_end/models/emulation/DeviceModeModel.ts +123 -131
- package/front_end/models/emulation/EmulatedDevices.ts +22 -22
- package/front_end/models/extensions/ExtensionPanel.ts +24 -24
- package/front_end/models/extensions/ExtensionServer.ts +4 -4
- package/front_end/models/javascript_metadata/NativeFunctions.js +14 -2
- package/front_end/models/persistence/IsolatedFileSystem.ts +18 -19
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +13 -13
- package/front_end/models/trace/EventsSerializer.ts +5 -5
- package/front_end/models/trace/LanternComputationData.ts +10 -10
- package/front_end/models/trace/ModelImpl.ts +32 -41
- package/front_end/models/trace/Processor.ts +28 -30
- package/front_end/models/trace/extras/FilmStrip.ts +6 -6
- package/front_end/models/trace/extras/StackTraceForEvent.ts +22 -25
- package/front_end/models/trace/extras/ThirdParties.ts +16 -17
- package/front_end/models/trace/extras/TraceFilter.ts +1 -1
- package/front_end/models/trace/handlers/Threads.ts +10 -10
- package/front_end/models/trace/handlers/helpers.ts +9 -9
- package/front_end/models/trace/handlers/types.ts +3 -3
- package/front_end/models/trace/insights/CLSCulprits.ts +12 -14
- package/front_end/models/trace/insights/Cache.ts +8 -4
- package/front_end/models/trace/insights/DOMSize.ts +8 -5
- package/front_end/models/trace/insights/DocumentLatency.ts +2 -2
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +3 -3
- package/front_end/models/trace/insights/FontDisplay.ts +3 -4
- package/front_end/models/trace/insights/ForcedReflow.ts +3 -3
- package/front_end/models/trace/insights/INPBreakdown.ts +2 -2
- package/front_end/models/trace/insights/ImageDelivery.ts +11 -11
- package/front_end/models/trace/insights/LCPBreakdown.ts +4 -4
- package/front_end/models/trace/insights/LCPDiscovery.ts +4 -4
- package/front_end/models/trace/insights/LegacyJavaScript.ts +2 -2
- package/front_end/models/trace/insights/ModernHTTP.ts +4 -5
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +12 -12
- package/front_end/models/trace/insights/RenderBlocking.ts +9 -10
- package/front_end/models/trace/insights/SlowCSSSelector.ts +2 -2
- package/front_end/models/trace/insights/ThirdParties.ts +4 -5
- package/front_end/models/trace/insights/Viewport.ts +8 -5
- package/front_end/models/trace/insights/types.ts +1 -0
- package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +10 -10
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +52 -52
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +8 -8
- package/front_end/panels/animation/AnimationTimeline.ts +5 -5
- package/front_end/panels/animation/AnimationUI.ts +22 -23
- package/front_end/panels/application/ApplicationPanelSidebar.ts +12 -12
- package/front_end/panels/application/DOMStorageModel.ts +23 -23
- package/front_end/panels/application/ExtensionStorageModel.ts +31 -31
- package/front_end/panels/application/IndexedDBModel.ts +1 -0
- package/front_end/panels/application/PreloadingTreeElement.ts +8 -8
- package/front_end/panels/application/ServiceWorkersView.ts +0 -53
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
- package/front_end/panels/common/BadgeNotification.ts +24 -4
- package/front_end/panels/common/GdpSignUpDialog.ts +5 -0
- package/front_end/panels/common/badgeNotification.css +26 -9
- package/front_end/panels/console/ConsoleContextSelector.ts +9 -9
- package/front_end/panels/console/ConsolePrompt.ts +8 -5
- package/front_end/panels/console/ConsoleView.ts +13 -13
- package/front_end/panels/console/ConsoleViewport.ts +29 -29
- package/front_end/panels/coverage/CoverageModel.ts +22 -22
- package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
- package/front_end/panels/elements/ComputedStyleModel.ts +17 -18
- package/front_end/panels/elements/DOMPath.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +13 -13
- package/front_end/panels/elements/ElementsTreeElement.ts +18 -18
- package/front_end/panels/elements/ElementsTreeOutline.ts +41 -48
- package/front_end/panels/elements/ShortcutTreeElement.ts +4 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -4
- package/front_end/panels/elements/StylePropertyTreeElement.ts +49 -50
- package/front_end/panels/elements/StylesSidebarPane.ts +19 -19
- package/front_end/panels/emulation/DeviceModeToolbar.ts +7 -7
- package/front_end/panels/emulation/DeviceModeView.ts +6 -6
- package/front_end/panels/emulation/MediaQueryInspector.ts +18 -18
- package/front_end/panels/event_listeners/EventListenersView.ts +13 -14
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +3 -3
- package/front_end/panels/layer_viewer/LayerViewHost.ts +13 -13
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +9 -10
- package/front_end/panels/layer_viewer/TransformController.ts +34 -36
- package/front_end/panels/layers/LayerTreeModel.ts +41 -40
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +13 -13
- package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -7
- package/front_end/panels/media/PlayerMessagesView.ts +5 -5
- package/front_end/panels/media/TickingFlameChart.ts +24 -24
- package/front_end/panels/media/TickingFlameChartHelpers.ts +32 -32
- package/front_end/panels/network/NetworkItemView.ts +4 -4
- package/front_end/panels/network/NetworkLogViewColumns.ts +29 -29
- package/front_end/panels/network/NetworkPanel.ts +8 -5
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +10 -10
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +3 -4
- package/front_end/panels/profiler/ProfileHeader.ts +25 -25
- package/front_end/panels/profiler/ProfileLauncherView.ts +5 -6
- package/front_end/panels/recorder/components/ReplaySection.ts +3 -1
- package/front_end/panels/security/OriginTreeElement.ts +8 -8
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/settings/SettingsScreen.ts +18 -12
- package/front_end/panels/settings/components/SyncSection.ts +20 -6
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +3 -0
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -9
- package/front_end/panels/sources/NavigatorView.ts +43 -46
- package/front_end/panels/sources/SourcesPanel.ts +35 -35
- package/front_end/panels/sources/SourcesView.ts +13 -13
- package/front_end/panels/sources/TabbedEditorContainer.ts +19 -22
- package/front_end/panels/sources/UISourceCodeFrame.ts +4 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +34 -36
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +3 -3
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +8 -8
- package/front_end/panels/timeline/CountersGraph.ts +16 -16
- package/front_end/panels/timeline/EntriesFilter.ts +4 -3
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/GPUTrackAppender.ts +3 -3
- package/front_end/panels/timeline/Initiators.ts +10 -10
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +5 -5
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +7 -7
- package/front_end/panels/timeline/ModificationsManager.ts +8 -15
- package/front_end/panels/timeline/TargetForEvent.ts +2 -2
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -1
- package/front_end/panels/timeline/ThreadAppender.ts +13 -13
- package/front_end/panels/timeline/TimelineDetailsView.ts +6 -14
- package/front_end/panels/timeline/TimelineEventOverview.ts +27 -26
- package/front_end/panels/timeline/TimelineFilters.ts +5 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +54 -53
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +34 -34
- package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -31
- package/front_end/panels/timeline/TimelineHistoryManager.ts +17 -18
- package/front_end/panels/timeline/TimelineMiniMap.ts +6 -6
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +6 -6
- package/front_end/panels/timeline/TimelinePanel.ts +52 -59
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +7 -5
- package/front_end/panels/timeline/TimelineTreeView.ts +10 -10
- package/front_end/panels/timeline/TimelineUIUtils.ts +43 -43
- package/front_end/panels/timeline/TimingsTrackAppender.ts +12 -12
- package/front_end/panels/timeline/TracingLayerTree.ts +43 -43
- package/front_end/panels/timeline/TrackConfigBanner.ts +6 -6
- package/front_end/panels/timeline/TrackConfiguration.ts +1 -1
- package/front_end/panels/timeline/components/DetailsView.ts +4 -4
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +12 -21
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +5 -5
- package/front_end/panels/timeline/components/Sidebar.ts +4 -14
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +13 -36
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +21 -19
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
- package/front_end/panels/timeline/components/insights/Cache.ts +4 -0
- package/front_end/panels/timeline/components/insights/DOMSize.ts +5 -1
- package/front_end/panels/timeline/components/insights/Helpers.ts +19 -0
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/panels/timeline/components/insights/Viewport.ts +4 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
- package/front_end/panels/timeline/utils/AICallTree.ts +11 -11
- package/front_end/panels/timeline/utils/AIContext.ts +17 -19
- package/front_end/panels/timeline/utils/EntityMapper.ts +6 -5
- package/front_end/panels/timeline/utils/EntryName.ts +2 -2
- package/front_end/panels/timeline/utils/EntryNodes.ts +5 -5
- package/front_end/panels/timeline/utils/EntryStyles.ts +4 -4
- package/front_end/panels/timeline/utils/FreshRecording.ts +3 -3
- package/front_end/panels/timeline/utils/Helpers.ts +0 -18
- package/front_end/panels/timeline/utils/InsightAIContext.ts +6 -6
- package/front_end/panels/timeline/utils/SourceMapsResolver.ts +7 -7
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +1 -1
- package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
- package/front_end/third_party/json5/rebuild.sh +1 -1
- package/front_end/third_party/legacy-javascript/{update.sh → rebuild.sh} +1 -1
- package/front_end/third_party/lit/lib/decorators.d.ts +26 -9
- package/front_end/third_party/lit/lib/decorators.js +5 -5
- package/front_end/third_party/lit/lib/decorators.js.map +1 -1
- package/front_end/third_party/lit/lib/directive.js.map +1 -1
- package/front_end/third_party/lit/lib/directives.js +8 -13
- package/front_end/third_party/lit/lib/directives.js.map +1 -1
- package/front_end/third_party/lit/lib/lit.d.ts +26 -9
- package/front_end/third_party/lit/lib/lit.js +5 -5
- package/front_end/third_party/lit/lib/lit.js.map +1 -1
- package/front_end/third_party/lit/lib/static-html.js +2 -2
- package/front_end/third_party/lit/lib/static-html.js.map +1 -1
- package/front_end/third_party/lit/rebuild.sh +1 -1
- package/front_end/third_party/third-party-web/rebuild.sh +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +6 -7
- package/front_end/ui/legacy/ActionRegistration.ts +9 -9
- package/front_end/ui/legacy/DockController.ts +18 -18
- package/front_end/ui/legacy/FilterBar.ts +7 -7
- package/front_end/ui/legacy/Fragment.ts +4 -4
- package/front_end/ui/legacy/GlassPane.ts +12 -12
- package/front_end/ui/legacy/InspectorView.ts +5 -15
- package/front_end/ui/legacy/ListControl.ts +27 -27
- package/front_end/ui/legacy/ListWidget.ts +4 -4
- package/front_end/ui/legacy/PopoverHelper.ts +4 -4
- package/front_end/ui/legacy/ShortcutRegistry.ts +17 -17
- package/front_end/ui/legacy/TabbedPane.ts +74 -75
- package/front_end/ui/legacy/TextPrompt.ts +31 -31
- package/front_end/ui/legacy/Toolbar.ts +13 -14
- package/front_end/ui/legacy/ViewManager.ts +30 -31
- package/front_end/ui/legacy/Widget.ts +6 -6
- package/front_end/ui/legacy/XLink.ts +9 -9
- package/front_end/ui/legacy/ZoomManager.ts +9 -9
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +27 -27
- package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +30 -32
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +15 -15
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +64 -64
- package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -11
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +12 -12
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +14 -14
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -8
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -5
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +4 -4
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +4 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -2
- package/package.json +1 -1
@@ -17,21 +17,23 @@ their commit hash, which should suffice for the projected future.
|
|
17
17
|
For each Chromium release branch, we create a mirror branch with the same name
|
18
18
|
on our repo. Rough outline:
|
19
19
|
|
20
|
-
1. Chromium cuts a branch e.g. 3879
|
21
|
-
1. Bots create
|
20
|
+
1. Chromium cuts a branch e.g. `3879`
|
21
|
+
1. Bots create the `chromium/3879` branch on the `devtools-frontend` repo
|
22
22
|
1. The end
|
23
23
|
|
24
24
|
## Handling of Beta/Stable branches
|
25
25
|
|
26
|
-
Generally speaking,
|
27
|
-
is a special waterfall
|
26
|
+
Generally speaking, Beta/Stable branches are the same as Canary branches.
|
27
|
+
However, there is a special waterfall that runs tests on the
|
28
|
+
[Beta](https://ci.chromium.org/p/devtools-frontend/g/beta/console) and
|
29
|
+
[Stable](https://ci.chromium.org/p/devtools-frontend/g/stable/console) branches.
|
28
30
|
|
29
|
-
|
30
|
-
in
|
31
|
-
[infra/config](https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/infra/config)
|
32
|
-
branch of devtools-frontend
|
33
|
-
existing beta branch to stable section and modify beta section
|
34
|
-
corresponding branch number for the new Chromium milestone.
|
31
|
+
To make this possible, whenever Chromium updates to a new major version, we
|
32
|
+
update the branch number in the
|
33
|
+
[`infra/config`](https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/infra/config)
|
34
|
+
branch of `devtools-frontend`. Specifically, in `buckets/ci.start`, promote the
|
35
|
+
existing `beta` branch to the `stable` section and modify the `beta` section
|
36
|
+
with the corresponding branch number for the new Chromium milestone.
|
35
37
|
|
36
38
|
```python
|
37
39
|
generate_ci_configs(
|
@@ -48,13 +50,13 @@ generate_ci_configs(
|
|
48
50
|
...
|
49
51
|
```
|
50
52
|
|
51
|
-
After editing the above mentioned file run `lucicfg generate main.star` to have
|
52
|
-
the change propagated to the cfg files. Example:
|
53
|
+
After editing the above mentioned file, run `lucicfg generate main.star` to have
|
54
|
+
the change propagated to the `*.cfg` files. Example:
|
53
55
|
[CL](https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2104476)
|
54
56
|
|
55
57
|
## Rolling/Integrating into Chromium
|
56
58
|
|
57
59
|
The
|
58
60
|
[Skia autoroller](https://skia.googlesource.com/buildbot/+/main/autoroll/README.md)
|
59
|
-
is used. The
|
61
|
+
is used. The `devtools-frontend` auto-roller state can be seen and controlled
|
60
62
|
[here](https://autoroll.skia.org/r/devtools-frontend-chromium?tab=status).
|
package/docs/get_the_code.md
CHANGED
@@ -291,16 +291,125 @@ you could run the hosted DevTools with the following command:
|
|
291
291
|
$ google-chrome http://localhost:8000/inspector.html?ws=localhost:9222/devtools/page/BADADD4E55BADADD4E55BADADD4E5511
|
292
292
|
```
|
293
293
|
|
294
|
+
## Chromium checkout
|
295
|
+
|
296
|
+
You can also work on the DevTools front-end within a full Chromium checkout.
|
297
|
+
This workflow is particularly useful if you are working on a feature or a bug
|
298
|
+
that spans back-end (Chromium C++ code) and front-end (DevTools TypeScript
|
299
|
+
code), but it's also useful for Chromies that need to make small patches to
|
300
|
+
DevTools front-end and don't want to go through the process of setting up a
|
301
|
+
dedicated [`devtools-frontend` standalone checkout](#standalone-checkout).
|
302
|
+
|
303
|
+
### Checking out source
|
304
|
+
|
305
|
+
Follow [instructions](https://www.chromium.org/developers/how-tos/get-the-code)
|
306
|
+
to check out Chromium. The DevTools front-end code is located inside the
|
307
|
+
`third_party/devtools-frontend/src/` folder (after running `gclient sync`).
|
308
|
+
|
309
|
+
### Build
|
310
|
+
|
311
|
+
The [instructions](https://www.chromium.org/developers/how-tos/get-the-code) on
|
312
|
+
the Chromium page apply as well here. In particular use
|
313
|
+
|
314
|
+
```bash
|
315
|
+
autoninja -C out/Default chrome
|
316
|
+
```
|
317
|
+
|
318
|
+
to build Chromium with the bundled DevTools front-end. You can also use
|
319
|
+
|
320
|
+
```bash
|
321
|
+
autoninja -C out/Default devtools_frontend_resources
|
322
|
+
```
|
323
|
+
|
324
|
+
to only build the DevTools front-end resources, which can afterwards be found in
|
325
|
+
the `out/Default/gen/third_party/devtools-frontend/src/front_end` folder.
|
326
|
+
|
327
|
+
### Run
|
328
|
+
|
329
|
+
Launch Chromium with the bundled DevTools front-end using
|
330
|
+
|
331
|
+
```bash
|
332
|
+
out/Default/chrome
|
333
|
+
```
|
334
|
+
|
335
|
+
or if you are only iterating on a small set of changes to the DevTools front-end
|
336
|
+
and used the `devtools_frontend_resources` build target, you can run Chrome with
|
337
|
+
the generated DevTools front-end artifacts using
|
338
|
+
|
339
|
+
```bash
|
340
|
+
out/Default/chrome --custom-devtools-frontend=file://$(realpath out/Default/gen/third_party/devtools-frontend/src/front_end)
|
341
|
+
```
|
342
|
+
|
343
|
+
afterwards, which can be quite a bit faster than building and linking the full
|
344
|
+
Chromium binary.
|
345
|
+
|
346
|
+
### Testing
|
347
|
+
|
348
|
+
To run the test suite, use `npm test` from within the DevTools front-end folder:
|
349
|
+
|
350
|
+
```bash
|
351
|
+
cd third_party/devtools-frontend/src
|
352
|
+
npm test
|
353
|
+
```
|
354
|
+
|
355
|
+
### Juggling the git submodules
|
356
|
+
|
357
|
+
Working on DevTools within a Chromium checkout means working across two separate
|
358
|
+
repositories (at the same time), which can be a bit tricky. Especially if you
|
359
|
+
are working on a change that spans across the boundary of the front-end and the
|
360
|
+
back-end, you'll need to cook two separate CLs. There are several ways to go
|
361
|
+
about this, and in here, we'll outline one somewhat well-lit path. You start by
|
362
|
+
creating a branch in both Chromium and DevTools:
|
363
|
+
|
364
|
+
```bash
|
365
|
+
git new-branch my-change-backend
|
366
|
+
pushd third_party/devtools-frontend/src
|
367
|
+
git new-branch my-change-frontend
|
368
|
+
popd
|
369
|
+
```
|
370
|
+
|
371
|
+
Now you go about developing your patch, and commit individually to Chromium and
|
372
|
+
DevTools repositories. When you're done, you can upload the changes individually
|
373
|
+
using `git cl upload`:
|
374
|
+
|
375
|
+
```bash
|
376
|
+
git cl upload
|
377
|
+
pushd third_party/devtools-frontend/src
|
378
|
+
git cl upload
|
379
|
+
popd
|
380
|
+
```
|
381
|
+
|
382
|
+
The tricky part is to get the checkout back into a well-defined state, which can
|
383
|
+
be accomplished using:
|
384
|
+
|
385
|
+
```bash
|
386
|
+
git checkout main
|
387
|
+
git -C third_party/devtools-frontend/src checkout \
|
388
|
+
`gclient getdep -r src/third_party/devtools-frontend/src`
|
389
|
+
gclient sync
|
390
|
+
```
|
391
|
+
|
392
|
+
When you need to rebase your changes, also make sure to run the above commands
|
393
|
+
and afterwards rebase the changes in the repositories separately:
|
394
|
+
|
395
|
+
```bash
|
396
|
+
git checkout my-change-backend
|
397
|
+
git rebase
|
398
|
+
pushd third_party/devtools-frontend/src
|
399
|
+
git checkout my-change-frontend
|
400
|
+
git rebase
|
401
|
+
popd
|
402
|
+
```
|
403
|
+
|
294
404
|
## Integrated checkout
|
295
405
|
|
296
406
|
**This solution is experimental, please report any trouble that you run into!**
|
297
407
|
|
298
|
-
The integrated workflow offers the best of both worlds, and allows for working
|
299
|
-
|
408
|
+
The integrated workflow offers the best of both worlds, and allows for working
|
409
|
+
on both Chromium and DevTools frontend side-by-side.
|
300
410
|
|
301
|
-
|
302
|
-
|
303
|
-
A full [Chromium checkout](#Chromium-checkout) is a pre-requisite for the following steps.
|
411
|
+
A full [Chromium checkout](#Chromium-checkout) is a pre-requisite for the
|
412
|
+
following steps.
|
304
413
|
|
305
414
|
### Untrack the existing devtools-frontend submodule
|
306
415
|
|
@@ -326,12 +435,6 @@ In the `custom_deps` section, insert this line:
|
|
326
435
|
"src/third_party/devtools-frontend/src": None,
|
327
436
|
```
|
328
437
|
|
329
|
-
Following this step, there are two approaches to manage your standalone checkout
|
330
|
-
|
331
|
-
### Single gclient project
|
332
|
-
|
333
|
-
**Note: it's not possible anymore to manage the two projects in separate gclient projects.**
|
334
|
-
|
335
438
|
For the integrated checkout, create a single gclient project that automatically gclient sync's all dependencies for both
|
336
439
|
repositories. After checking out chromium, modify the .gclient file for `chromium/src` to add the DevTools project:
|
337
440
|
|
@@ -363,27 +466,3 @@ ln -s src/third_party/devtools-frontend/src devtools-frontend
|
|
363
466
|
If you did run `gclient sync` first, remove the devtools-frontend directory and start over.
|
364
467
|
|
365
468
|
Run `gclient sync` after creating the link to fetch the dependencies for the standalone checkout.
|
366
|
-
|
367
|
-
## Chromium checkout
|
368
|
-
|
369
|
-
DevTools frontend can also be developed as part of the full Chromium checkout.
|
370
|
-
This workflow can be used to make small patches to DevTools as a Chromium engineer.
|
371
|
-
However, it is different to our infrastructure setup and how to execute general maintenance work, and therefore discouraged.
|
372
|
-
|
373
|
-
### Checking out source
|
374
|
-
|
375
|
-
Follow [instructions](https://www.chromium.org/developers/how-tos/get-the-code) to check out Chromium. DevTools frontend can be found under `third_party/devtools-frontend/src/`.
|
376
|
-
|
377
|
-
### Build
|
378
|
-
|
379
|
-
Refer to [instructions](https://www.chromium.org/developers/how-tos/get-the-code) to build Chromium.
|
380
|
-
To only build DevTools frontend, use `devtools_frontend_resources` as build target.
|
381
|
-
The resulting build artifacts for DevTools frontend can be found in `out/Default/gen/third_party/devtools-frontend/src/front_end`.
|
382
|
-
|
383
|
-
### Run
|
384
|
-
|
385
|
-
Run Chrome with bundled DevTools frontend:
|
386
|
-
|
387
|
-
```bash
|
388
|
-
out/Default/chrome
|
389
|
-
```
|
@@ -1952,25 +1952,21 @@ export class Nickname extends ShortFormatColorBase {
|
|
1952
1952
|
|
1953
1953
|
export class Legacy implements Color {
|
1954
1954
|
readonly #rawParams: Color3D;
|
1955
|
-
#
|
1955
|
+
#rgba: Color4D;
|
1956
1956
|
readonly #authoredText: string|null;
|
1957
|
-
#
|
1957
|
+
#format: LegacyColor;
|
1958
1958
|
readonly channels: [ColorChannel, ColorChannel, ColorChannel, ColorChannel] =
|
1959
1959
|
[ColorChannel.R, ColorChannel.G, ColorChannel.B, ColorChannel.ALPHA];
|
1960
1960
|
|
1961
1961
|
static readonly #conversions: ColorConversions<Legacy> = {
|
1962
|
-
[Format.HEX]: (self: Legacy) => new Legacy(self.#
|
1963
|
-
[Format.HEXA]: (self: Legacy) => new Legacy(self.#
|
1964
|
-
[Format.RGB]: (self: Legacy) => new Legacy(self.#
|
1965
|
-
[Format.RGBA]: (self: Legacy) => new Legacy(self.#
|
1966
|
-
[Format.HSL]: (self: Legacy) =>
|
1967
|
-
|
1968
|
-
[Format.
|
1969
|
-
|
1970
|
-
[Format.HWB]: (self: Legacy) =>
|
1971
|
-
new HWB(...rgbToHwb([self.#rgbaInternal[0], self.#rgbaInternal[1], self.#rgbaInternal[2]]), self.alpha),
|
1972
|
-
[Format.HWBA]: (self: Legacy) =>
|
1973
|
-
new HWB(...rgbToHwb([self.#rgbaInternal[0], self.#rgbaInternal[1], self.#rgbaInternal[2]]), self.alpha),
|
1962
|
+
[Format.HEX]: (self: Legacy) => new Legacy(self.#rgba, Format.HEX),
|
1963
|
+
[Format.HEXA]: (self: Legacy) => new Legacy(self.#rgba, Format.HEXA),
|
1964
|
+
[Format.RGB]: (self: Legacy) => new Legacy(self.#rgba, Format.RGB),
|
1965
|
+
[Format.RGBA]: (self: Legacy) => new Legacy(self.#rgba, Format.RGBA),
|
1966
|
+
[Format.HSL]: (self: Legacy) => new HSL(...rgbToHsl([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha),
|
1967
|
+
[Format.HSLA]: (self: Legacy) => new HSL(...rgbToHsl([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha),
|
1968
|
+
[Format.HWB]: (self: Legacy) => new HWB(...rgbToHwb([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha),
|
1969
|
+
[Format.HWBA]: (self: Legacy) => new HWB(...rgbToHwb([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha),
|
1974
1970
|
[Format.LCH]: (self: Legacy) =>
|
1975
1971
|
new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha),
|
1976
1972
|
[Format.OKLCH]: (self: Legacy) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha),
|
@@ -1997,7 +1993,7 @@ export class Legacy implements Color {
|
|
1997
1993
|
};
|
1998
1994
|
|
1999
1995
|
#toXyzd50(): Color3D {
|
2000
|
-
const [r, g, b] = this.#
|
1996
|
+
const [r, g, b] = this.#rgba;
|
2001
1997
|
return ColorConverter.srgbToXyzd50(r, g, b);
|
2002
1998
|
}
|
2003
1999
|
|
@@ -2005,7 +2001,7 @@ export class Legacy implements Color {
|
|
2005
2001
|
switch (this.format()) {
|
2006
2002
|
case Format.HEXA:
|
2007
2003
|
case Format.RGBA:
|
2008
|
-
return this.#
|
2004
|
+
return this.#rgba[3];
|
2009
2005
|
default:
|
2010
2006
|
return null;
|
2011
2007
|
}
|
@@ -2022,7 +2018,7 @@ export class Legacy implements Color {
|
|
2022
2018
|
|
2023
2019
|
shortHex(): ShortHex|null {
|
2024
2020
|
for (let i = 0; i < 4; ++i) {
|
2025
|
-
const c = Math.round(this.#
|
2021
|
+
const c = Math.round(this.#rgba[i] * 255);
|
2026
2022
|
// Check if the two digits of each are identical: #aabbcc => #abc
|
2027
2023
|
if (c % 0x11) {
|
2028
2024
|
return null;
|
@@ -2033,10 +2029,10 @@ export class Legacy implements Color {
|
|
2033
2029
|
|
2034
2030
|
constructor(rgba: Color3D|Color4DOr3D, format: LegacyColor, authoredText?: string) {
|
2035
2031
|
this.#authoredText = authoredText || null;
|
2036
|
-
this.#
|
2032
|
+
this.#format = format;
|
2037
2033
|
this.#rawParams = [rgba[0], rgba[1], rgba[2]];
|
2038
2034
|
|
2039
|
-
this.#
|
2035
|
+
this.#rgba = [
|
2040
2036
|
clamp(rgba[0], {min: 0, max: 1}),
|
2041
2037
|
clamp(rgba[1], {min: 0, max: 1}),
|
2042
2038
|
clamp(rgba[2], {min: 0, max: 1}),
|
@@ -2099,11 +2095,11 @@ export class Legacy implements Color {
|
|
2099
2095
|
}
|
2100
2096
|
|
2101
2097
|
format(): LegacyColor {
|
2102
|
-
return this.#
|
2098
|
+
return this.#format;
|
2103
2099
|
}
|
2104
2100
|
|
2105
2101
|
hasAlpha(): boolean {
|
2106
|
-
return this.#
|
2102
|
+
return this.#rgba[3] !== 1;
|
2107
2103
|
}
|
2108
2104
|
|
2109
2105
|
detectHEXFormat(): Format {
|
@@ -2115,11 +2111,11 @@ export class Legacy implements Color {
|
|
2115
2111
|
if (format) {
|
2116
2112
|
return this.as(format).asString();
|
2117
2113
|
}
|
2118
|
-
return this.#stringify(format, this.#
|
2114
|
+
return this.#stringify(format, this.#rgba[0], this.#rgba[1], this.#rgba[2]);
|
2119
2115
|
}
|
2120
2116
|
#stringify(format: LegacyColor|undefined, r: number, g: number, b: number): string {
|
2121
2117
|
if (!format) {
|
2122
|
-
format = this.#
|
2118
|
+
format = this.#format;
|
2123
2119
|
}
|
2124
2120
|
|
2125
2121
|
function toHexValue(value: number): string {
|
@@ -2132,7 +2128,7 @@ export class Legacy implements Color {
|
|
2132
2128
|
case Format.RGBA: {
|
2133
2129
|
const start = Platform.StringUtilities.sprintf('rgb(%d %d %d', toRgbValue(r), toRgbValue(g), toRgbValue(b));
|
2134
2130
|
if (this.hasAlpha()) {
|
2135
|
-
return start + Platform.StringUtilities.sprintf(' / %d%)', Math.round(this.#
|
2131
|
+
return start + Platform.StringUtilities.sprintf(' / %d%)', Math.round(this.#rgba[3] * 100));
|
2136
2132
|
}
|
2137
2133
|
return start + ')';
|
2138
2134
|
}
|
@@ -2140,7 +2136,7 @@ export class Legacy implements Color {
|
|
2140
2136
|
case Format.HEXA: {
|
2141
2137
|
if (this.hasAlpha()) {
|
2142
2138
|
return Platform.StringUtilities
|
2143
|
-
.sprintf('#%s%s%s%s', toHexValue(r), toHexValue(g), toHexValue(b), toHexValue(this.#
|
2139
|
+
.sprintf('#%s%s%s%s', toHexValue(r), toHexValue(g), toHexValue(b), toHexValue(this.#rgba[3]))
|
2144
2140
|
.toLowerCase();
|
2145
2141
|
}
|
2146
2142
|
return Platform.StringUtilities.sprintf('#%s%s%s', toHexValue(r), toHexValue(g), toHexValue(b)).toLowerCase();
|
@@ -2162,20 +2158,20 @@ export class Legacy implements Color {
|
|
2162
2158
|
}
|
2163
2159
|
isGamutClipped(): boolean {
|
2164
2160
|
return !equals(
|
2165
|
-
this.#rawParams.map(toRgbValue),
|
2166
|
-
|
2161
|
+
this.#rawParams.map(toRgbValue), [this.#rgba[0], this.#rgba[1], this.#rgba[2]].map(toRgbValue),
|
2162
|
+
WIDE_RANGE_EPSILON);
|
2167
2163
|
}
|
2168
2164
|
|
2169
2165
|
rgba(): Color4D {
|
2170
|
-
return [...this.#
|
2166
|
+
return [...this.#rgba];
|
2171
2167
|
}
|
2172
2168
|
|
2173
2169
|
canonicalRGBA(): Color4D {
|
2174
2170
|
const rgba = new Array(4);
|
2175
2171
|
for (let i = 0; i < 3; ++i) {
|
2176
|
-
rgba[i] = Math.round(this.#
|
2172
|
+
rgba[i] = Math.round(this.#rgba[i] * 255);
|
2177
2173
|
}
|
2178
|
-
rgba[3] = this.#
|
2174
|
+
rgba[3] = this.#rgba[3];
|
2179
2175
|
return rgba as Color4D;
|
2180
2176
|
}
|
2181
2177
|
|
@@ -2200,10 +2196,10 @@ export class Legacy implements Color {
|
|
2200
2196
|
|
2201
2197
|
invert(): Legacy {
|
2202
2198
|
const rgba: Color4D = [0, 0, 0, 0];
|
2203
|
-
rgba[0] = 1 - this.#
|
2204
|
-
rgba[1] = 1 - this.#
|
2205
|
-
rgba[2] = 1 - this.#
|
2206
|
-
rgba[3] = this.#
|
2199
|
+
rgba[0] = 1 - this.#rgba[0];
|
2200
|
+
rgba[1] = 1 - this.#rgba[1];
|
2201
|
+
rgba[2] = 1 - this.#rgba[2];
|
2202
|
+
rgba[3] = this.#rgba[3];
|
2207
2203
|
return new Legacy(rgba, Format.RGBA);
|
2208
2204
|
}
|
2209
2205
|
|
@@ -2212,38 +2208,38 @@ export class Legacy implements Color {
|
|
2212
2208
|
* Note: We override with an alpha of 50% to enhance the dimming effect.
|
2213
2209
|
*/
|
2214
2210
|
grayscale(): Legacy {
|
2215
|
-
const [r, g, b] = this.#
|
2211
|
+
const [r, g, b] = this.#rgba;
|
2216
2212
|
const gray = r * 0.299 + g * 0.587 + b * 0.114;
|
2217
2213
|
return new Legacy([gray, gray, gray, 0.5], Format.RGBA);
|
2218
2214
|
}
|
2219
2215
|
|
2220
2216
|
setAlpha(alpha: number): Legacy {
|
2221
|
-
const rgba: Color4D = [...this.#
|
2217
|
+
const rgba: Color4D = [...this.#rgba];
|
2222
2218
|
rgba[3] = alpha;
|
2223
2219
|
return new Legacy(rgba, Format.RGBA);
|
2224
2220
|
}
|
2225
2221
|
|
2226
2222
|
blendWith(fgColor: Legacy): Legacy {
|
2227
|
-
const rgba: Color4D = blendColors(fgColor.#
|
2223
|
+
const rgba: Color4D = blendColors(fgColor.#rgba, this.#rgba);
|
2228
2224
|
return new Legacy(rgba, Format.RGBA);
|
2229
2225
|
}
|
2230
2226
|
|
2231
2227
|
blendWithAlpha(alpha: number): Legacy {
|
2232
|
-
const rgba: Color4D = [...this.#
|
2228
|
+
const rgba: Color4D = [...this.#rgba];
|
2233
2229
|
rgba[3] *= alpha;
|
2234
2230
|
return new Legacy(rgba, Format.RGBA);
|
2235
2231
|
}
|
2236
2232
|
|
2237
2233
|
setFormat(format: LegacyColor): void {
|
2238
|
-
this.#
|
2234
|
+
this.#format = format;
|
2239
2235
|
}
|
2240
2236
|
|
2241
2237
|
equal(other: Color): boolean {
|
2242
|
-
const legacy = other.as(this.#
|
2243
|
-
return equals(toRgbValue(this.#
|
2244
|
-
equals(toRgbValue(this.#
|
2245
|
-
equals(toRgbValue(this.#
|
2246
|
-
equals(this.#
|
2238
|
+
const legacy = other.as(this.#format);
|
2239
|
+
return equals(toRgbValue(this.#rgba[0]), toRgbValue(legacy.#rgba[0]), WIDE_RANGE_EPSILON) &&
|
2240
|
+
equals(toRgbValue(this.#rgba[1]), toRgbValue(legacy.#rgba[1]), WIDE_RANGE_EPSILON) &&
|
2241
|
+
equals(toRgbValue(this.#rgba[2]), toRgbValue(legacy.#rgba[2]), WIDE_RANGE_EPSILON) &&
|
2242
|
+
equals(this.#rgba[3], legacy.#rgba[3]);
|
2247
2243
|
}
|
2248
2244
|
}
|
2249
2245
|
|
@@ -8,13 +8,13 @@ import {reveal} from './Revealer.js';
|
|
8
8
|
let consoleInstance: Console|undefined;
|
9
9
|
|
10
10
|
export class Console extends ObjectWrapper<EventTypes> {
|
11
|
-
readonly #
|
11
|
+
readonly #messages: Message[];
|
12
12
|
/**
|
13
13
|
* Instantiable via the instance() factory below.
|
14
14
|
*/
|
15
15
|
constructor() {
|
16
16
|
super();
|
17
|
-
this.#
|
17
|
+
this.#messages = [];
|
18
18
|
}
|
19
19
|
|
20
20
|
static instance(opts?: {forceNew: boolean}): Console {
|
@@ -39,7 +39,7 @@ export class Console extends ObjectWrapper<EventTypes> {
|
|
39
39
|
*/
|
40
40
|
addMessage(text: string, level = MessageLevel.INFO, show = false, source?: FrontendMessageSource): void {
|
41
41
|
const message = new Message(text, level, Date.now(), show, source);
|
42
|
-
this.#
|
42
|
+
this.#messages.push(message);
|
43
43
|
this.dispatchEventToListeners(Events.MESSAGE_ADDED, message);
|
44
44
|
}
|
45
45
|
|
@@ -62,7 +62,7 @@ export class Console extends ObjectWrapper<EventTypes> {
|
|
62
62
|
}
|
63
63
|
|
64
64
|
messages(): Message[] {
|
65
|
-
return this.#
|
65
|
+
return this.#messages;
|
66
66
|
}
|
67
67
|
|
68
68
|
show(): void {
|
@@ -95,8 +95,8 @@ export class ParsedURL {
|
|
95
95
|
folderPathComponents: string;
|
96
96
|
lastPathComponent: string;
|
97
97
|
readonly blobInnerScheme: string|undefined;
|
98
|
-
#
|
99
|
-
#
|
98
|
+
#displayName?: string;
|
99
|
+
#dataURLDisplayName?: string;
|
100
100
|
|
101
101
|
constructor(url: string) {
|
102
102
|
this.isValid = false;
|
@@ -494,8 +494,8 @@ export class ParsedURL {
|
|
494
494
|
}
|
495
495
|
|
496
496
|
get displayName(): string {
|
497
|
-
if (this.#
|
498
|
-
return this.#
|
497
|
+
if (this.#displayName) {
|
498
|
+
return this.#displayName;
|
499
499
|
}
|
500
500
|
|
501
501
|
if (this.isDataURL()) {
|
@@ -508,25 +508,25 @@ export class ParsedURL {
|
|
508
508
|
return this.url;
|
509
509
|
}
|
510
510
|
|
511
|
-
this.#
|
512
|
-
if (!this.#
|
513
|
-
this.#
|
511
|
+
this.#displayName = this.lastPathComponent;
|
512
|
+
if (!this.#displayName) {
|
513
|
+
this.#displayName = (this.host || '') + '/';
|
514
514
|
}
|
515
|
-
if (this.#
|
516
|
-
this.#
|
515
|
+
if (this.#displayName === '/') {
|
516
|
+
this.#displayName = this.url;
|
517
517
|
}
|
518
|
-
return this.#
|
518
|
+
return this.#displayName;
|
519
519
|
}
|
520
520
|
|
521
521
|
dataURLDisplayName(): string {
|
522
|
-
if (this.#
|
523
|
-
return this.#
|
522
|
+
if (this.#dataURLDisplayName) {
|
523
|
+
return this.#dataURLDisplayName;
|
524
524
|
}
|
525
525
|
if (!this.isDataURL()) {
|
526
526
|
return '';
|
527
527
|
}
|
528
|
-
this.#
|
529
|
-
return this.#
|
528
|
+
this.#dataURLDisplayName = Platform.StringUtilities.trimEndWithMaxLength(this.url, 20);
|
529
|
+
return this.#dataURLDisplayName;
|
530
530
|
}
|
531
531
|
|
532
532
|
isAboutBlank(): boolean {
|
@@ -159,17 +159,17 @@ const str_ = i18n.i18n.registerUIStrings('core/common/ResourceType.ts', UIString
|
|
159
159
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
160
160
|
|
161
161
|
export class ResourceType {
|
162
|
-
readonly #
|
163
|
-
readonly #
|
164
|
-
readonly #
|
165
|
-
readonly #
|
162
|
+
readonly #name: string;
|
163
|
+
readonly #title: () => Platform.UIString.LocalizedString;
|
164
|
+
readonly #category: ResourceCategory;
|
165
|
+
readonly #isTextType: boolean;
|
166
166
|
|
167
167
|
constructor(
|
168
168
|
name: string, title: () => Platform.UIString.LocalizedString, category: ResourceCategory, isTextType: boolean) {
|
169
|
-
this.#
|
170
|
-
this.#
|
171
|
-
this.#
|
172
|
-
this.#
|
169
|
+
this.#name = name;
|
170
|
+
this.#title = title;
|
171
|
+
this.#category = category;
|
172
|
+
this.#isTextType = isTextType;
|
173
173
|
}
|
174
174
|
|
175
175
|
static fromMimeType(mimeType: string|null): ResourceType {
|
@@ -286,23 +286,23 @@ export class ResourceType {
|
|
286
286
|
}
|
287
287
|
|
288
288
|
name(): string {
|
289
|
-
return this.#
|
289
|
+
return this.#name;
|
290
290
|
}
|
291
291
|
|
292
292
|
title(): string {
|
293
|
-
return this.#
|
293
|
+
return this.#title();
|
294
294
|
}
|
295
295
|
|
296
296
|
category(): ResourceCategory {
|
297
|
-
return this.#
|
297
|
+
return this.#category;
|
298
298
|
}
|
299
299
|
|
300
300
|
isTextType(): boolean {
|
301
|
-
return this.#
|
301
|
+
return this.#isTextType;
|
302
302
|
}
|
303
303
|
|
304
304
|
isScript(): boolean {
|
305
|
-
return this.#
|
305
|
+
return this.#name === 'script' || this.#name === 'sm-script';
|
306
306
|
}
|
307
307
|
|
308
308
|
hasScripts(): boolean {
|
@@ -310,7 +310,7 @@ export class ResourceType {
|
|
310
310
|
}
|
311
311
|
|
312
312
|
isStyleSheet(): boolean {
|
313
|
-
return this.#
|
313
|
+
return this.#name === 'stylesheet' || this.#name === 'sm-stylesheet';
|
314
314
|
}
|
315
315
|
|
316
316
|
hasStyleSheets(): boolean {
|
@@ -318,7 +318,7 @@ export class ResourceType {
|
|
318
318
|
}
|
319
319
|
|
320
320
|
isDocument(): boolean {
|
321
|
-
return this.#
|
321
|
+
return this.#name === 'document';
|
322
322
|
}
|
323
323
|
|
324
324
|
isDocumentOrScriptOrStyleSheet(): boolean {
|
@@ -326,23 +326,23 @@ export class ResourceType {
|
|
326
326
|
}
|
327
327
|
|
328
328
|
isFont(): boolean {
|
329
|
-
return this.#
|
329
|
+
return this.#name === 'font';
|
330
330
|
}
|
331
331
|
|
332
332
|
isImage(): boolean {
|
333
|
-
return this.#
|
333
|
+
return this.#name === 'image';
|
334
334
|
}
|
335
335
|
|
336
336
|
isFromSourceMap(): boolean {
|
337
|
-
return this.#
|
337
|
+
return this.#name.startsWith('sm-');
|
338
338
|
}
|
339
339
|
|
340
340
|
isWebbundle(): boolean {
|
341
|
-
return this.#
|
341
|
+
return this.#name === 'webbundle';
|
342
342
|
}
|
343
343
|
|
344
344
|
toString(): string {
|
345
|
-
return this.#
|
345
|
+
return this.#name;
|
346
346
|
}
|
347
347
|
|
348
348
|
canonicalMimeType(): string {
|