chrome-devtools-frontend 1.0.941208 → 1.0.943182
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/WATCHLISTS +1 -1
- package/config/gni/all_devtools_files.gni +0 -64
- package/config/gni/devtools_grd_files.gni +54 -19
- package/config/gni/devtools_image_files.gni +1 -3
- package/front_end/.eslintrc.js +11 -1
- package/front_end/Images/src/{feedback_thin_16x16_icon.svg → survey_feedback_icon.svg} +1 -1
- package/front_end/Tests.js +1 -32
- package/front_end/core/common/Color.ts +5 -0
- package/front_end/core/i18n/locales/en-US.json +17 -29
- package/front_end/core/i18n/locales/en-XL.json +17 -29
- package/front_end/core/sdk/CPUProfilerModel.ts +7 -9
- package/front_end/core/sdk/ConsoleModel.ts +27 -33
- package/front_end/core/sdk/DebuggerModel.ts +4 -14
- package/front_end/core/sdk/sdk-meta.ts +17 -3
- package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +1 -1
- package/front_end/entrypoints/devtools_app/devtools_app.js +1 -1
- package/front_end/entrypoints/devtools_app/devtools_app.json +1 -12
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/inspector/inspector.js +1 -1
- package/front_end/entrypoints/inspector/inspector.json +1 -3
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +2 -3
- package/front_end/entrypoints/js_app/js_app.js +1 -1
- package/front_end/entrypoints/js_app/js_app.json +1 -3
- package/front_end/entrypoints/main/MainImpl.ts +26 -0
- package/front_end/entrypoints/main/main-meta.ts +1 -2
- package/front_end/entrypoints/ndb_app/ndb_app.js +1 -1
- package/front_end/entrypoints/node_app/node_app-meta.ts +0 -2
- package/front_end/entrypoints/node_app/node_app.js +1 -1
- package/front_end/entrypoints/node_app/node_app.json +1 -3
- package/front_end/entrypoints/node_main/node_main-meta.ts +0 -1
- package/front_end/entrypoints/shell/shell.js +0 -11
- package/front_end/entrypoints/shell/shell.json +1 -5
- package/front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/worker_app/worker_app.js +1 -1
- package/front_end/entrypoints/worker_app/worker_app.json +1 -7
- package/front_end/generated/InspectorBackendCommands.js +19 -0
- package/front_end/generated/protocol-mapping.d.ts +31 -1
- package/front_end/generated/protocol-proxy-api.d.ts +34 -2
- package/front_end/generated/protocol.d.ts +81 -6
- package/front_end/legacy_test_runner/bindings_test_runner/IsolatedFilesystemTestRunner.js +2 -2
- package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +5 -1
- package/front_end/legacy_test_runner/legacy_test_runner.ts +10 -1
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +3 -1
- package/front_end/models/formatter/SourceFormatter.ts +0 -10
- package/front_end/models/persistence/persistence-meta.ts +0 -1
- package/front_end/models/workspace/UISourceCode.ts +9 -42
- package/front_end/panels/accessibility/accessibility-meta.ts +0 -1
- package/front_end/panels/animation/AnimationTimeline.ts +3 -3
- package/front_end/panels/animation/animation-meta.ts +0 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +3 -3
- package/front_end/panels/application/BackForwardCacheStrings.ts +3 -1
- package/front_end/panels/application/application-meta.ts +0 -4
- package/front_end/panels/application/components/EndpointsGrid.ts +1 -1
- package/front_end/panels/application/components/ReportsGrid.ts +1 -1
- package/front_end/panels/application/components/stackTraceRow.css +8 -0
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +1 -2
- package/front_end/panels/changes/changes-meta.ts +0 -1
- package/front_end/panels/console/ConsolePinPane.ts +23 -32
- package/front_end/panels/console/ConsoleViewMessage.ts +8 -1
- package/front_end/panels/console/console-meta.ts +0 -1
- package/front_end/panels/console_counters/console_counters-meta.ts +0 -1
- package/front_end/panels/coverage/CoverageDecorationManager.ts +4 -5
- package/front_end/panels/coverage/CoverageView.ts +2 -105
- package/front_end/panels/coverage/coverage-meta.ts +0 -1
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +11 -56
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -8
- package/front_end/panels/css_overview/css_overview-meta.ts +0 -1
- package/front_end/panels/developer_resources/developer_resources-meta.ts +0 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +4 -9
- package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -0
- package/front_end/panels/elements/components/adornerSettingsPane.css +0 -4
- package/front_end/panels/elements/elements-meta.ts +0 -1
- package/front_end/panels/emulation/DeviceModeToolbar.ts +3 -1
- package/front_end/panels/emulation/DeviceModeView.ts +2 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +3 -1
- package/front_end/panels/emulation/MediaQueryInspector.ts +3 -1
- package/front_end/panels/emulation/emulation-meta.ts +2 -5
- package/front_end/panels/help/help-meta.ts +0 -1
- package/front_end/panels/input/input-meta.ts +0 -1
- package/front_end/panels/issues/issues-meta.ts +0 -3
- package/front_end/panels/js_profiler/js_profiler-meta.ts +0 -4
- package/front_end/panels/layers/layers-meta.ts +0 -4
- package/front_end/panels/lighthouse/LighthousePanel.ts +2 -4
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -4
- package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -1
- package/front_end/panels/lighthouse/lighthouseStartView.css +4 -0
- package/front_end/panels/lighthouse/module.json +0 -6
- package/front_end/panels/media/media-meta.ts +0 -4
- package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +0 -1
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +2 -1
- package/front_end/panels/network/network-meta.ts +1 -5
- package/front_end/panels/performance_monitor/performance_monitor-meta.ts +0 -1
- package/front_end/panels/profiler/CPUProfileView.ts +10 -3
- package/front_end/panels/profiler/profiler-meta.ts +0 -3
- package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +0 -1
- package/front_end/panels/screencast/screencast-meta.ts +0 -4
- package/front_end/panels/security/security-meta.ts +0 -4
- package/front_end/panels/sensors/sensors-meta.ts +0 -1
- package/front_end/panels/settings/emulation/emulation-meta.ts +0 -1
- package/front_end/panels/settings/settings-meta.ts +0 -1
- package/front_end/panels/sources/BreakpointEditDialog.ts +16 -30
- package/front_end/panels/sources/CSSPlugin.ts +310 -331
- package/front_end/panels/sources/CallStackSidebarPane.ts +28 -34
- package/front_end/panels/sources/CoveragePlugin.ts +121 -6
- package/front_end/panels/sources/DebuggerPlugin.ts +1166 -1243
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +71 -101
- package/front_end/panels/sources/GoToLineQuickOpen.ts +4 -3
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +3 -3
- package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +26 -23
- package/front_end/panels/sources/Plugin.ts +20 -4
- package/front_end/panels/sources/ProfilePlugin.ts +185 -0
- package/front_end/panels/sources/ScriptFormatterEditorAction.ts +3 -3
- package/front_end/panels/sources/ScriptOriginPlugin.ts +0 -10
- package/front_end/panels/sources/SnippetsPlugin.ts +1 -10
- package/front_end/panels/sources/SourcesPanel.ts +6 -5
- package/front_end/panels/sources/SourcesView.ts +10 -8
- package/front_end/panels/sources/TabbedEditorContainer.ts +31 -27
- package/front_end/panels/sources/UISourceCodeFrame.ts +335 -470
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
- package/front_end/panels/sources/sources-legacy.ts +0 -6
- package/front_end/panels/sources/sources-meta.ts +2 -6
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/timeline/timeline-meta.ts +2 -9
- package/front_end/panels/web_audio/web_audio-meta.ts +0 -1
- package/front_end/panels/webauthn/webauthn-meta.ts +0 -1
- package/front_end/third_party/codemirror.next/bundle.ts +9 -13
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/javascript.js +2 -2
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -6
- package/front_end/third_party/codemirror.next/chunk/php.js +2 -6
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +2 -2
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +279 -198
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +13 -11
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1128 -1158
- package/front_end/third_party/lighthouse/locales/ar-XB.json +211 -79
- package/front_end/third_party/lighthouse/locales/ar.json +213 -81
- package/front_end/third_party/lighthouse/locales/bg.json +211 -79
- package/front_end/third_party/lighthouse/locales/ca.json +212 -80
- package/front_end/third_party/lighthouse/locales/cs.json +211 -79
- package/front_end/third_party/lighthouse/locales/da.json +211 -79
- package/front_end/third_party/lighthouse/locales/de.json +211 -79
- package/front_end/third_party/lighthouse/locales/el.json +213 -81
- package/front_end/third_party/lighthouse/locales/en-GB.json +211 -79
- package/front_end/third_party/lighthouse/locales/en-US.json +186 -75
- package/front_end/third_party/lighthouse/locales/en-XA.json +211 -79
- package/front_end/third_party/lighthouse/locales/en-XL.json +186 -75
- package/front_end/third_party/lighthouse/locales/es-419.json +211 -79
- package/front_end/third_party/lighthouse/locales/es.json +212 -80
- package/front_end/third_party/lighthouse/locales/fi.json +211 -79
- package/front_end/third_party/lighthouse/locales/fil.json +211 -79
- package/front_end/third_party/lighthouse/locales/fr.json +211 -79
- package/front_end/third_party/lighthouse/locales/he.json +212 -80
- package/front_end/third_party/lighthouse/locales/hi.json +214 -82
- package/front_end/third_party/lighthouse/locales/hr.json +211 -79
- package/front_end/third_party/lighthouse/locales/hu.json +211 -79
- package/front_end/third_party/lighthouse/locales/id.json +211 -79
- package/front_end/third_party/lighthouse/locales/it.json +211 -79
- package/front_end/third_party/lighthouse/locales/ja.json +211 -79
- package/front_end/third_party/lighthouse/locales/ko.json +211 -79
- package/front_end/third_party/lighthouse/locales/lt.json +211 -79
- package/front_end/third_party/lighthouse/locales/lv.json +214 -82
- package/front_end/third_party/lighthouse/locales/nl.json +211 -79
- package/front_end/third_party/lighthouse/locales/no.json +211 -79
- package/front_end/third_party/lighthouse/locales/pl.json +211 -79
- package/front_end/third_party/lighthouse/locales/pt-PT.json +211 -79
- package/front_end/third_party/lighthouse/locales/pt.json +211 -79
- package/front_end/third_party/lighthouse/locales/ro.json +212 -80
- package/front_end/third_party/lighthouse/locales/ru.json +211 -79
- package/front_end/third_party/lighthouse/locales/sk.json +211 -79
- package/front_end/third_party/lighthouse/locales/sl.json +211 -79
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +211 -79
- package/front_end/third_party/lighthouse/locales/sr.json +211 -79
- package/front_end/third_party/lighthouse/locales/sv.json +211 -79
- package/front_end/third_party/lighthouse/locales/ta.json +218 -86
- package/front_end/third_party/lighthouse/locales/te.json +251 -119
- package/front_end/third_party/lighthouse/locales/th.json +211 -79
- package/front_end/third_party/lighthouse/locales/tr.json +211 -79
- package/front_end/third_party/lighthouse/locales/uk.json +212 -80
- package/front_end/third_party/lighthouse/locales/vi.json +211 -79
- package/front_end/third_party/lighthouse/locales/zh-HK.json +211 -79
- package/front_end/third_party/lighthouse/locales/zh-TW.json +211 -79
- package/front_end/third_party/lighthouse/locales/zh.json +211 -79
- package/front_end/third_party/lighthouse/report/bundle.d.ts +72 -34
- package/front_end/third_party/lighthouse/report/bundle.js +698 -492
- package/front_end/third_party/lighthouse/report-assets/report-generator.js +1 -2
- package/front_end/third_party/lighthouse/report-assets/report.js +40 -35
- package/front_end/third_party/lighthouse/report-assets/standalone-template.html +2 -4
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +60 -68
- package/front_end/ui/components/data_grid/dataGrid.css +12 -10
- package/front_end/ui/components/docs/component_docs.ts +14 -0
- package/front_end/ui/components/docs/create_breadcrumbs.ts +1 -1
- package/front_end/ui/components/docs/css_overview/start_view.html +25 -0
- package/front_end/ui/components/docs/css_overview/start_view.ts +14 -0
- package/front_end/ui/components/docs/icon_button/basic.ts +3 -3
- package/front_end/ui/components/docs/toggle_dark_mode.ts +1 -0
- package/front_end/ui/components/docs/toggle_fonts.ts +2 -0
- package/front_end/ui/components/helpers/get-stylesheet.ts +0 -15
- package/front_end/ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -2
- package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +1 -1
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/text_editor/TextEditor.ts +79 -36
- package/front_end/ui/components/text_editor/config.ts +42 -26
- package/front_end/ui/components/text_editor/javascript.ts +2 -3
- package/front_end/ui/components/text_editor/position.ts +17 -0
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/components/text_editor/theme.ts +5 -1
- package/front_end/ui/components/tree_outline/TreeOutline.ts +63 -8
- package/front_end/ui/components/tree_outline/TreeOutlineUtils.ts +8 -6
- package/front_end/ui/legacy/Dialog.ts +3 -1
- package/front_end/ui/legacy/DropTarget.ts +2 -1
- package/front_end/ui/legacy/EmptyWidget.ts +2 -1
- package/front_end/ui/legacy/FilterBar.ts +2 -1
- package/front_end/ui/legacy/GlassPane.ts +4 -2
- package/front_end/ui/legacy/Infobar.ts +5 -8
- package/front_end/ui/legacy/InspectorView.ts +6 -1
- package/front_end/ui/legacy/ListWidget.ts +2 -1
- package/front_end/ui/legacy/PopoverHelper.ts +2 -1
- package/front_end/ui/legacy/ProgressIndicator.ts +2 -1
- package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -1
- package/front_end/ui/legacy/ReportView.ts +2 -1
- package/front_end/ui/legacy/RootView.ts +2 -1
- package/front_end/ui/legacy/SearchableView.ts +2 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +11 -7
- package/front_end/ui/legacy/SoftContextMenu.ts +3 -2
- package/front_end/ui/legacy/SoftDropDown.ts +4 -2
- package/front_end/ui/legacy/SplitWidget.ts +2 -1
- package/front_end/ui/legacy/SuggestBox.ts +2 -1
- package/front_end/ui/legacy/TabbedPane.ts +2 -1
- package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +3 -2
- package/front_end/ui/legacy/Treeoutline.ts +4 -3
- package/front_end/ui/legacy/UIUtils.ts +17 -14
- package/front_end/ui/legacy/ViewManager.ts +2 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +1 -2
- package/front_end/ui/legacy/components/inline_editor/cssAngle.css +4 -0
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -4
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +35 -131
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +0 -3
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +2 -2
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +2 -3
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +3 -6
- package/front_end/ui/legacy/components/source_frame/FontView.ts +4 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +4 -1
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +4 -1
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +21 -15
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +501 -252
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +7 -2
- package/front_end/ui/legacy/components/source_frame/source_frame-legacy.ts +0 -11
- package/front_end/ui/legacy/components/source_frame/source_frame.ts +0 -2
- package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +2 -0
- package/front_end/ui/legacy/components/text_editor/cmdevtools.css +3 -1
- package/front_end/ui/legacy/components/text_editor/module.json +0 -3
- package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -15
- package/front_end/ui/legacy/radioButton.css +1 -13
- package/front_end/ui/legacy/textButton.css +5 -4
- package/front_end/ui/legacy/themeColors.css +36 -0
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +7 -9
- package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +2 -2
- package/front_end/ui/legacy/utils/inject-core-styles.ts +7 -4
- package/package.json +1 -1
- package/scripts/check_gn.js +0 -35
- package/scripts/eslint_rules/lib/es_modules_import.js +15 -8
- package/scripts/eslint_rules/tests/es_modules_import_test.js +8 -0
- package/front_end/Images/radioDot-dark-theme.png +0 -0
- package/front_end/Images/radioDot.png +0 -0
- package/front_end/emulated_devices/module.json +0 -6
- package/front_end/panels/application/module.json +0 -6
- package/front_end/panels/emulation/module.json +0 -11
- package/front_end/panels/issues/module.json +0 -6
- package/front_end/panels/js_profiler/module.json +0 -5
- package/front_end/panels/layer_viewer/module.json +0 -5
- package/front_end/panels/layers/module.json +0 -5
- package/front_end/panels/media/module.json +0 -5
- package/front_end/panels/network/module.json +0 -5
- package/front_end/panels/profiler/module.json +0 -5
- package/front_end/panels/screencast/module.json +0 -6
- package/front_end/panels/security/module.json +0 -5
- package/front_end/panels/timeline/module.json +0 -7
- package/front_end/third_party/lighthouse/report-assets/report.css +0 -1774
- package/front_end/ui/legacy/components/source_frame/SourcesTextEditor.ts +0 -1030
- package/front_end/ui/legacy/components/source_frame/messagesPopover.css +0 -32
- package/front_end/ui/legacy/components/source_frame/module.json +0 -14
- package/front_end/ui/legacy/module.json +0 -41
|
@@ -7,7 +7,6 @@ import * as i18n from '../../../../core/i18n/i18n.js';
|
|
|
7
7
|
import * as Root from '../../../../core/root/root.js';
|
|
8
8
|
import * as UI from '../../legacy.js';
|
|
9
9
|
|
|
10
|
-
// eslint-disable-next-line rulesdir/es_modules_import
|
|
11
10
|
import type * as PerfUI from './perf_ui.js';
|
|
12
11
|
|
|
13
12
|
const UIStrings = {
|
|
@@ -51,8 +50,6 @@ let loadedPerfUIModule: (typeof PerfUI|undefined);
|
|
|
51
50
|
|
|
52
51
|
async function loadPerfUIModule(): Promise<typeof PerfUI> {
|
|
53
52
|
if (!loadedPerfUIModule) {
|
|
54
|
-
// Side-effect import resources in module.json
|
|
55
|
-
await Root.Runtime.Runtime.instance().loadModulePromise('perf_ui');
|
|
56
53
|
loadedPerfUIModule = await import('./perf_ui.js');
|
|
57
54
|
}
|
|
58
55
|
return loadedPerfUIModule;
|
|
@@ -113,7 +113,7 @@ devtools-text-prompt {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
.filtered-list-widget-item .filtered-list-widget-title {
|
|
116
|
-
flex:
|
|
116
|
+
flex: initial;
|
|
117
117
|
overflow: hidden;
|
|
118
118
|
text-overflow: ellipsis;
|
|
119
119
|
}
|
|
@@ -194,7 +194,7 @@ devtools-text-prompt {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
.filtered-list-widget-item.one-row .filtered-list-widget-title {
|
|
197
|
-
|
|
197
|
+
padding-right: 8px;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
.filtered-list-widget-item.two-rows {
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
6
6
|
import * as UI from '../../legacy.js';
|
|
7
7
|
|
|
8
|
+
import type * as QuickOpen from './quick_open.js';
|
|
9
|
+
|
|
8
10
|
const UIStrings = {
|
|
9
11
|
/**
|
|
10
12
|
*@description Title of action that opens a file
|
|
@@ -18,9 +20,6 @@ const UIStrings = {
|
|
|
18
20
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/quick_open/quick_open-meta.ts', UIStrings);
|
|
19
21
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
20
22
|
|
|
21
|
-
// eslint-disable-next-line rulesdir/es_modules_import
|
|
22
|
-
import type * as QuickOpen from './quick_open.js';
|
|
23
|
-
|
|
24
23
|
let loadedQuickOpenModule: (typeof QuickOpen|undefined);
|
|
25
24
|
|
|
26
25
|
async function loadQuickOpenModule(): Promise<typeof QuickOpen> {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import type * as Common from '../../../../core/common/common.js';
|
|
6
6
|
import * as TextUtils from '../../../../models/text_utils/text_utils.js';
|
|
7
|
-
import type * as UI from '../../legacy.js';
|
|
8
7
|
|
|
9
8
|
import {ResourceSourceFrame} from './ResourceSourceFrame.js';
|
|
10
9
|
|
|
@@ -64,7 +63,7 @@ export class BinaryResourceViewFactory {
|
|
|
64
63
|
return new ResourceSourceFrame(
|
|
65
64
|
TextUtils.StaticContentProvider.StaticContentProvider.fromString(
|
|
66
65
|
this.contentUrl, this.resourceType, this.base64content),
|
|
67
|
-
|
|
66
|
+
this.resourceType.canonicalMimeType(), {lineNumbers: false, lineWrapping: true});
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
createHexView(): ResourceSourceFrame {
|
|
@@ -75,8 +74,7 @@ export class BinaryResourceViewFactory {
|
|
|
75
74
|
return {content, isEncoded: false};
|
|
76
75
|
});
|
|
77
76
|
return new ResourceSourceFrame(
|
|
78
|
-
hexViewerContentProvider,
|
|
79
|
-
/* autoPrettyPrint */ false, ({lineNumbers: false, lineWrapping: false} as UI.TextEditor.Options));
|
|
77
|
+
hexViewerContentProvider, this.resourceType.canonicalMimeType(), {lineNumbers: false, lineWrapping: false});
|
|
80
78
|
}
|
|
81
79
|
|
|
82
80
|
createUtf8View(): ResourceSourceFrame {
|
|
@@ -84,8 +82,7 @@ export class BinaryResourceViewFactory {
|
|
|
84
82
|
const utf8ContentProvider =
|
|
85
83
|
new TextUtils.StaticContentProvider.StaticContentProvider(this.contentUrl, this.resourceType, utf8fn);
|
|
86
84
|
return new ResourceSourceFrame(
|
|
87
|
-
utf8ContentProvider,
|
|
88
|
-
/* autoPrettyPrint */ false, ({lineNumbers: true, lineWrapping: true} as UI.TextEditor.Options));
|
|
85
|
+
utf8ContentProvider, this.resourceType.canonicalMimeType(), {lineNumbers: true, lineWrapping: true});
|
|
89
86
|
}
|
|
90
87
|
|
|
91
88
|
static uint8ArrayToHexString(uint8Array: Uint8Array): string {
|
|
@@ -35,6 +35,8 @@ import * as Platform from '../../../../core/platform/platform.js';
|
|
|
35
35
|
import * as TextUtils from '../../../../models/text_utils/text_utils.js';
|
|
36
36
|
import * as UI from '../../legacy.js';
|
|
37
37
|
|
|
38
|
+
import fontViewStyles from './fontView.css.legacy.js';
|
|
39
|
+
|
|
38
40
|
const UIStrings = {
|
|
39
41
|
/**
|
|
40
42
|
*@description Text that appears on a button for the font resource type filter.
|
|
@@ -59,7 +61,8 @@ export class FontView extends UI.View.SimpleView {
|
|
|
59
61
|
private inResize!: boolean|null;
|
|
60
62
|
constructor(mimeType: string, contentProvider: TextUtils.ContentProvider.ContentProvider) {
|
|
61
63
|
super(i18nString(UIStrings.font));
|
|
62
|
-
|
|
64
|
+
// eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
|
|
65
|
+
this.registerRequiredCSS(fontViewStyles);
|
|
63
66
|
this.element.classList.add('font-view');
|
|
64
67
|
this.url = contentProvider.contentURL();
|
|
65
68
|
UI.ARIAUtils.setAccessibleName(this.element, i18nString(UIStrings.previewOfFontFromS, {PH1: this.url}));
|
|
@@ -38,6 +38,8 @@ import * as TextUtils from '../../../../models/text_utils/text_utils.js';
|
|
|
38
38
|
import * as Workspace from '../../../../models/workspace/workspace.js';
|
|
39
39
|
import * as UI from '../../legacy.js';
|
|
40
40
|
|
|
41
|
+
import imageViewStyles from './imageView.css.legacy.js';
|
|
42
|
+
|
|
41
43
|
const UIStrings = {
|
|
42
44
|
/**
|
|
43
45
|
*@description Text in Image View of the Sources panel
|
|
@@ -96,7 +98,8 @@ export class ImageView extends UI.View.SimpleView {
|
|
|
96
98
|
private cachedContent?: string|null;
|
|
97
99
|
constructor(mimeType: string, contentProvider: TextUtils.ContentProvider.ContentProvider) {
|
|
98
100
|
super(i18nString(UIStrings.image));
|
|
99
|
-
|
|
101
|
+
// eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
|
|
102
|
+
this.registerRequiredCSS(imageViewStyles);
|
|
100
103
|
this.element.tabIndex = -1;
|
|
101
104
|
this.element.classList.add('image-view');
|
|
102
105
|
this.url = contentProvider.contentURL();
|
|
@@ -34,6 +34,8 @@ import * as SDK from '../../../../core/sdk/sdk.js';
|
|
|
34
34
|
import * as UI from '../../legacy.js';
|
|
35
35
|
import * as ObjectUI from '../object_ui/object_ui.js';
|
|
36
36
|
|
|
37
|
+
import jsonViewStyles from './jsonView.css.legacy.js';
|
|
38
|
+
|
|
37
39
|
const UIStrings = {
|
|
38
40
|
/**
|
|
39
41
|
*@description Text to find an item
|
|
@@ -54,7 +56,8 @@ export class JSONView extends UI.Widget.VBox implements UI.SearchableView.Search
|
|
|
54
56
|
constructor(parsedJSON: ParsedJSON, startCollapsed?: boolean) {
|
|
55
57
|
super();
|
|
56
58
|
this.initialized = false;
|
|
57
|
-
|
|
59
|
+
// eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
|
|
60
|
+
this.registerRequiredCSS(jsonViewStyles);
|
|
58
61
|
this.parsedJSON = parsedJSON;
|
|
59
62
|
this.startCollapsed = Boolean(startCollapsed);
|
|
60
63
|
this.element.classList.add('json-view');
|
|
@@ -35,7 +35,9 @@ import * as i18n from '../../../../core/i18n/i18n.js';
|
|
|
35
35
|
import type * as TextUtils from '../../../../models/text_utils/text_utils.js';
|
|
36
36
|
import * as UI from '../../legacy.js';
|
|
37
37
|
|
|
38
|
+
import type {SourceFrameOptions} from './SourceFrame.js';
|
|
38
39
|
import {SourceFrameImpl} from './SourceFrame.js';
|
|
40
|
+
import resourceSourceFrameStyles from './resourceSourceFrame.css.legacy.js';
|
|
39
41
|
|
|
40
42
|
const UIStrings = {
|
|
41
43
|
/**
|
|
@@ -50,40 +52,44 @@ export class ResourceSourceFrame extends SourceFrameImpl {
|
|
|
50
52
|
private readonly resourceInternal: TextUtils.ContentProvider.ContentProvider;
|
|
51
53
|
|
|
52
54
|
constructor(
|
|
53
|
-
resource: TextUtils.ContentProvider.ContentProvider,
|
|
54
|
-
|
|
55
|
-
super(() => resource.requestContent(),
|
|
55
|
+
resource: TextUtils.ContentProvider.ContentProvider, private readonly givenContentType: string,
|
|
56
|
+
options?: SourceFrameOptions) {
|
|
57
|
+
super(() => resource.requestContent(), options);
|
|
56
58
|
this.resourceInternal = resource;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
static createSearchableView(
|
|
60
|
-
resource: TextUtils.ContentProvider.ContentProvider,
|
|
62
|
+
resource: TextUtils.ContentProvider.ContentProvider, contentType: string,
|
|
61
63
|
autoPrettyPrint?: boolean): UI.Widget.Widget {
|
|
62
|
-
return new SearchableContainer(resource,
|
|
64
|
+
return new SearchableContainer(resource, contentType, autoPrettyPrint);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
protected getContentType(): string {
|
|
68
|
+
return this.givenContentType;
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
get resource(): TextUtils.ContentProvider.ContentProvider {
|
|
66
72
|
return this.resourceInternal;
|
|
67
73
|
}
|
|
68
74
|
|
|
69
|
-
populateTextAreaContextMenu(
|
|
70
|
-
|
|
75
|
+
protected populateTextAreaContextMenu(
|
|
76
|
+
contextMenu: UI.ContextMenu.ContextMenu, lineNumber: number, columnNumber: number): void {
|
|
77
|
+
super.populateTextAreaContextMenu(contextMenu, lineNumber, columnNumber);
|
|
71
78
|
contextMenu.appendApplicableItems(this.resourceInternal);
|
|
72
|
-
return Promise.resolve();
|
|
73
79
|
}
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
export class SearchableContainer extends UI.Widget.VBox {
|
|
77
83
|
private readonly sourceFrame: ResourceSourceFrame;
|
|
78
84
|
|
|
79
|
-
constructor(resource: TextUtils.ContentProvider.ContentProvider,
|
|
85
|
+
constructor(resource: TextUtils.ContentProvider.ContentProvider, contentType: string, autoPrettyPrint?: boolean) {
|
|
80
86
|
super(true);
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
// eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
|
|
88
|
+
this.registerRequiredCSS(resourceSourceFrameStyles);
|
|
89
|
+
const sourceFrame = new ResourceSourceFrame(resource, contentType);
|
|
83
90
|
this.sourceFrame = sourceFrame;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
sourceFrame.highlighterType() === 'application/json';
|
|
91
|
+
const canPrettyPrint =
|
|
92
|
+
sourceFrame.resource.contentType().isDocumentOrScriptOrStyleSheet() || contentType === 'application/json';
|
|
87
93
|
sourceFrame.setCanPrettyPrint(canPrettyPrint, autoPrettyPrint);
|
|
88
94
|
const searchableView = new UI.SearchableView.SearchableView(sourceFrame, sourceFrame);
|
|
89
95
|
searchableView.element.classList.add('searchable-view');
|
|
@@ -99,6 +105,6 @@ export class SearchableContainer extends UI.Widget.VBox {
|
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
async revealPosition(lineNumber: number, columnNumber?: number): Promise<void> {
|
|
102
|
-
this.sourceFrame.revealPosition(lineNumber, columnNumber, true);
|
|
108
|
+
this.sourceFrame.revealPosition({lineNumber, columnNumber}, true);
|
|
103
109
|
}
|
|
104
110
|
}
|