chrome-devtools-frontend 1.0.945884 → 1.0.946351
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/config/gni/all_devtools_files.gni +0 -5
- package/config/gni/devtools_grd_files.gni +0 -33
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/i18n/locales/en-US.json +3 -12
- package/front_end/core/i18n/locales/en-XL.json +3 -12
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/CSSProperty.ts +16 -9
- package/front_end/devtools_compatibility.js +0 -7
- package/front_end/entrypoints/devtools_app/devtools_app.js +3 -0
- package/front_end/entrypoints/devtools_app/devtools_app.json +1 -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/js_app/js_app.js +3 -0
- package/front_end/entrypoints/js_app/js_app.json +1 -2
- package/front_end/entrypoints/main/MainImpl.ts +0 -6
- package/front_end/entrypoints/ndb_app/ndb_app.js +3 -0
- package/front_end/entrypoints/ndb_app/ndb_app.json +1 -2
- package/front_end/entrypoints/node_app/node_app.js +3 -0
- package/front_end/entrypoints/node_app/node_app.json +1 -2
- package/front_end/entrypoints/shell/shell.js +18 -1
- package/front_end/entrypoints/worker_app/worker_app.js +3 -0
- package/front_end/entrypoints/worker_app/worker_app.json +1 -2
- package/front_end/legacy_test_runner/sources_test_runner/sources_test_runner.js +0 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
- package/front_end/models/bindings/ResourceMapping.ts +1 -1
- package/front_end/models/formatter/FormatterWorkerPool.ts +0 -18
- 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/application/ApplicationPanelSidebar.ts +2 -4
- package/front_end/panels/elements/elementsTreeOutline.css +0 -13
- package/front_end/panels/network/NetworkConfigView.ts +10 -0
- package/front_end/panels/network/NetworkItemView.ts +3 -0
- package/front_end/panels/network/networkConfigView.css +5 -0
- package/front_end/panels/profiler/profilesPanel.css +1 -1
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +6 -4
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +0 -12
- package/front_end/panels/sources/DebuggerPlugin.ts +6 -2
- package/front_end/panels/sources/sourcesView.css +0 -130
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +1 -25
- package/front_end/ui/components/text_editor/config.ts +3 -3
- package/front_end/ui/components/text_editor/javascript.ts +21 -3
- package/front_end/ui/components/text_editor/theme.ts +1 -0
- 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 +3 -0
- 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/inspector_overlay/main.ts +12 -2
- package/package.json +1 -1
- package/scripts/check_gn.js +1 -1
- package/scripts/hosted_mode/server.js +17 -2
- package/front_end/entrypoints/shell/shell-meta-files.ts +0 -22
- package/front_end/entrypoints/shell/shell.json +0 -5
- 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
|
@@ -30,7 +30,6 @@ all_devtools_files = [
|
|
|
30
30
|
"front_end/legacy_test_runner/bindings_test_runner/IsolatedFilesystemTestRunner.js",
|
|
31
31
|
"front_end/legacy_test_runner/bindings_test_runner/OverridesTestRunner.js",
|
|
32
32
|
"front_end/legacy_test_runner/bindings_test_runner/PersistenceTestRunner.js",
|
|
33
|
-
"front_end/third_party/codemirror/codemirror.css",
|
|
34
33
|
"front_end/legacy_test_runner/console_test_runner/console_test_runner.js",
|
|
35
34
|
"front_end/legacy_test_runner/coverage_test_runner/coverage_test_runner.js",
|
|
36
35
|
"front_end/legacy_test_runner/cpu_profiler_test_runner/cpu_profiler_test_runner.js",
|
|
@@ -114,7 +113,6 @@ all_devtools_files = [
|
|
|
114
113
|
"front_end/models/issues_manager/descriptions/TwaPageUnavailableOffline.md",
|
|
115
114
|
"front_end/legacy_test_runner/sdk_test_runner/sdk_test_runner.js",
|
|
116
115
|
"front_end/legacy_test_runner/security_test_runner/security_test_runner.js",
|
|
117
|
-
"front_end/entrypoints/shell/shell.json",
|
|
118
116
|
"front_end/legacy_test_runner/sources_test_runner/sources_test_runner.js",
|
|
119
117
|
"front_end/legacy_test_runner/sources_test_runner/AutocompleteTestRunner.js",
|
|
120
118
|
"front_end/legacy_test_runner/sources_test_runner/DebuggerTestRunner.js",
|
|
@@ -122,9 +120,6 @@ all_devtools_files = [
|
|
|
122
120
|
"front_end/legacy_test_runner/sources_test_runner/LiveEditTestRunner.js",
|
|
123
121
|
"front_end/legacy_test_runner/sources_test_runner/SearchTestRunner.js",
|
|
124
122
|
"front_end/legacy_test_runner/sources_test_runner/SourcesTestRunner.js",
|
|
125
|
-
"front_end/ui/legacy/components/text_editor/autocompleteTooltip.css",
|
|
126
|
-
"front_end/ui/legacy/components/text_editor/cmdevtools.css",
|
|
127
|
-
"front_end/ui/legacy/components/text_editor/module.json",
|
|
128
123
|
"front_end/third_party/lighthouse/report-assets/report.js",
|
|
129
124
|
"front_end/third_party/lighthouse/report-assets/standalone-template.html",
|
|
130
125
|
]
|
|
@@ -226,7 +226,6 @@ grd_files_release_sources = [
|
|
|
226
226
|
"front_end/entrypoints/node_app/node_app.js",
|
|
227
227
|
"front_end/entrypoints/node_main/node_main-meta.js",
|
|
228
228
|
"front_end/entrypoints/node_main/node_main.js",
|
|
229
|
-
"front_end/entrypoints/shell/shell-meta-files.js",
|
|
230
229
|
"front_end/entrypoints/shell/shell.js",
|
|
231
230
|
"front_end/entrypoints/startup/startup.js",
|
|
232
231
|
"front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js",
|
|
@@ -446,7 +445,6 @@ grd_files_release_sources = [
|
|
|
446
445
|
"front_end/third_party/codemirror.next/chunk/wast.js",
|
|
447
446
|
"front_end/third_party/codemirror.next/chunk/xml.js",
|
|
448
447
|
"front_end/third_party/codemirror.next/codemirror.next.js",
|
|
449
|
-
"front_end/third_party/codemirror/codemirror.js",
|
|
450
448
|
"front_end/third_party/diff/diff-legacy.js",
|
|
451
449
|
"front_end/third_party/diff/diff.js",
|
|
452
450
|
"front_end/third_party/i18n/i18n.js",
|
|
@@ -498,8 +496,6 @@ grd_files_release_sources = [
|
|
|
498
496
|
"front_end/ui/legacy/components/source_frame/source_frame-legacy.js",
|
|
499
497
|
"front_end/ui/legacy/components/source_frame/source_frame-meta.js",
|
|
500
498
|
"front_end/ui/legacy/components/source_frame/source_frame.js",
|
|
501
|
-
"front_end/ui/legacy/components/text_editor/text_editor-legacy.js",
|
|
502
|
-
"front_end/ui/legacy/components/text_editor/text_editor.js",
|
|
503
499
|
"front_end/ui/legacy/components/utils/utils-legacy.js",
|
|
504
500
|
"front_end/ui/legacy/components/utils/utils.js",
|
|
505
501
|
"front_end/ui/legacy/legacy-legacy.js",
|
|
@@ -1264,33 +1260,9 @@ grd_files_debug_sources = [
|
|
|
1264
1260
|
"front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs",
|
|
1265
1261
|
"front_end/third_party/acorn/package/dist/acorn.mjs",
|
|
1266
1262
|
"front_end/third_party/chromium/client-variations/ClientVariations.js",
|
|
1267
|
-
"front_end/third_party/codemirror/package/addon/comment/comment.js",
|
|
1268
|
-
"front_end/third_party/codemirror/package/addon/edit/closebrackets.js",
|
|
1269
|
-
"front_end/third_party/codemirror/package/addon/edit/matchbrackets.js",
|
|
1270
|
-
"front_end/third_party/codemirror/package/addon/fold/brace-fold.js",
|
|
1271
|
-
"front_end/third_party/codemirror/package/addon/fold/foldcode.js",
|
|
1272
|
-
"front_end/third_party/codemirror/package/addon/fold/foldgutter.js",
|
|
1273
|
-
"front_end/third_party/codemirror/package/addon/mode/multiplex.js",
|
|
1274
|
-
"front_end/third_party/codemirror/package/addon/mode/overlay.js",
|
|
1275
|
-
"front_end/third_party/codemirror/package/addon/mode/simple.js",
|
|
1276
1263
|
"front_end/third_party/codemirror/package/addon/runmode/runmode-standalone.js",
|
|
1277
|
-
"front_end/third_party/codemirror/package/addon/selection/active-line.js",
|
|
1278
|
-
"front_end/third_party/codemirror/package/addon/selection/mark-selection.js",
|
|
1279
|
-
"front_end/third_party/codemirror/package/lib/codemirror.js",
|
|
1280
|
-
"front_end/third_party/codemirror/package/mode/clike/clike.js",
|
|
1281
|
-
"front_end/third_party/codemirror/package/mode/clojure/clojure.js",
|
|
1282
|
-
"front_end/third_party/codemirror/package/mode/coffeescript/coffeescript.js",
|
|
1283
1264
|
"front_end/third_party/codemirror/package/mode/css/css.js",
|
|
1284
|
-
"front_end/third_party/codemirror/package/mode/htmlembedded/htmlembedded.js",
|
|
1285
|
-
"front_end/third_party/codemirror/package/mode/htmlmixed/htmlmixed.js",
|
|
1286
1265
|
"front_end/third_party/codemirror/package/mode/javascript/javascript.js",
|
|
1287
|
-
"front_end/third_party/codemirror/package/mode/jsx/jsx.js",
|
|
1288
|
-
"front_end/third_party/codemirror/package/mode/livescript/livescript.js",
|
|
1289
|
-
"front_end/third_party/codemirror/package/mode/markdown/markdown.js",
|
|
1290
|
-
"front_end/third_party/codemirror/package/mode/php/php.js",
|
|
1291
|
-
"front_end/third_party/codemirror/package/mode/python/python.js",
|
|
1292
|
-
"front_end/third_party/codemirror/package/mode/shell/shell.js",
|
|
1293
|
-
"front_end/third_party/codemirror/package/mode/wast/wast.js",
|
|
1294
1266
|
"front_end/third_party/codemirror/package/mode/xml/xml.js",
|
|
1295
1267
|
"front_end/third_party/diff/DiffWrapper.js",
|
|
1296
1268
|
"front_end/third_party/diff/diff_match_patch.js",
|
|
@@ -1456,7 +1428,6 @@ grd_files_debug_sources = [
|
|
|
1456
1428
|
"front_end/ui/legacy/SuggestBox.js",
|
|
1457
1429
|
"front_end/ui/legacy/TabbedPane.js",
|
|
1458
1430
|
"front_end/ui/legacy/TargetCrashedScreen.js",
|
|
1459
|
-
"front_end/ui/legacy/TextEditor.js",
|
|
1460
1431
|
"front_end/ui/legacy/TextPrompt.js",
|
|
1461
1432
|
"front_end/ui/legacy/ThrottledWidget.js",
|
|
1462
1433
|
"front_end/ui/legacy/Toolbar.js",
|
|
@@ -1516,7 +1487,6 @@ grd_files_debug_sources = [
|
|
|
1516
1487
|
"front_end/ui/legacy/components/inline_editor/fontEditor.css.js",
|
|
1517
1488
|
"front_end/ui/legacy/components/inline_editor/swatchPopover.css.js",
|
|
1518
1489
|
"front_end/ui/legacy/components/object_ui/CustomPreviewComponent.js",
|
|
1519
|
-
"front_end/ui/legacy/components/object_ui/JavaScriptAutocomplete.js",
|
|
1520
1490
|
"front_end/ui/legacy/components/object_ui/JavaScriptREPL.js",
|
|
1521
1491
|
"front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.js",
|
|
1522
1492
|
"front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.js",
|
|
@@ -1564,9 +1534,6 @@ grd_files_debug_sources = [
|
|
|
1564
1534
|
"front_end/ui/legacy/components/source_frame/resourceSourceFrame.css.legacy.js",
|
|
1565
1535
|
"front_end/ui/legacy/components/source_frame/xmlTree.css.legacy.js",
|
|
1566
1536
|
"front_end/ui/legacy/components/source_frame/xmlView.css.legacy.js",
|
|
1567
|
-
"front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.js",
|
|
1568
|
-
"front_end/ui/legacy/components/text_editor/TextEditorAutocompleteController.js",
|
|
1569
|
-
"front_end/ui/legacy/components/text_editor/cm_modes.js",
|
|
1570
1537
|
"front_end/ui/legacy/components/utils/ImagePreview.js",
|
|
1571
1538
|
"front_end/ui/legacy/components/utils/JSPresentationUtils.js",
|
|
1572
1539
|
"front_end/ui/legacy/components/utils/Linkifier.js",
|
|
@@ -6383,6 +6383,9 @@
|
|
|
6383
6383
|
"panels/network/NetworkConfigView.ts | caching": {
|
|
6384
6384
|
"message": "Caching"
|
|
6385
6385
|
},
|
|
6386
|
+
"panels/network/NetworkConfigView.ts | clientHintsStatusText": {
|
|
6387
|
+
"message": "User agent updated."
|
|
6388
|
+
},
|
|
6386
6389
|
"panels/network/NetworkConfigView.ts | custom": {
|
|
6387
6390
|
"message": "Custom..."
|
|
6388
6391
|
},
|
|
@@ -11690,15 +11693,6 @@
|
|
|
11690
11693
|
"ui/legacy/components/object_ui/CustomPreviewComponent.ts | showAsJavascriptObject": {
|
|
11691
11694
|
"message": "Show as JavaScript object"
|
|
11692
11695
|
},
|
|
11693
|
-
"ui/legacy/components/object_ui/JavaScriptAutocomplete.ts | keys": {
|
|
11694
|
-
"message": "Keys"
|
|
11695
|
-
},
|
|
11696
|
-
"ui/legacy/components/object_ui/JavaScriptAutocomplete.ts | keywords": {
|
|
11697
|
-
"message": "keywords"
|
|
11698
|
-
},
|
|
11699
|
-
"ui/legacy/components/object_ui/JavaScriptAutocomplete.ts | lexicalScopeVariables": {
|
|
11700
|
-
"message": "Lexical scope variables"
|
|
11701
|
-
},
|
|
11702
11696
|
"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | collapseChildren": {
|
|
11703
11697
|
"message": "Collapse children"
|
|
11704
11698
|
},
|
|
@@ -11963,9 +11957,6 @@
|
|
|
11963
11957
|
"ui/legacy/components/source_frame/XMLView.ts | find": {
|
|
11964
11958
|
"message": "Find"
|
|
11965
11959
|
},
|
|
11966
|
-
"ui/legacy/components/text_editor/CodeMirrorTextEditor.ts | codeEditor": {
|
|
11967
|
-
"message": "Code editor"
|
|
11968
|
-
},
|
|
11969
11960
|
"ui/legacy/components/utils/ImagePreview.ts | currentSource": {
|
|
11970
11961
|
"message": "Current source:"
|
|
11971
11962
|
},
|
|
@@ -6383,6 +6383,9 @@
|
|
|
6383
6383
|
"panels/network/NetworkConfigView.ts | caching": {
|
|
6384
6384
|
"message": "Ĉáĉh́îńĝ"
|
|
6385
6385
|
},
|
|
6386
|
+
"panels/network/NetworkConfigView.ts | clientHintsStatusText": {
|
|
6387
|
+
"message": "Ûśêŕ âǵêńt̂ úp̂d́ât́êd́."
|
|
6388
|
+
},
|
|
6386
6389
|
"panels/network/NetworkConfigView.ts | custom": {
|
|
6387
6390
|
"message": "Ĉúŝt́ôḿ..."
|
|
6388
6391
|
},
|
|
@@ -11690,15 +11693,6 @@
|
|
|
11690
11693
|
"ui/legacy/components/object_ui/CustomPreviewComponent.ts | showAsJavascriptObject": {
|
|
11691
11694
|
"message": "Ŝh́ôẃ âś Ĵáv̂áŜćr̂íp̂t́ ôb́ĵéĉt́"
|
|
11692
11695
|
},
|
|
11693
|
-
"ui/legacy/components/object_ui/JavaScriptAutocomplete.ts | keys": {
|
|
11694
|
-
"message": "K̂éŷś"
|
|
11695
|
-
},
|
|
11696
|
-
"ui/legacy/components/object_ui/JavaScriptAutocomplete.ts | keywords": {
|
|
11697
|
-
"message": "k̂éŷẃôŕd̂ś"
|
|
11698
|
-
},
|
|
11699
|
-
"ui/legacy/components/object_ui/JavaScriptAutocomplete.ts | lexicalScopeVariables": {
|
|
11700
|
-
"message": "L̂éx̂íĉál̂ śĉóp̂é v̂ár̂íâb́l̂éŝ"
|
|
11701
|
-
},
|
|
11702
11696
|
"ui/legacy/components/object_ui/ObjectPropertiesSection.ts | collapseChildren": {
|
|
11703
11697
|
"message": "Ĉól̂ĺâṕŝé ĉh́îĺd̂ŕêń"
|
|
11704
11698
|
},
|
|
@@ -11963,9 +11957,6 @@
|
|
|
11963
11957
|
"ui/legacy/components/source_frame/XMLView.ts | find": {
|
|
11964
11958
|
"message": "F̂ín̂d́"
|
|
11965
11959
|
},
|
|
11966
|
-
"ui/legacy/components/text_editor/CodeMirrorTextEditor.ts | codeEditor": {
|
|
11967
|
-
"message": "Ĉód̂é êd́ît́ôŕ"
|
|
11968
|
-
},
|
|
11969
11960
|
"ui/legacy/components/utils/ImagePreview.ts | currentSource": {
|
|
11970
11961
|
"message": "Ĉúr̂ŕêńt̂ śôúr̂ćê:"
|
|
11971
11962
|
},
|
|
@@ -59,7 +59,6 @@ export const mappingForLayoutTests = new Map<string, string>([
|
|
|
59
59
|
['ui/legacy/components/source_frame', 'source_frame'],
|
|
60
60
|
['ui/legacy/components/color_picker', 'color_picker'],
|
|
61
61
|
['ui/legacy/components/cookie_table', 'cookie_table'],
|
|
62
|
-
['ui/legacy/components/text_editor', 'text_editor'],
|
|
63
62
|
['ui/legacy/components/quick_open', 'quick_open'],
|
|
64
63
|
['ui/legacy/components/utils', 'components'],
|
|
65
64
|
]);
|
|
@@ -6,8 +6,8 @@ import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
|
6
6
|
import * as Common from '../common/common.js';
|
|
7
7
|
import * as HostModule from '../host/host.js';
|
|
8
8
|
import * as Platform from '../platform/platform.js';
|
|
9
|
+
import * as Root from '../root/root.js';
|
|
9
10
|
import type * as Protocol from '../../generated/protocol.js';
|
|
10
|
-
import type * as CodeMirrorModule from '../../third_party/codemirror/codemirror-legacy.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
11
11
|
|
|
12
12
|
import {cssMetadata, GridAreaRowRegex} from './CSSMetadata.js';
|
|
13
13
|
import type {Edit} from './CSSModel.js';
|
|
@@ -178,7 +178,7 @@ export class CSSProperty {
|
|
|
178
178
|
|
|
179
179
|
static formatStyle(
|
|
180
180
|
styleText: string, indentation: string, endIndentation: string,
|
|
181
|
-
tokenizerFactory: TextUtils.TextUtils.TokenizerFactory
|
|
181
|
+
tokenizerFactory: TextUtils.TextUtils.TokenizerFactory): string {
|
|
182
182
|
const doubleIndent = indentation.substring(endIndentation.length) + indentation;
|
|
183
183
|
if (indentation) {
|
|
184
184
|
indentation = '\n' + indentation;
|
|
@@ -188,7 +188,7 @@ export class CSSProperty {
|
|
|
188
188
|
let propertyText = '';
|
|
189
189
|
let insideProperty = false;
|
|
190
190
|
let needsSemi = false;
|
|
191
|
-
const tokenize = tokenizerFactory.createTokenizer('text/css'
|
|
191
|
+
const tokenize = tokenizerFactory.createTokenizer('text/css');
|
|
192
192
|
|
|
193
193
|
tokenize('*{' + styleText + '}', processToken);
|
|
194
194
|
if (insideProperty) {
|
|
@@ -199,10 +199,10 @@ export class CSSProperty {
|
|
|
199
199
|
|
|
200
200
|
function processToken(token: string, tokenType: string|null, _column: number, _newColumn: number): void {
|
|
201
201
|
if (!insideProperty) {
|
|
202
|
-
const disabledProperty = tokenType && tokenType.includes('
|
|
202
|
+
const disabledProperty = tokenType && tokenType.includes('comment') && isDisabledProperty(token);
|
|
203
203
|
const isPropertyStart = tokenType &&
|
|
204
|
-
(tokenType.includes('
|
|
205
|
-
tokenType.includes('
|
|
204
|
+
(tokenType.includes('string') || tokenType.includes('meta') || tokenType.includes('property') ||
|
|
205
|
+
tokenType.includes('variable-2'));
|
|
206
206
|
if (disabledProperty) {
|
|
207
207
|
result = result.trimRight() + indentation + token;
|
|
208
208
|
} else if (isPropertyStart) {
|
|
@@ -210,7 +210,7 @@ export class CSSProperty {
|
|
|
210
210
|
propertyText = token;
|
|
211
211
|
} else if (token !== ';' || needsSemi) {
|
|
212
212
|
result += token;
|
|
213
|
-
if (token.trim() && !(tokenType && tokenType.includes('
|
|
213
|
+
if (token.trim() && !(tokenType && tokenType.includes('comment'))) {
|
|
214
214
|
needsSemi = token !== ';';
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -227,11 +227,18 @@ export class CSSProperty {
|
|
|
227
227
|
// implementation takes special care to restore a single
|
|
228
228
|
// whitespace token in this edge case. https://crbug.com/1071296
|
|
229
229
|
const trimmedPropertyText = propertyText.trim();
|
|
230
|
-
result =
|
|
231
|
-
(trimmedPropertyText.endsWith(':') ? ' ' : '')
|
|
230
|
+
result =
|
|
231
|
+
result.trimRight() + indentation + trimmedPropertyText + (trimmedPropertyText.endsWith(':') ? ' ' : '');
|
|
232
232
|
needsSemi = false;
|
|
233
233
|
insideProperty = false;
|
|
234
234
|
propertyName = '';
|
|
235
|
+
if (Root.Runtime.experiments.isEnabled('preciseChanges')) {
|
|
236
|
+
result += token;
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
// We preserve the legacy behavior to always add semicolon to
|
|
240
|
+
// declarations regardless of its original text.
|
|
241
|
+
result += ';';
|
|
235
242
|
if (token === '}') {
|
|
236
243
|
result += '}';
|
|
237
244
|
}
|
|
@@ -1490,13 +1490,6 @@
|
|
|
1490
1490
|
styleRules.push('* { min-width: 0; min-height: 0; }');
|
|
1491
1491
|
}
|
|
1492
1492
|
|
|
1493
|
-
if (majorVersion <= 51) {
|
|
1494
|
-
// Support for quirky border-image behavior (<M51), see:
|
|
1495
|
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=559258
|
|
1496
|
-
styleRules.push('.cm-breakpoint .CodeMirror-linenumber { border-style: solid !important; }');
|
|
1497
|
-
styleRules.push(
|
|
1498
|
-
'.cm-breakpoint.cm-breakpoint-conditional .CodeMirror-linenumber { border-style: solid !important; }');
|
|
1499
|
-
}
|
|
1500
1493
|
if (majorVersion <= 71) {
|
|
1501
1494
|
styleRules.push(
|
|
1502
1495
|
'.coverage-toolbar-container, .animation-timeline-toolbar-container, .computed-properties { flex-basis: auto; }');
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
import '../shell/shell.js';
|
|
5
5
|
import './devtools_app-meta-files.js';
|
|
6
|
+
|
|
7
|
+
import * as Main from '../main/main.js';
|
|
6
8
|
import * as Startup from '../startup/startup.js';
|
|
7
9
|
|
|
10
|
+
new Main.MainImpl.MainImpl();
|
|
8
11
|
Startup.RuntimeInstantiator.startApplication('devtools_app');
|
|
@@ -86,9 +86,7 @@ export class CSSFormatter {
|
|
|
86
86
|
if (startLine !== this.lastLine) {
|
|
87
87
|
this.state.eatWhitespace = true;
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
// in CodeMirrorTextEditor.js. In a worker context, we don't use the prefix.
|
|
91
|
-
if (type && (/^(css-)?property/.test(type) || /^(css-)?variable-2/.test(type)) && !this.state.inPropertyValue) {
|
|
89
|
+
if (type && (/^property/.test(type) || /^variable-2/.test(type)) && !this.state.inPropertyValue) {
|
|
92
90
|
this.state.seenProperty = true;
|
|
93
91
|
}
|
|
94
92
|
this.lastLine = startLine;
|
|
@@ -9,7 +9,5 @@ export const enum FormatterActions {
|
|
|
9
9
|
JAVASCRIPT_OUTLINE = 'javaScriptOutline',
|
|
10
10
|
JAVASCRIPT_IDENTIFIERS = 'javaScriptIdentifiers',
|
|
11
11
|
EVALUATE_JAVASCRIPT_SUBSTRING = 'evaluatableJavaScriptSubstring',
|
|
12
|
-
FIND_LAST_EXPRESSION = 'findLastExpression',
|
|
13
|
-
FIND_LAST_FUNCTION_CALL = 'findLastFunctionCall',
|
|
14
12
|
ARGUMENTS_LIST = 'argumentsList',
|
|
15
13
|
}
|
|
@@ -230,55 +230,6 @@ export function format(
|
|
|
230
230
|
return result;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
export function findLastFunctionCall(content: string): {
|
|
234
|
-
baseExpression: string,
|
|
235
|
-
receiver: string,
|
|
236
|
-
argumentIndex: number,
|
|
237
|
-
functionName: string,
|
|
238
|
-
}|null {
|
|
239
|
-
if (content.length > 10000) {
|
|
240
|
-
return null;
|
|
241
|
-
}
|
|
242
|
-
try {
|
|
243
|
-
const tokenizer = Acorn.tokenizer(content, {ecmaVersion: ECMA_VERSION});
|
|
244
|
-
while (tokenizer.getToken().type !== Acorn.tokTypes.eof) {
|
|
245
|
-
}
|
|
246
|
-
} catch (e) {
|
|
247
|
-
return null;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
const suffix = '000)';
|
|
251
|
-
const base = _lastCompleteExpression(content, suffix, new Set(['CallExpression', 'NewExpression']));
|
|
252
|
-
if (!base) {
|
|
253
|
-
return null;
|
|
254
|
-
}
|
|
255
|
-
if (base.baseNode.type !== 'CallExpression' && base.baseNode.type !== 'NewExpression') {
|
|
256
|
-
return null;
|
|
257
|
-
}
|
|
258
|
-
const callee = base.baseNode['callee'];
|
|
259
|
-
|
|
260
|
-
let functionName = '';
|
|
261
|
-
const functionProperty = callee.type === 'Identifier' ? callee : (callee as Acorn.ESTree.MemberExpression).property;
|
|
262
|
-
if (functionProperty) {
|
|
263
|
-
if (functionProperty.type === 'Identifier') {
|
|
264
|
-
functionName = functionProperty.name;
|
|
265
|
-
} else if (functionProperty.type === 'Literal') {
|
|
266
|
-
functionName = (functionProperty.value as string);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
const argumentIndex = base.baseNode['arguments'].length - 1;
|
|
271
|
-
const baseExpression =
|
|
272
|
-
`(${base.baseExpression.substring(callee.start - base.baseNode.start, callee.end - base.baseNode.start)})`;
|
|
273
|
-
let receiver = '(function(){return this})()';
|
|
274
|
-
if (callee.type === 'MemberExpression') {
|
|
275
|
-
const receiverBase = callee['object'];
|
|
276
|
-
receiver =
|
|
277
|
-
base.baseExpression.substring(receiverBase.start - base.baseNode.start, receiverBase.end - base.baseNode.start);
|
|
278
|
-
}
|
|
279
|
-
return {baseExpression, receiver, argumentIndex, functionName};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
233
|
export function argumentsList(content: string): string[] {
|
|
283
234
|
if (content.length > 10000) {
|
|
284
235
|
return [];
|
|
@@ -349,77 +300,6 @@ export function argumentsList(content: string): string[] {
|
|
|
349
300
|
}
|
|
350
301
|
}
|
|
351
302
|
|
|
352
|
-
export function findLastExpression(content: string): string|null {
|
|
353
|
-
if (content.length > 10000) {
|
|
354
|
-
return null;
|
|
355
|
-
}
|
|
356
|
-
try {
|
|
357
|
-
const tokenizer = Acorn.tokenizer(content, {ecmaVersion: ECMA_VERSION});
|
|
358
|
-
while (tokenizer.getToken().type !== Acorn.tokTypes.eof) {
|
|
359
|
-
}
|
|
360
|
-
} catch (e) {
|
|
361
|
-
return null;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
const suffix = '.DEVTOOLS';
|
|
365
|
-
try {
|
|
366
|
-
Acorn.parse(content + suffix, {ecmaVersion: ECMA_VERSION});
|
|
367
|
-
} catch (parseError) {
|
|
368
|
-
// If this is an invalid location for a '.', don't attempt to give autocomplete
|
|
369
|
-
if (parseError.message.startsWith('Unexpected token') && parseError.pos === content.length) {
|
|
370
|
-
return null;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
const base = _lastCompleteExpression(content, suffix, new Set(['MemberExpression', 'Identifier']));
|
|
374
|
-
if (base) {
|
|
375
|
-
return base.baseExpression;
|
|
376
|
-
}
|
|
377
|
-
return null;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
381
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
382
|
-
export function _lastCompleteExpression(content: string, suffix: string, types: Set<string>): {
|
|
383
|
-
baseNode: Acorn.ESTree.Node,
|
|
384
|
-
baseExpression: string,
|
|
385
|
-
}|null {
|
|
386
|
-
let ast: Acorn.ESTree.Node|null = null;
|
|
387
|
-
let parsedContent = '';
|
|
388
|
-
for (let i = 0; i < content.length; i++) {
|
|
389
|
-
try {
|
|
390
|
-
// Wrap content in paren to successfully parse object literals
|
|
391
|
-
parsedContent = content[i] === '{' ? `(${content.substring(i)})${suffix}` : `${content.substring(i)}${suffix}`;
|
|
392
|
-
ast = (Acorn.parse(parsedContent, {ecmaVersion: ECMA_VERSION}) as Acorn.ESTree.Node);
|
|
393
|
-
break;
|
|
394
|
-
} catch (e) {
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
if (!ast) {
|
|
398
|
-
return null;
|
|
399
|
-
}
|
|
400
|
-
const astEnd = ast.end;
|
|
401
|
-
let baseNode: Acorn.ESTree.Node|null = null;
|
|
402
|
-
const walker = new ESTreeWalker(node => {
|
|
403
|
-
if (baseNode || node.end < astEnd) {
|
|
404
|
-
return ESTreeWalker.SkipSubtree;
|
|
405
|
-
}
|
|
406
|
-
if (types.has(node.type)) {
|
|
407
|
-
baseNode = node;
|
|
408
|
-
}
|
|
409
|
-
return;
|
|
410
|
-
});
|
|
411
|
-
walker.walk(ast);
|
|
412
|
-
if (!baseNode) {
|
|
413
|
-
return null;
|
|
414
|
-
}
|
|
415
|
-
let baseExpression =
|
|
416
|
-
parsedContent.substring((baseNode as Acorn.ESTree.Node).start, parsedContent.length - suffix.length);
|
|
417
|
-
if (baseExpression.startsWith('{')) {
|
|
418
|
-
baseExpression = `(${baseExpression})`;
|
|
419
|
-
}
|
|
420
|
-
return {baseNode, baseExpression};
|
|
421
|
-
}
|
|
422
|
-
|
|
423
303
|
(function disableLoggingForTest(): void {
|
|
424
304
|
if (Root.Runtime.Runtime.queryParam('test')) {
|
|
425
305
|
console.error = (): undefined => undefined;
|
|
@@ -2,12 +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
|
-
import '../../third_party/codemirror/package/addon/runmode/runmode-standalone.js';
|
|
6
|
-
import '../../third_party/codemirror/package/mode/css/css.js';
|
|
7
|
-
import '../../third_party/codemirror/package/mode/xml/xml.js';
|
|
8
|
-
import '../../third_party/codemirror/package/mode/javascript/javascript.js';
|
|
9
|
-
|
|
10
5
|
import * as Platform from '../../core/platform/platform.js';
|
|
6
|
+
|
|
11
7
|
import * as FormatterWorker from './formatter_worker.js';
|
|
12
8
|
|
|
13
9
|
import {FormatterActions} from './FormatterActions.js';
|
|
@@ -38,12 +34,6 @@ self.onmessage = function(event: MessageEvent): void {
|
|
|
38
34
|
case FormatterActions.EVALUATE_JAVASCRIPT_SUBSTRING:
|
|
39
35
|
self.postMessage(FormatterWorker.FormatterWorker.evaluatableJavaScriptSubstring(params.content));
|
|
40
36
|
break;
|
|
41
|
-
case FormatterActions.FIND_LAST_EXPRESSION:
|
|
42
|
-
self.postMessage(FormatterWorker.FormatterWorker.findLastExpression(params.content));
|
|
43
|
-
break;
|
|
44
|
-
case FormatterActions.FIND_LAST_FUNCTION_CALL:
|
|
45
|
-
self.postMessage(FormatterWorker.FormatterWorker.findLastFunctionCall(params.content));
|
|
46
|
-
break;
|
|
47
37
|
case FormatterActions.ARGUMENTS_LIST:
|
|
48
38
|
self.postMessage(FormatterWorker.FormatterWorker.argumentsList(params.content));
|
|
49
39
|
break;
|
|
@@ -2,6 +2,11 @@
|
|
|
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
|
+
import '../../third_party/codemirror/package/addon/runmode/runmode-standalone.js';
|
|
6
|
+
import '../../third_party/codemirror/package/mode/css/css.js';
|
|
7
|
+
import '../../third_party/codemirror/package/mode/xml/xml.js';
|
|
8
|
+
import '../../third_party/codemirror/package/mode/javascript/javascript.js';
|
|
9
|
+
|
|
5
10
|
import * as CSSFormatter from './CSSFormatter.js';
|
|
6
11
|
import * as CSSRuleParser from './CSSRuleParser.js';
|
|
7
12
|
import * as FormattedContentBuilder from './FormattedContentBuilder.js';
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
import '../shell/shell.js';
|
|
5
5
|
import '../../panels/js_profiler/js_profiler-meta.js';
|
|
6
6
|
import './JsMain.js';
|
|
7
|
+
|
|
8
|
+
import * as Main from '../main/main.js';
|
|
7
9
|
import * as Startup from '../startup/startup.js';
|
|
8
10
|
|
|
11
|
+
new Main.MainImpl.MainImpl();
|
|
9
12
|
Startup.RuntimeInstantiator.startApplication('js_app');
|
|
@@ -299,9 +299,6 @@ export class MainImpl {
|
|
|
299
299
|
'keyboardShortcutEditor', 'Enable keyboard shortcut editor', true,
|
|
300
300
|
'https://developer.chrome.com/blog/new-in-devtools-88/#keyboard-shortcuts');
|
|
301
301
|
|
|
302
|
-
// Back/forward cache
|
|
303
|
-
Root.Runtime.experiments.register('bfcacheDebugging', 'Enable back/forward cache debugging support');
|
|
304
|
-
|
|
305
302
|
// Timeline
|
|
306
303
|
Root.Runtime.experiments.register('timelineEventInitiators', 'Timeline: event initiators');
|
|
307
304
|
Root.Runtime.experiments.register('timelineInvalidationTracking', 'Timeline: invalidation tracking', true);
|
|
@@ -371,7 +368,6 @@ export class MainImpl {
|
|
|
371
368
|
Root.Runtime.experiments.enableExperimentsByDefault([
|
|
372
369
|
'sourceOrderViewer',
|
|
373
370
|
'hideIssuesFeature',
|
|
374
|
-
'bfcacheDebugging',
|
|
375
371
|
'cssTypeComponentLength',
|
|
376
372
|
'preciseChanges',
|
|
377
373
|
Root.Runtime.ExperimentName.SYNC_SETTINGS,
|
|
@@ -1011,5 +1007,3 @@ export class ReloadActionDelegate implements UI.ActionRegistration.ActionDelegat
|
|
|
1011
1007
|
return false;
|
|
1012
1008
|
}
|
|
1013
1009
|
}
|
|
1014
|
-
|
|
1015
|
-
new MainImpl();
|
|
@@ -2,6 +2,9 @@
|
|
|
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
|
import '../shell/shell.js';
|
|
5
|
+
|
|
6
|
+
import * as Main from '../main/main.js';
|
|
5
7
|
import * as Startup from '../startup/startup.js';
|
|
6
8
|
|
|
9
|
+
new Main.MainImpl.MainImpl();
|
|
7
10
|
Startup.RuntimeInstantiator.startApplication('ndb_app');
|
|
@@ -5,9 +5,12 @@ import '../shell/shell.js';
|
|
|
5
5
|
import '../../panels/js_profiler/js_profiler-meta.js';
|
|
6
6
|
import '../node_main/node_main-meta.js';
|
|
7
7
|
import './node_app-meta.js';
|
|
8
|
+
|
|
9
|
+
import * as Main from '../main/main.js';
|
|
8
10
|
import * as Startup from '../startup/startup.js';
|
|
9
11
|
|
|
10
12
|
// Side-effect start the `node_main` module, which implements runnables in
|
|
11
13
|
// the NodeMain class
|
|
12
14
|
await import('../node_main/node_main.js');
|
|
15
|
+
new Main.MainImpl.MainImpl();
|
|
13
16
|
Startup.RuntimeInstantiator.startApplication('node_app');
|
|
@@ -8,6 +8,23 @@ import '../../core/root/root-legacy.js';
|
|
|
8
8
|
import '../../core/platform/platform.js';
|
|
9
9
|
import '../../core/dom_extension/dom_extension.js';
|
|
10
10
|
|
|
11
|
-
import '
|
|
11
|
+
import '../../panels/sources/sources-meta.js';
|
|
12
|
+
import '../../panels/profiler/profiler-meta.js';
|
|
13
|
+
import '../../panels/console/console-meta.js';
|
|
14
|
+
import '../../panels/coverage/coverage-meta.js';
|
|
15
|
+
import '../../panels/changes/changes-meta.js';
|
|
16
|
+
import '../../panels/input/input-meta.js';
|
|
17
|
+
import '../../ui/components/linear_memory_inspector/linear_memory_inspector-meta.js';
|
|
18
|
+
import '../../panels/settings/settings-meta.js';
|
|
19
|
+
import '../../panels/protocol_monitor/protocol_monitor-meta.js';
|
|
20
|
+
import '../../models/persistence/persistence-meta.js';
|
|
21
|
+
import '../../models/logs/logs-meta.js';
|
|
22
|
+
import '../main/main-meta.js';
|
|
23
|
+
import '../../ui/legacy/components/perf_ui/perf_ui-meta.js';
|
|
24
|
+
import '../../ui/legacy/components/quick_open/quick_open-meta.js';
|
|
25
|
+
import '../../core/sdk/sdk-meta.js';
|
|
26
|
+
import '../../ui/legacy/components/source_frame/source_frame-meta.js';
|
|
27
|
+
import '../../panels/console_counters/console_counters-meta.js';
|
|
28
|
+
import '../../ui/legacy/components/object_ui/object_ui-meta.js';
|
|
12
29
|
import '../main/main.js';
|
|
13
30
|
// We generate the descriptors in this file, which depend on the runtime.
|
|
@@ -13,6 +13,9 @@ import '../../panels/network/network-meta.js';
|
|
|
13
13
|
import '../../panels/application/application-meta.js';
|
|
14
14
|
import '../../panels/timeline/timeline-meta.js';
|
|
15
15
|
import './WorkerMain.js';
|
|
16
|
+
|
|
17
|
+
import * as Main from '../main/main.js';
|
|
16
18
|
import * as Startup from '../startup/startup.js';
|
|
17
19
|
|
|
20
|
+
new Main.MainImpl.MainImpl();
|
|
18
21
|
Startup.RuntimeInstantiator.startApplication('worker_app');
|
|
@@ -8,7 +8,6 @@ import '../../models/workspace/workspace-legacy.js';
|
|
|
8
8
|
import '../../ui/legacy/components/source_frame/source_frame-legacy.js';
|
|
9
9
|
import '../../models/text_utils/text_utils-legacy.js';
|
|
10
10
|
import '../../ui/legacy/components/object_ui/object_ui-legacy.js';
|
|
11
|
-
import '../../ui/legacy/components/text_editor/text_editor-legacy.js';
|
|
12
11
|
import '../../panels/browser_debugger/browser_debugger-legacy.js';
|
|
13
12
|
|
|
14
13
|
import './SourcesTestRunner.js';
|