chrome-devtools-frontend 1.0.945884 → 1.0.948295
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/.eslintrc.js +1 -0
- package/config/gni/all_devtools_files.gni +1 -20
- package/config/gni/devtools_grd_files.gni +9 -48
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/.eslintrc.js +6 -1
- package/front_end/Images/src/circled_backslash_icon.svg +3 -0
- package/front_end/core/host/InspectorFrontendHost.ts +0 -3
- package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
- package/front_end/core/host/UserMetrics.ts +1 -23
- package/front_end/core/i18n/locales/en-US.json +41 -41
- package/front_end/core/i18n/locales/en-XL.json +41 -41
- package/front_end/core/platform/platform.ts +0 -2
- package/front_end/core/platform/string-utilities.ts +14 -1
- package/front_end/core/platform/utilities.ts +0 -29
- package/front_end/core/root/Runtime.ts +4 -212
- package/front_end/core/sdk/AccessibilityModel.ts +0 -2
- package/front_end/core/sdk/CSSProperty.ts +16 -11
- package/front_end/core/sdk/CSSRule.ts +0 -2
- package/front_end/core/sdk/Cookie.ts +0 -25
- package/front_end/core/sdk/EmulationModel.ts +0 -2
- package/front_end/core/sdk/HeapProfilerModel.ts +0 -2
- package/front_end/core/sdk/NetworkManager.ts +0 -3
- package/front_end/core/sdk/Resource.ts +0 -3
- package/front_end/core/sdk/ResourceTreeModel.ts +0 -3
- package/front_end/core/sdk/ServiceWorkerManager.ts +0 -2
- package/front_end/core/sdk/sdk-legacy.ts +0 -3
- package/front_end/devtools_compatibility.js +1 -8
- package/front_end/entrypoints/devtools_app/{devtools_app-meta-files.ts → devtools_app.ts} +9 -2
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +1 -3
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -2
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +0 -120
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -11
- package/front_end/entrypoints/formatter_worker/formatter_worker.ts +5 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +2 -1
- package/front_end/entrypoints/inspector/{inspector.js → inspector.ts} +0 -3
- package/front_end/entrypoints/js_app/{JsMain.ts → js_app.ts} +5 -1
- package/front_end/entrypoints/main/MainImpl.ts +0 -7
- package/front_end/entrypoints/ndb_app/{ndb_app.js → ndb_app.ts} +3 -2
- package/front_end/entrypoints/{node_main → node_app}/NodeConnectionsPanel.ts +1 -1
- package/front_end/entrypoints/{node_main → node_app}/NodeMain.ts +2 -4
- package/front_end/entrypoints/{node_main → node_app}/nodeConnectionsPanel.css +0 -0
- package/front_end/entrypoints/node_app/node_app.ts +79 -0
- package/front_end/entrypoints/shell/{shell-meta-files.ts → shell.ts} +7 -1
- package/front_end/entrypoints/worker_app/{worker_app.js → worker_app.ts} +6 -2
- package/front_end/generated/InspectorBackendCommands.js +5 -1
- package/front_end/generated/protocol.d.ts +12 -0
- package/front_end/legacy/legacy-defs.d.ts +0 -4
- package/front_end/legacy_test_runner/sources_test_runner/sources_test_runner.js +0 -1
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +35 -59
- package/front_end/models/bindings/CompilerScriptMapping.ts +0 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -11
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
- package/front_end/models/bindings/ResourceMapping.ts +1 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +0 -1
- package/front_end/models/emulation/DeviceModeModel.ts +0 -2
- package/front_end/models/formatter/FormatterWorkerPool.ts +0 -18
- package/front_end/models/issues_manager/CorsIssue.ts +17 -9
- package/front_end/models/issues_manager/descriptions/{corsInsecurePrivateNetworkPreflight.md → corsPreflightAllowPrivateNetworkError.md} +1 -1
- package/front_end/models/text_utils/CodeMirrorUtils.ts +6 -51
- package/front_end/models/text_utils/TextUtils.ts +1 -2
- package/front_end/models/text_utils/text_utils-legacy.ts +0 -5
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +3 -1
- package/front_end/panels/animation/AnimationTimeline.ts +0 -2
- package/front_end/panels/animation/AnimationUI.ts +0 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -4
- package/front_end/panels/application/BackForwardCacheStrings.ts +2 -5
- package/front_end/panels/application/BackForwardCacheView.ts +150 -58
- package/front_end/panels/application/ResourcesPanel.ts +0 -42
- package/front_end/panels/application/application-legacy.ts +0 -3
- package/front_end/panels/application/application-meta.ts +0 -13
- package/front_end/panels/application/backForwardCacheView.css +44 -6
- package/front_end/panels/application/components/FrameDetailsView.ts +3 -3
- package/front_end/panels/application/components/OriginTrialTreeView.ts +3 -3
- package/front_end/panels/application/components/StackTrace.ts +1 -1
- package/front_end/panels/coverage/CoverageView.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewModel.ts +0 -2
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +0 -7
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +0 -2
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -0
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +2 -1
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +0 -11
- package/front_end/panels/elements/ElementsPanel.ts +9 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +0 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
- package/front_end/panels/elements/elementsTreeOutline.css +0 -13
- package/front_end/panels/emulation/DeviceModeToolbar.ts +0 -16
- package/front_end/panels/issues/CorsIssueDetailsView.ts +18 -2
- package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -3
- package/front_end/panels/network/NetworkConfigView.ts +10 -0
- package/front_end/panels/network/NetworkItemView.ts +3 -0
- package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -0
- package/front_end/panels/network/networkConfigView.css +5 -0
- package/front_end/panels/profiler/CPUProfileFlameChart.ts +3 -1
- package/front_end/panels/profiler/ProfileDataGrid.ts +2 -1
- package/front_end/panels/profiler/profilesPanel.css +1 -1
- package/front_end/panels/search/SearchView.ts +24 -4
- package/front_end/panels/settings/components/SyncSection.ts +2 -2
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +52 -50
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +0 -12
- package/front_end/panels/sources/CSSPlugin.ts +3 -0
- package/front_end/panels/sources/CoveragePlugin.ts +2 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +35 -7
- package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +3 -0
- package/front_end/panels/sources/ProfilePlugin.ts +3 -0
- package/front_end/panels/sources/UISourceCodeFrame.ts +11 -2
- package/front_end/panels/sources/sourcesView.css +0 -130
- package/front_end/panels/timeline/TimelineTreeView.ts +3 -1
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +1 -25
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1486 -1423
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
- package/front_end/third_party/codemirror.next/package.json +10 -9
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +168 -164
- package/front_end/third_party/lighthouse/locales/ar-XB.json +0 -3
- package/front_end/third_party/lighthouse/locales/ar.json +0 -3
- package/front_end/third_party/lighthouse/locales/bg.json +17 -20
- package/front_end/third_party/lighthouse/locales/ca.json +0 -3
- package/front_end/third_party/lighthouse/locales/cs.json +0 -3
- package/front_end/third_party/lighthouse/locales/da.json +16 -19
- package/front_end/third_party/lighthouse/locales/de.json +0 -3
- package/front_end/third_party/lighthouse/locales/el.json +0 -3
- package/front_end/third_party/lighthouse/locales/en-GB.json +19 -22
- package/front_end/third_party/lighthouse/locales/en-US.json +33 -3
- package/front_end/third_party/lighthouse/locales/en-XA.json +0 -3
- package/front_end/third_party/lighthouse/locales/en-XL.json +33 -3
- package/front_end/third_party/lighthouse/locales/es-419.json +17 -20
- package/front_end/third_party/lighthouse/locales/es.json +0 -3
- package/front_end/third_party/lighthouse/locales/fi.json +16 -19
- package/front_end/third_party/lighthouse/locales/fil.json +33 -36
- package/front_end/third_party/lighthouse/locales/fr.json +16 -19
- package/front_end/third_party/lighthouse/locales/he.json +16 -19
- package/front_end/third_party/lighthouse/locales/hi.json +0 -3
- package/front_end/third_party/lighthouse/locales/hr.json +16 -19
- package/front_end/third_party/lighthouse/locales/hu.json +16 -19
- package/front_end/third_party/lighthouse/locales/id.json +16 -19
- package/front_end/third_party/lighthouse/locales/it.json +37 -40
- package/front_end/third_party/lighthouse/locales/ja.json +16 -19
- package/front_end/third_party/lighthouse/locales/ko.json +16 -19
- package/front_end/third_party/lighthouse/locales/lt.json +17 -20
- package/front_end/third_party/lighthouse/locales/lv.json +0 -3
- package/front_end/third_party/lighthouse/locales/nl.json +16 -19
- package/front_end/third_party/lighthouse/locales/no.json +17 -20
- package/front_end/third_party/lighthouse/locales/pl.json +16 -19
- package/front_end/third_party/lighthouse/locales/pt-PT.json +37 -40
- package/front_end/third_party/lighthouse/locales/pt.json +16 -19
- package/front_end/third_party/lighthouse/locales/ro.json +0 -3
- package/front_end/third_party/lighthouse/locales/ru.json +16 -19
- package/front_end/third_party/lighthouse/locales/sk.json +0 -3
- package/front_end/third_party/lighthouse/locales/sl.json +0 -3
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +16 -19
- package/front_end/third_party/lighthouse/locales/sr.json +16 -19
- package/front_end/third_party/lighthouse/locales/sv.json +17 -20
- package/front_end/third_party/lighthouse/locales/ta.json +0 -3
- package/front_end/third_party/lighthouse/locales/te.json +0 -3
- package/front_end/third_party/lighthouse/locales/th.json +0 -3
- package/front_end/third_party/lighthouse/locales/tr.json +0 -3
- package/front_end/third_party/lighthouse/locales/uk.json +17 -20
- package/front_end/third_party/lighthouse/locales/vi.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh-HK.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh-TW.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh.json +0 -3
- package/front_end/third_party/lighthouse/report/bundle.d.ts +63 -61
- package/front_end/third_party/lighthouse/report/bundle.js +36 -7
- package/front_end/third_party/lighthouse/report-assets/report-generator.js +205 -192
- package/front_end/ui/components/diff_view/DiffView.ts +4 -4
- package/front_end/ui/components/helpers/component-server-setup.ts +1 -12
- package/front_end/ui/components/helpers/helpers.ts +0 -2
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/issue_counter/IssueCounter.ts +2 -2
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +3 -3
- package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +98 -0
- package/front_end/ui/components/panel_feedback/panel_feedback.ts +1 -0
- package/front_end/ui/components/panel_feedback/previewToggle.css +24 -0
- package/front_end/ui/components/report_view/ReportView.ts +22 -0
- package/front_end/ui/components/report_view/reportSection.css +20 -0
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
- package/front_end/ui/components/settings/SettingCheckbox.ts +2 -2
- package/front_end/ui/components/text_editor/config.ts +11 -9
- package/front_end/ui/components/text_editor/javascript.ts +34 -12
- package/front_end/ui/components/text_editor/theme.ts +1 -0
- package/front_end/ui/components/text_prompt/TextPrompt.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +10 -0
- package/front_end/ui/legacy/SearchableView.ts +2 -1
- package/front_end/ui/legacy/Treeoutline.ts +1 -1
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/XWidget.ts +0 -5
- package/front_end/ui/legacy/components/inline_editor/CSSVarSwatch.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -3
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +0 -1
- package/front_end/ui/legacy/components/object_ui/object_ui-legacy.ts +0 -8
- package/front_end/ui/legacy/components/object_ui/object_ui.ts +0 -4
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +40 -29
- package/front_end/ui/legacy/inspectorSyntaxHighlight.css +0 -211
- package/front_end/ui/legacy/legacy-legacy.ts +0 -6
- package/front_end/ui/legacy/legacy.ts +0 -2
- package/front_end/ui/legacy/tabbedPane.css +1 -1
- package/front_end/ui/legacy/themeColors.css +1 -1
- package/front_end/ui/legacy/utils/append-style.ts +2 -13
- package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +7 -5
- package/package.json +2 -4
- package/scripts/build/build_inspector_overlay.py +15 -1
- package/scripts/build/rjsmin.py +84 -115
- package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -4
- package/scripts/eslint_rules/lib/lit_html_no_attribute_quotes.js +101 -0
- package/scripts/eslint_rules/lib/no_only_eslint_tests.js +53 -0
- package/scripts/eslint_rules/tests/.eslintrc.js +14 -0
- package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +4 -0
- package/scripts/eslint_rules/tests/lit_html_no_attribute_quotes_test.js +45 -0
- package/scripts/eslint_rules/tests/no_only_eslint_tests_test.js +94 -0
- package/scripts/hosted_mode/server.js +17 -2
- package/front_end/entrypoints/devtools_app/devtools_app.js +0 -8
- package/front_end/entrypoints/devtools_app/devtools_app.json +0 -6
- package/front_end/entrypoints/inspector/inspector.json +0 -4
- package/front_end/entrypoints/js_app/js_app.js +0 -9
- package/front_end/entrypoints/js_app/js_app.json +0 -4
- package/front_end/entrypoints/ndb_app/ndb_app.json +0 -5
- package/front_end/entrypoints/node_app/node_app-meta.ts +0 -43
- package/front_end/entrypoints/node_app/node_app.js +0 -13
- package/front_end/entrypoints/node_app/node_app.json +0 -4
- package/front_end/entrypoints/node_main/node_main-meta.ts +0 -48
- package/front_end/entrypoints/node_main/node_main.ts +0 -11
- package/front_end/entrypoints/shell/shell.js +0 -13
- package/front_end/entrypoints/shell/shell.json +0 -5
- package/front_end/entrypoints/startup/RuntimeInstantiator.ts +0 -95
- package/front_end/entrypoints/startup/startup.ts +0 -9
- package/front_end/entrypoints/worker_app/worker_app.json +0 -4
- package/front_end/panels/lighthouse/module.json +0 -6
- package/front_end/third_party/lighthouse/report-assets/report.d.ts +0 -1
- package/front_end/third_party/lighthouse/report-assets/report.js +0 -233
- package/front_end/third_party/lighthouse/report-assets/standalone-template.html +0 -38
- package/front_end/ui/components/helpers/get-stylesheet.ts +0 -45
- package/front_end/ui/legacy/TextEditor.ts +0 -82
- package/front_end/ui/legacy/components/object_ui/JavaScriptAutocomplete.ts +0 -836
- package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +0 -1676
- package/front_end/ui/legacy/components/text_editor/TextEditorAutocompleteController.ts +0 -586
- package/front_end/ui/legacy/components/text_editor/autocompleteTooltip.css +0 -20
- package/front_end/ui/legacy/components/text_editor/cm_modes.ts +0 -23
- package/front_end/ui/legacy/components/text_editor/cmdevtools.css +0 -995
- package/front_end/ui/legacy/components/text_editor/module.json +0 -7
- package/front_end/ui/legacy/components/text_editor/text_editor-legacy.ts +0 -33
- package/front_end/ui/legacy/components/text_editor/text_editor.ts +0 -13
- package/scripts/build/build_release_applications.py +0 -216
- package/scripts/build/modular_build.py +0 -184
- package/scripts/check_gn.js +0 -119
- package/scripts/json_validator/module.schema.json +0 -19
- package/scripts/json_validator/validate_module_json.js +0 -44
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as ComponentHelpers from '../components/helpers/helpers.js';
|
|
6
|
-
import * as Utils from './utils/utils.js';
|
|
7
6
|
|
|
8
7
|
import {XElement} from './XElement.js';
|
|
9
8
|
|
|
@@ -55,10 +54,6 @@ export class XWidget extends XElement {
|
|
|
55
54
|
return this.visible;
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
registerRequiredCSS(cssFile: string): void {
|
|
59
|
-
Utils.appendStyle(this.shadowRootInternal || this, cssFile);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
57
|
setOnShown(callback: (() => void)|null): void {
|
|
63
58
|
this.onShownCallback = callback;
|
|
64
59
|
}
|
|
@@ -113,7 +113,7 @@ export class CSSVarSwatch extends HTMLElement {
|
|
|
113
113
|
// The this.variableName's space must be removed, otherwise it cannot be triggered when clicked.
|
|
114
114
|
const onActivate = isDefined ? this.onLinkActivate.bind(this, this.variableName.trim()) : null;
|
|
115
115
|
|
|
116
|
-
return html`<span class
|
|
116
|
+
return html`<span class=${classes} title=${title} @mousedown=${onActivate} @keydown=${
|
|
117
117
|
onActivate} role="link" tabindex="-1">${variableName}</span>`;
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -129,7 +129,7 @@ export class CSSVarSwatch extends HTMLElement {
|
|
|
129
129
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
130
130
|
// clang-format off
|
|
131
131
|
render(
|
|
132
|
-
html`<span title
|
|
132
|
+
html`<span title=${this.computedValue || ''}>${functionParts.pre}${link}${functionParts.post}</span>`,
|
|
133
133
|
this.shadow, { host: this });
|
|
134
134
|
// clang-format on
|
|
135
135
|
}
|
|
@@ -118,7 +118,7 @@ export class ColorSwatch extends HTMLElement {
|
|
|
118
118
|
// Note also that whitespace between nodes is removed on purpose to avoid pushing these elements apart. Do not
|
|
119
119
|
// re-format the HTML code.
|
|
120
120
|
LitHtml.render(
|
|
121
|
-
LitHtml.html`<span class="color-swatch" title
|
|
121
|
+
LitHtml.html`<span class="color-swatch" title=${this.tooltip}><span class="color-swatch-inner"
|
|
122
122
|
style="background-color: ${this.text};"
|
|
123
123
|
@click=${this.onClick}
|
|
124
124
|
@mousedown=${this.consume}
|
|
@@ -37,10 +37,10 @@ import * as Platform from '../../../../core/platform/platform.js';
|
|
|
37
37
|
import * as SDK from '../../../../core/sdk/sdk.js';
|
|
38
38
|
import * as TextUtils from '../../../../models/text_utils/text_utils.js';
|
|
39
39
|
import * as IconButton from '../../../components/icon_button/icon_button.js';
|
|
40
|
+
import * as TextEditor from '../../../components/text_editor/text_editor.js';
|
|
40
41
|
import * as UI from '../../legacy.js';
|
|
41
42
|
|
|
42
43
|
import {CustomPreviewComponent} from './CustomPreviewComponent.js';
|
|
43
|
-
import {JavaScriptAutocomplete} from './JavaScriptAutocomplete.js';
|
|
44
44
|
import {JavaScriptREPL} from './JavaScriptREPL.js';
|
|
45
45
|
import {createSpansForNodeTitle, RemoteObjectPreviewFormatter} from './RemoteObjectPreviewFormatter.js';
|
|
46
46
|
import objectValueStyles from './objectValue.css.js';
|
|
@@ -1513,8 +1513,7 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1513
1513
|
export class ObjectPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
1514
1514
|
constructor() {
|
|
1515
1515
|
super();
|
|
1516
|
-
|
|
1517
|
-
this.initialize(javaScriptAutocomplete.completionsForTextInCurrentContext.bind(javaScriptAutocomplete));
|
|
1516
|
+
this.initialize(TextEditor.JavaScript.completeInContext);
|
|
1518
1517
|
}
|
|
1519
1518
|
}
|
|
1520
1519
|
|
|
@@ -12,14 +12,6 @@ ObjectUI = ObjectUI || {};
|
|
|
12
12
|
/** @constructor */
|
|
13
13
|
ObjectUI.CustomPreviewComponent = ObjectUIModule.CustomPreviewComponent.CustomPreviewComponent;
|
|
14
14
|
|
|
15
|
-
/** @constructor */
|
|
16
|
-
ObjectUI.JavaScriptAutocomplete = ObjectUIModule.JavaScriptAutocomplete.JavaScriptAutocomplete;
|
|
17
|
-
|
|
18
|
-
/** @constructor */
|
|
19
|
-
ObjectUI.JavaScriptAutocompleteConfig = ObjectUIModule.JavaScriptAutocomplete.JavaScriptAutocompleteConfig;
|
|
20
|
-
|
|
21
|
-
ObjectUI.javaScriptAutocomplete = ObjectUIModule.javaScriptAutocomplete;
|
|
22
|
-
|
|
23
15
|
/** @constructor */
|
|
24
16
|
ObjectUI.JavaScriptREPL = ObjectUIModule.JavaScriptREPL.JavaScriptREPL;
|
|
25
17
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as CustomPreviewComponent from './CustomPreviewComponent.js';
|
|
6
|
-
import * as JavaScriptAutocomplete from './JavaScriptAutocomplete.js';
|
|
7
6
|
import * as JavaScriptREPL from './JavaScriptREPL.js';
|
|
8
7
|
import * as ObjectPopoverHelper from './ObjectPopoverHelper.js';
|
|
9
8
|
import * as ObjectPropertiesSection from './ObjectPropertiesSection.js';
|
|
@@ -11,11 +10,8 @@ import * as RemoteObjectPreviewFormatter from './RemoteObjectPreviewFormatter.js
|
|
|
11
10
|
|
|
12
11
|
export {
|
|
13
12
|
CustomPreviewComponent,
|
|
14
|
-
JavaScriptAutocomplete,
|
|
15
13
|
JavaScriptREPL,
|
|
16
14
|
ObjectPopoverHelper,
|
|
17
15
|
ObjectPropertiesSection,
|
|
18
16
|
RemoteObjectPreviewFormatter,
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
export const javaScriptAutocomplete = JavaScriptAutocomplete.JavaScriptAutocomplete.instance();
|
|
@@ -112,8 +112,9 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
112
112
|
private shouldAutoPrettyPrint: boolean;
|
|
113
113
|
private readonly progressToolbarItem: UI.Toolbar.ToolbarItem;
|
|
114
114
|
private textEditorInternal: TextEditor.TextEditor.TextEditor;
|
|
115
|
-
|
|
115
|
+
// The 'clean' document, before editing
|
|
116
116
|
private baseDoc: CodeMirror.Text;
|
|
117
|
+
private prettyBaseDoc: CodeMirror.Text|null = null;
|
|
117
118
|
private displayedSelection: CodeMirror.EditorSelection|null = null;
|
|
118
119
|
private searchConfig: UI.SearchableView.SearchConfig|null;
|
|
119
120
|
private delayedFindSearchMatches: (() => void)|null;
|
|
@@ -212,24 +213,7 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
212
213
|
TextEditor.Config.allowScrollPastEof.instance(),
|
|
213
214
|
TextEditor.Config.codeFolding.instance(),
|
|
214
215
|
TextEditor.Config.autoDetectIndent.instance(),
|
|
215
|
-
|
|
216
|
-
'&.cm-editor': {height: '100%'},
|
|
217
|
-
'.cm-scroller': {overflow: 'auto'},
|
|
218
|
-
'.cm-lineNumbers .cm-gutterElement.cm-nonBreakableLine': {color: 'var(--color-non-breakable-line)'},
|
|
219
|
-
'.cm-searchMatch': {
|
|
220
|
-
border: '1px solid var(--color-search-match-border)',
|
|
221
|
-
borderRadius: '3px',
|
|
222
|
-
margin: '0 -1px',
|
|
223
|
-
'&.cm-searchMatch-selected': {
|
|
224
|
-
borderRadius: '1px',
|
|
225
|
-
backgroundColor: 'var(--color-selected-search-match-background)',
|
|
226
|
-
borderColor: 'var(--color-selected-search-match-background)',
|
|
227
|
-
'&, & *': {
|
|
228
|
-
color: 'var(--color-selected-search-match) !important',
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
}),
|
|
216
|
+
sourceFrameTheme,
|
|
233
217
|
CodeMirror.EditorView.domEventHandlers({
|
|
234
218
|
focus: () => this.onFocus(),
|
|
235
219
|
blur: () => this.onBlur(),
|
|
@@ -349,6 +333,9 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
349
333
|
this.updatePrettyPrintState();
|
|
350
334
|
}
|
|
351
335
|
|
|
336
|
+
// If this is a disassembled WASM file or a pretty-printed file,
|
|
337
|
+
// wire in a line number formatter that shows binary offsets or line
|
|
338
|
+
// numbers in the original source.
|
|
352
339
|
private getLineNumberFormatter(): CodeMirror.Extension {
|
|
353
340
|
if (this.options.lineNumbers === false) {
|
|
354
341
|
return [];
|
|
@@ -1096,18 +1083,20 @@ const searchHighlighter = CodeMirror.ViewPlugin.fromClass(class {
|
|
|
1096
1083
|
const {doc} = view.state;
|
|
1097
1084
|
for (const {from, to} of view.visibleRanges) {
|
|
1098
1085
|
let pos = from;
|
|
1099
|
-
for (const
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1086
|
+
for (const part of doc.iterRange(from, to)) {
|
|
1087
|
+
if (part !== '\n') {
|
|
1088
|
+
active.regexp.lastIndex = 0;
|
|
1089
|
+
for (;;) {
|
|
1090
|
+
const match = active.regexp.exec(part);
|
|
1091
|
+
if (!match) {
|
|
1092
|
+
break;
|
|
1093
|
+
}
|
|
1094
|
+
const start = pos + match.index, end = start + match[0].length;
|
|
1095
|
+
const current = active.currentRange && active.currentRange.from === start && active.currentRange.to === end;
|
|
1096
|
+
builder.add(start, end, current ? currentSearchMatchDeco : searchMatchDeco);
|
|
1105
1097
|
}
|
|
1106
|
-
const start = pos + match.index, end = start + match[0].length;
|
|
1107
|
-
const current = active.currentRange && active.currentRange.from === start && active.currentRange.to === end;
|
|
1108
|
-
builder.add(start, end, current ? currentSearchMatchDeco : searchMatchDeco);
|
|
1109
1098
|
}
|
|
1110
|
-
pos +=
|
|
1099
|
+
pos += part.length;
|
|
1111
1100
|
}
|
|
1112
1101
|
}
|
|
1113
1102
|
return builder.finish();
|
|
@@ -1160,3 +1149,25 @@ function markNonBreakableLines(disassembly: Common.WasmDisassembly.WasmDisassemb
|
|
|
1160
1149
|
return CodeMirror.RangeSet.of(marks);
|
|
1161
1150
|
});
|
|
1162
1151
|
}
|
|
1152
|
+
|
|
1153
|
+
const sourceFrameTheme = CodeMirror.EditorView.theme({
|
|
1154
|
+
'&.cm-editor': {height: '100%'},
|
|
1155
|
+
'.cm-scroller': {overflow: 'auto'},
|
|
1156
|
+
'.cm-lineNumbers .cm-gutterElement.cm-nonBreakableLine': {color: 'var(--color-non-breakable-line)'},
|
|
1157
|
+
'.cm-searchMatch': {
|
|
1158
|
+
border: '1px solid var(--color-search-match-border)',
|
|
1159
|
+
borderRadius: '3px',
|
|
1160
|
+
margin: '0 -1px',
|
|
1161
|
+
'&.cm-searchMatch-selected': {
|
|
1162
|
+
borderRadius: '1px',
|
|
1163
|
+
backgroundColor: 'var(--color-selected-search-match-background)',
|
|
1164
|
+
borderColor: 'var(--color-selected-search-match-background)',
|
|
1165
|
+
'&, & *': {
|
|
1166
|
+
color: 'var(--color-selected-search-match) !important',
|
|
1167
|
+
},
|
|
1168
|
+
},
|
|
1169
|
+
},
|
|
1170
|
+
':host-context(.pretty-printed) & .cm-lineNumbers .cm-gutterElement': {
|
|
1171
|
+
color: 'var(--legacy-accent-color)',
|
|
1172
|
+
},
|
|
1173
|
+
});
|
|
@@ -25,121 +25,11 @@
|
|
|
25
25
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
26
26
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
27
27
|
*/
|
|
28
|
-
.cm-js-keyword {
|
|
29
|
-
color: hsl(310deg 86% 36%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.cm-js-number {
|
|
33
|
-
color: hsl(248deg 100% 41%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.cm-js-comment {
|
|
37
|
-
color: hsl(120deg 100% 23%); /* stylelint-disable-line plugin/use_theme_colors */
|
|
38
|
-
/* See: crbug.com/1152736 for color variable migration. */
|
|
39
|
-
font-style: italic;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.cm-js-string {
|
|
43
|
-
color: hsl(1deg 80% 43%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.cm-js-string-2 {
|
|
47
|
-
color: hsl(1deg 99% 39%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.cm-js-atom {
|
|
51
|
-
color: hsl(310deg 86% 36%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.cm-js-def {
|
|
55
|
-
color: hsl(240deg 73% 38%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.cm-js-operator {
|
|
59
|
-
color: hsl(27deg 100% 30%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.cm-js-meta {
|
|
63
|
-
color: hsl(27deg 100% 30%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.cm-js-variable-2 {
|
|
67
|
-
color: hsl(240deg 73% 38%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.cm-css-keyword {
|
|
71
|
-
color: rgb(7 144 154); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.cm-css-number {
|
|
75
|
-
color: rgb(50 0 255); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.cm-css-comment {
|
|
79
|
-
color: rgb(0 116 0); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
80
|
-
}
|
|
81
28
|
|
|
82
|
-
.cm-css-def {
|
|
83
|
-
color: rgb(200 0 0); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.cm-css-meta {
|
|
87
|
-
color: rgb(200 0 0); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.cm-css-atom {
|
|
91
|
-
color: rgb(7 144 154); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.cm-css-string {
|
|
95
|
-
color: rgb(7 144 154); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.cm-css-string-2 {
|
|
99
|
-
color: rgb(7 144 154); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.cm-css-link {
|
|
103
|
-
color: rgb(7 144 154); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.cm-css-variable {
|
|
107
|
-
color: rgb(200 0 0); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.cm-css-variable-2 {
|
|
111
|
-
color: rgb(0 0 128); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.cm-css-property,
|
|
115
29
|
.webkit-css-property {
|
|
116
30
|
color: var(--webkit-css-property-color, rgb(200 0 0)); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
117
31
|
}
|
|
118
32
|
|
|
119
|
-
.cm-xml-meta {
|
|
120
|
-
color: rgb(192 192 192); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.cm-xml-comment {
|
|
124
|
-
color: rgb(35 110 37); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.cm-xml-string {
|
|
128
|
-
color: rgb(26 26 166); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.cm-xml-tag {
|
|
132
|
-
color: var(--color-token-tag);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.cm-xml-attribute {
|
|
136
|
-
color: rgb(153 69 0); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.cm-xml-link {
|
|
140
|
-
color: #00e; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
141
|
-
}
|
|
142
|
-
|
|
143
33
|
.webkit-html-comment {
|
|
144
34
|
/* Keep this in sync with view-source.css (.webkit-html-comment) */
|
|
145
35
|
color: rgb(35 110 37); /* stylelint-disable-line plugin/use_theme_colors */
|
|
@@ -228,107 +118,6 @@
|
|
|
228
118
|
.devtools-link:not(.devtools-link-prevent-click) {
|
|
229
119
|
cursor: pointer;
|
|
230
120
|
}
|
|
231
|
-
/* Default CodeMirror Theme */
|
|
232
|
-
.cm-negative {
|
|
233
|
-
color: #d44; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.cm-positive {
|
|
237
|
-
color: #292; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.cm-header,
|
|
241
|
-
.cm-strong { font-weight: bold; }
|
|
242
|
-
.cm-em { font-style: italic; }
|
|
243
|
-
|
|
244
|
-
.cm-link {
|
|
245
|
-
text-decoration: underline;
|
|
246
|
-
color: #00c; /* stylelint-disable-line plugin/use_theme_colors */
|
|
247
|
-
/* See: crbug.com/1152736 for color variable migration. */
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.cm-strikethrough { text-decoration: line-through; }
|
|
251
|
-
|
|
252
|
-
.cm-invalidchar {
|
|
253
|
-
color: #f00; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.cm-header {
|
|
257
|
-
color: #00f; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.cm-quote {
|
|
261
|
-
color: #090; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.cm-keyword {
|
|
265
|
-
color: #708; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.cm-atom {
|
|
269
|
-
color: #219; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.cm-number {
|
|
273
|
-
color: #164; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.cm-def {
|
|
277
|
-
color: #00f; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.cm-variable-2 {
|
|
281
|
-
color: #05a; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.cm-variable-3,
|
|
285
|
-
.cm-type {
|
|
286
|
-
color: #085; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.cm-comment {
|
|
290
|
-
color: #a50; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.cm-string {
|
|
294
|
-
color: #a11; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.cm-string-2 {
|
|
298
|
-
color: #f50; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.cm-meta {
|
|
302
|
-
color: #555; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.cm-qualifier {
|
|
306
|
-
color: #555; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.cm-builtin {
|
|
310
|
-
color: #30a; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.cm-bracket {
|
|
314
|
-
color: #997; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.cm-tag {
|
|
318
|
-
color: #170; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.cm-attribute {
|
|
322
|
-
color: #00c; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.cm-hr {
|
|
326
|
-
color: #999; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.cm-error {
|
|
330
|
-
color: #f00; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
|
|
331
|
-
}
|
|
332
121
|
|
|
333
122
|
@media (forced-colors: active) {
|
|
334
123
|
.devtools-link:not(.devtools-link-prevent-click) {
|
|
@@ -166,12 +166,6 @@ UI.TabbedPane = UIModule.TabbedPane.TabbedPane;
|
|
|
166
166
|
/** @enum {symbol} */
|
|
167
167
|
UI.TabbedPane.Events = UIModule.TabbedPane.Events;
|
|
168
168
|
|
|
169
|
-
/** @interface */
|
|
170
|
-
UI.TextEditor = UIModule.TextEditor.TextEditor;
|
|
171
|
-
|
|
172
|
-
/** @interface */
|
|
173
|
-
UI.TextEditorFactory = UIModule.TextEditor.TextEditorFactory;
|
|
174
|
-
|
|
175
169
|
/** @constructor */
|
|
176
170
|
UI.TextPrompt = UIModule.TextPrompt.TextPrompt;
|
|
177
171
|
|
|
@@ -43,7 +43,6 @@ import * as SplitWidget from './SplitWidget.js';
|
|
|
43
43
|
import * as SuggestBox from './SuggestBox.js';
|
|
44
44
|
import * as TabbedPane from './TabbedPane.js';
|
|
45
45
|
import * as TargetCrashedScreen from './TargetCrashedScreen.js';
|
|
46
|
-
import * as TextEditor from './TextEditor.js';
|
|
47
46
|
import * as TextPrompt from './TextPrompt.js';
|
|
48
47
|
import * as ThrottledWidget from './ThrottledWidget.js';
|
|
49
48
|
import * as Toolbar from './Toolbar.js';
|
|
@@ -101,7 +100,6 @@ export {
|
|
|
101
100
|
SuggestBox,
|
|
102
101
|
TabbedPane,
|
|
103
102
|
TargetCrashedScreen,
|
|
104
|
-
TextEditor,
|
|
105
103
|
TextPrompt,
|
|
106
104
|
ThrottledWidget,
|
|
107
105
|
Toolbar,
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
.tabbed-pane-header-tab:hover,
|
|
135
135
|
.tabbed-pane-shadow .tabbed-pane-header-tab:focus-visible {
|
|
136
136
|
color: var(--color-text-primary);
|
|
137
|
-
background-color: var(--color-background-elevation-
|
|
137
|
+
background-color: var(--color-background-elevation-2);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.tabbed-pane-header-tab-title {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
--color-image-preview-background: rgb(255 255 255);
|
|
111
111
|
|
|
112
112
|
/* Colors for styling inputs */
|
|
113
|
-
--color-input-outline: rgb(
|
|
113
|
+
--color-input-outline: rgb(218 220 224);
|
|
114
114
|
--color-input-outline-active: rgb(26 115 232);
|
|
115
115
|
--color-input-outline-error: rgb(217 48 37);
|
|
116
116
|
--color-input-outline-disabled: rgba(128 134 139 / 20%);
|
|
@@ -2,19 +2,8 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export function appendStyle(node: Node, cssReference: string|{cssContent: string}): void {
|
|
8
|
-
let content: string;
|
|
9
|
-
if (typeof cssReference === 'string') {
|
|
10
|
-
content = Root.Runtime.cachedResources.get(cssReference) || '';
|
|
11
|
-
if (!content) {
|
|
12
|
-
console.error(cssReference + ' not preloaded. Check module.json');
|
|
13
|
-
}
|
|
14
|
-
} else {
|
|
15
|
-
content = cssReference.cssContent;
|
|
16
|
-
}
|
|
5
|
+
export function appendStyle(node: Node, {cssContent}: {cssContent: string}): void {
|
|
17
6
|
const styleElement = document.createElement('style');
|
|
18
|
-
styleElement.textContent =
|
|
7
|
+
styleElement.textContent = cssContent;
|
|
19
8
|
node.appendChild(styleElement);
|
|
20
9
|
}
|
|
@@ -7,7 +7,7 @@ import {focusChanged} from './focus-changed.js';
|
|
|
7
7
|
import {injectCoreStyles} from './inject-core-styles.js';
|
|
8
8
|
|
|
9
9
|
interface Options {
|
|
10
|
-
cssFile?:
|
|
10
|
+
cssFile?: CSSStyleSheet[]|{cssContent: string};
|
|
11
11
|
delegatesFocus?: boolean;
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -22,10 +22,12 @@ export function createShadowRootWithCoreStyles(element: Element, options: Option
|
|
|
22
22
|
|
|
23
23
|
const shadowRoot = element.attachShadow({mode: 'open', delegatesFocus});
|
|
24
24
|
injectCoreStyles(shadowRoot);
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
if (cssFile) {
|
|
26
|
+
if ('cssContent' in cssFile) {
|
|
27
|
+
appendStyle(shadowRoot, cssFile);
|
|
28
|
+
} else {
|
|
29
|
+
shadowRoot.adoptedStyleSheets = cssFile;
|
|
30
|
+
}
|
|
29
31
|
}
|
|
30
32
|
shadowRoot.addEventListener('focus', focusChanged, true);
|
|
31
33
|
return shadowRoot;
|
package/package.json
CHANGED
|
@@ -27,10 +27,8 @@
|
|
|
27
27
|
"auto-unittest": "scripts/test/run_auto_unittests.py --no-text-coverage",
|
|
28
28
|
"build": "autoninja -C out/Default",
|
|
29
29
|
"build-release": "autoninja -C out/Release",
|
|
30
|
-
"check": "npm run check-
|
|
30
|
+
"check": "npm run check-lint && npm run check-loc",
|
|
31
31
|
"check-external-links": "third_party/node/node.py --output scripts/check_external_links.js",
|
|
32
|
-
"check-gn": "third_party/node/node.py --output scripts/check_gn.js",
|
|
33
|
-
"check-json": "third_party/node/node.py --output scripts/json_validator/validate_module_json.js",
|
|
34
32
|
"check-lint": "third_party/node/node.py --output scripts/test/run_lint_check_js.mjs && third_party/node/node.py --output scripts/test/run_lint_check_css.js",
|
|
35
33
|
"check-lint-css": "third_party/node/node.py --output scripts/test/run_lint_check_css.js",
|
|
36
34
|
"collect-strings": "third_party/node/node.py --output third_party/i18n/collect-strings.js front_end",
|
|
@@ -55,5 +53,5 @@
|
|
|
55
53
|
"unittest": "scripts/test/run_unittests.py --no-text-coverage",
|
|
56
54
|
"watch": "third_party/node/node.py --output scripts/watch_build.js"
|
|
57
55
|
},
|
|
58
|
-
"version": "1.0.
|
|
56
|
+
"version": "1.0.948295"
|
|
59
57
|
}
|
|
@@ -12,7 +12,6 @@ Builds inspector overlay:
|
|
|
12
12
|
|
|
13
13
|
from os import path
|
|
14
14
|
from os.path import join
|
|
15
|
-
from modular_build import read_file, write_file
|
|
16
15
|
from itertools import tee
|
|
17
16
|
|
|
18
17
|
import os
|
|
@@ -29,6 +28,21 @@ finally:
|
|
|
29
28
|
sys.path = original_sys_path
|
|
30
29
|
|
|
31
30
|
|
|
31
|
+
def read_file(filename):
|
|
32
|
+
with open(path.normpath(filename), 'rt', encoding='utf-8') as input:
|
|
33
|
+
return input.read()
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def write_file(filename, content):
|
|
37
|
+
if path.exists(filename):
|
|
38
|
+
os.remove(filename)
|
|
39
|
+
directory = path.dirname(filename)
|
|
40
|
+
if not path.exists(directory):
|
|
41
|
+
os.makedirs(directory)
|
|
42
|
+
with open(filename, 'wt', encoding='utf-8') as output:
|
|
43
|
+
output.write(content)
|
|
44
|
+
|
|
45
|
+
|
|
32
46
|
def check_size(filename, data, max_size):
|
|
33
47
|
assert len(
|
|
34
48
|
data
|