Skip to content

Commit 52dfa35

Browse files
committed
devtools -> dirac as of 9b75efc
1 parent 614e655 commit 52dfa35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+8546
-180
lines changed

BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ generated_non_autostart_non_remote_modules = [
167167
"$resources_out_dir/timeline_model/timeline_model_module.js",
168168
"$resources_out_dir/timeline/timeline_module.js",
169169
"$resources_out_dir/web_audio/web_audio_module.js",
170+
"$resources_out_dir/dirac_lazy/dirac_lazy_module.js",
170171
"$resources_out_dir/webauthn/webauthn_module.js",
171172
"$resources_out_dir/workspace_diff/workspace_diff_module.js",
172173
"$resources_out_dir/emulated_devices/emulated_devices_module.js",

DEPS

+45-45
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ hooks = [
9696
'--no_auth',
9797
'--bucket', 'chromium-nodejs/12.14.1',
9898
'-s', 'third_party/node/linux/node-linux-x64.tar.gz.sha1',
99-
],
99+
],
100100
},
101101
{
102102
'name': 'node_mac',
@@ -109,7 +109,7 @@ hooks = [
109109
'--no_auth',
110110
'--bucket', 'chromium-nodejs/12.14.1',
111111
'-s', 'third_party/node/mac/node-darwin-x64.tar.gz.sha1',
112-
],
112+
],
113113
},
114114
{
115115
'name': 'node_win',
@@ -121,7 +121,7 @@ hooks = [
121121
'--no_auth',
122122
'--bucket', 'chromium-nodejs/12.14.1',
123123
'-s', 'third_party/node/win/node.exe.sha1',
124-
],
124+
],
125125
},
126126

127127
{
@@ -130,9 +130,9 @@ hooks = [
130130
'name': 'disable_depot_tools_selfupdate',
131131
'pattern': '.',
132132
'action': [
133-
'python',
134-
'third_party/depot_tools/update_depot_tools_toggle.py',
135-
'--disable',
133+
'python',
134+
'third_party/depot_tools/update_depot_tools_toggle.py',
135+
'--disable',
136136
],
137137
},
138138

@@ -147,7 +147,7 @@ hooks = [
147147
'--no_auth',
148148
'--bucket', 'chromium-clang-format',
149149
'-s', 'buildtools/win/clang-format.exe.sha1',
150-
],
150+
],
151151
},
152152
{
153153
'name': 'clang_format_mac',
@@ -159,7 +159,7 @@ hooks = [
159159
'--no_auth',
160160
'--bucket', 'chromium-clang-format',
161161
'-s', 'buildtools/mac/clang-format.sha1',
162-
],
162+
],
163163
},
164164
{
165165
'name': 'clang_format_linux',
@@ -171,46 +171,46 @@ hooks = [
171171
'--no_auth',
172172
'--bucket', 'chromium-clang-format',
173173
'-s', 'buildtools/linux64/clang-format.sha1',
174-
],
174+
],
175175
},
176176

177177
# Pull chromium from common storage
178-
{
179-
'name': 'download_chromium_win',
180-
'pattern': '.',
181-
'condition': 'host_os == "win"',
182-
'action': [ 'python',
183-
'scripts/deps/download_chromium.py',
184-
'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win_x64/' + Var('chromium_win') + '/chrome-win.zip',
185-
'third_party/chrome',
186-
'chrome-win/chrome.exe',
187-
Var('chromium_win'),
188-
],
189-
},
190-
{
191-
'name': 'download_chromium_mac',
192-
'pattern': '.',
193-
'condition': 'host_os == "mac"',
194-
'action': [ 'python',
195-
'scripts/deps/download_chromium.py',
196-
'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/' + Var('chromium_mac') + '/chrome-mac.zip',
197-
'third_party/chrome',
198-
'chrome-mac/Chromium.app/Contents',
199-
Var('chromium_mac'),
200-
],
201-
},
202-
{
203-
'name': 'download_chromium_linux',
204-
'pattern': '.',
205-
'condition': 'host_os == "linux"',
206-
'action': [ 'python',
207-
'scripts/deps/download_chromium.py',
208-
'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/' + Var('chromium_linux') + '/chrome-linux.zip',
209-
'third_party/chrome',
210-
'chrome-linux/chrome',
211-
Var('chromium_linux'),
212-
],
213-
},
178+
# {
179+
# 'name': 'download_chromium_win',
180+
# 'pattern': '.',
181+
# 'condition': 'host_os == "win"',
182+
# 'action': [ 'python',
183+
# 'scripts/deps/download_chromium.py',
184+
# 'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win_x64/' + Var('chromium_win') + '/chrome-win.zip',
185+
# 'third_party/chrome',
186+
# 'chrome-win/chrome.exe',
187+
# Var('chromium_win'),
188+
# ],
189+
# },
190+
# {
191+
# 'name': 'download_chromium_mac',
192+
# 'pattern': '.',
193+
# 'condition': 'host_os == "mac"',
194+
# 'action': [ 'python',
195+
# 'scripts/deps/download_chromium.py',
196+
# 'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/' + Var('chromium_mac') + '/chrome-mac.zip',
197+
# 'third_party/chrome',
198+
# 'chrome-mac/Chromium.app/Contents',
199+
# Var('chromium_mac'),
200+
# ],
201+
# },
202+
# {
203+
# 'name': 'download_chromium_linux',
204+
# 'pattern': '.',
205+
# 'condition': 'host_os == "linux"',
206+
# 'action': [ 'python',
207+
# 'scripts/deps/download_chromium.py',
208+
# 'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/' + Var('chromium_linux') + '/chrome-linux.zip',
209+
# 'third_party/chrome',
210+
# 'chrome-linux/chrome',
211+
# Var('chromium_linux'),
212+
# ],
213+
# },
214214
{
215215
'name': 'sysroot_x64',
216216
'pattern': '.',

all_devtools_files.gni

+15
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@
55
import("./scripts/build/ninja/vars.gni")
66

77
all_devtools_files = [
8+
# dirac - start
9+
"front_end/console/clojure-parinfer.js",
10+
"front_end/console/dirac-hacks.css",
11+
"front_end/console/dirac-codemirror.css",
12+
"front_end/console/dirac-theme.css",
13+
"front_end/console/dirac-prompt.css",
14+
"front_end/dirac/module.json",
15+
"front_end/dirac/parinfer.js",
16+
"front_end/dirac/parinfer-codemirror.js",
17+
"front_end/dirac/keysim.js",
18+
"front_end/dirac/dirac.js",
19+
"front_end/dirac/require-implant.js",
20+
"front_end/dirac_lazy/module.json",
21+
"front_end/dirac_lazy/dirac_lazy.js",
22+
# dirac - end
823
"front_end/shell.js",
924
"front_end/accessibility_test_runner/accessibility_test_runner.js",
1025
"front_end/accessibility_test_runner/module.json",

all_devtools_modules.gni

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ import("./scripts/build/ninja/vars.gni")
77
generated_typescript_modules = []
88

99
all_typescript_module_sources = [
10+
# dirac - start
11+
# "dirac/parinfer.js",
12+
# "dirac/parinfer-codemirror.js",
13+
# "dirac/keysim.js",
14+
"third_party/codemirror/package/addon/runmode/runmode.js",
15+
"third_party/codemirror/package/addon/display/placeholder.js",
16+
"console/ConsoleDiracPrompt.js",
17+
# dirac - end
1018
"accessibility/ARIAAttributesView.js",
1119
"accessibility/ARIAMetadata.js",
1220
"accessibility/AXBreadcrumbsPane.js",

devtools.iml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<excludeFolder url="file://$MODULE_DIR$/.idea" />
7+
</content>
8+
<orderEntry type="sourceFolder" forTests="false" />
9+
</component>
10+
</module>

devtools_grd_files.gni

+12
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
# are missed from the GRD.
1111

1212
grd_files_release_sources = [
13+
# dirac - start
14+
# "front_end/dirac/dirac.js",
15+
# "front_end/dirac/parinfer.js",
16+
# "front_end/dirac/parinfer-codemirror.js",
17+
# "front_end/dirac/keysim.js",
18+
# "front_end/dirac_lazy/dirac_lazy_module.js",
19+
# dirac - end
1320
"front_end/Images/accelerometer-back.svg",
1421
"front_end/Images/accelerometer-bottom.png",
1522
"front_end/Images/accelerometer-front.svg",
@@ -448,6 +455,7 @@ grd_files_debug_sources = [
448455
"front_end/console/ConsolePanel.js",
449456
"front_end/console/ConsolePinPane.js",
450457
"front_end/console/ConsolePrompt.js",
458+
"front_end/console/ConsoleDiracPrompt.js",
451459
"front_end/console/ConsoleSidebar.js",
452460
"front_end/console/ConsoleView.js",
453461
"front_end/console/ConsoleViewMessage.js",
@@ -904,6 +912,10 @@ grd_files_debug_sources = [
904912
"front_end/third_party/codemirror/package/addon/runmode/runmode-standalone.js",
905913
"front_end/third_party/codemirror/package/addon/selection/active-line.js",
906914
"front_end/third_party/codemirror/package/addon/selection/mark-selection.js",
915+
# dirac - start
916+
"front_end/third_party/codemirror/package/addon/runmode/runmode.js",
917+
"front_end/third_party/codemirror/package/addon/display/placeholder.js",
918+
# dirac - end
907919
"front_end/third_party/codemirror/package/lib/codemirror.js",
908920
"front_end/third_party/codemirror/package/mode/clike/clike.js",
909921
"front_end/third_party/codemirror/package/mode/clojure/clojure.js",

front_end/accessibility/ARIAAttributesView.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-nocheck
12
// Copyright 2016 The Chromium Authors. All rights reserved.
23
// Use of this source code is governed by a BSD-style license that can be
34
// found in the LICENSE file.

front_end/bindings/ResourceScriptMapping.js

+7
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,13 @@ export class ResourceScriptFile extends Common.ObjectWrapper.ObjectWrapper {
297297
Workspace.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
298298
}
299299

300+
/**
301+
* @return {?SDK.Script.Script}
302+
*/
303+
getScript() {
304+
return this._script;
305+
}
306+
300307
/**
301308
* @param {!Array.<!SDK.Script.Script>} scripts
302309
* @return {boolean}

front_end/cm/cm.js

+4
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ import '../third_party/codemirror/package/addon/selection/mark-selection.js';
1414
import '../third_party/codemirror/package/addon/fold/foldcode.js';
1515
import '../third_party/codemirror/package/addon/fold/foldgutter.js';
1616
import '../third_party/codemirror/package/addon/fold/brace-fold.js';
17+
18+
// for dirac
19+
import '../third_party/codemirror/package/addon/runmode/runmode.js';
20+
import '../third_party/codemirror/package/addon/display/placeholder.js';

front_end/cm/module.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"../third_party/codemirror/package/addon/selection/mark-selection.js",
1313
"../third_party/codemirror/package/addon/fold/foldcode.js",
1414
"../third_party/codemirror/package/addon/fold/foldgutter.js",
15-
"../third_party/codemirror/package/addon/fold/brace-fold.js"
15+
"../third_party/codemirror/package/addon/fold/brace-fold.js",
16+
"../third_party/codemirror/package/addon/runmode/runmode.js",
17+
"../third_party/codemirror/package/addon/display/placeholder.js"
1618
],
1719
"skip_compilation": [
1820
"codemirror.js",
@@ -27,7 +29,9 @@
2729
"../third_party/codemirror/package/addon/selection/mark-selection.js",
2830
"../third_party/codemirror/package/addon/fold/foldcode.js",
2931
"../third_party/codemirror/package/addon/fold/foldgutter.js",
30-
"../third_party/codemirror/package/addon/fold/brace-fold.js"
32+
"../third_party/codemirror/package/addon/fold/brace-fold.js",
33+
"../third_party/codemirror/package/addon/runmode/runmode.js",
34+
"../third_party/codemirror/package/addon/display/placeholder.js"
3135
], "resources": [
3236
"codemirror.css"
3337
]

front_end/common/Settings.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ export class RegExpSetting extends Setting {
441441
* @param {string=} regexFlags
442442
*/
443443
constructor(settings, name, defaultValue, eventSupport, storage, regexFlags) {
444-
super(settings, name, defaultValue ? [{pattern: defaultValue}] : [], eventSupport, storage);
444+
super(settings, name, defaultValue ? (typeof defaultValue === 'string' ? [{pattern: defaultValue}] : defaultValue) : [], eventSupport, storage);
445445
this._regexFlags = regexFlags;
446446
}
447447

front_end/components/Linkifier.js

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-nocheck
12
/*
23
* Copyright (C) 2012 Google Inc. All rights reserved.
34
*
@@ -827,6 +828,7 @@ export class Linkifier {
827828
}
828829
if (contentProvider) {
829830
const lineNumber = uiLocation ? uiLocation.lineNumber : info.lineNumber || 0;
831+
const columnNumber = uiLocation ? uiLocation.columnNumber : info.columnNumber || 0;
830832
for (const title of linkHandlers.keys()) {
831833
const handler = linkHandlers.get(title);
832834
if (!handler) {
@@ -843,6 +845,15 @@ export class Linkifier {
843845
result.push(action);
844846
}
845847
}
848+
if (dirac.hasLinkActions) {
849+
const diracAction = Components.Linkifier.diracLinkHandlerAction;
850+
if (diracAction) {
851+
result.unshift({
852+
title: diracAction.title,
853+
handler: diracAction.handler.bind(null, result, contentProvider.contentURL(), lineNumber, columnNumber)
854+
});
855+
}
856+
}
846857
}
847858
if (resource || info.url) {
848859
result.push({

front_end/components/components-legacy.js

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Components.Linkifier.LinkHandlerSettingUI = ComponentsModule.Linkifier.LinkHandl
2929
/** @constructor */
3030
Components.Linkifier.ContentProviderContextMenuProvider = ComponentsModule.Linkifier.ContentProviderContextMenuProvider;
3131

32+
/** @type {?Object} */
33+
Components.Linkifier.diracLinkHandlerAction = null;
34+
3235
/** @interface */
3336
Components.LinkDecorator = ComponentsModule.Linkifier.LinkDecorator;
3437

front_end/console/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ devtools_module("console") {
1212
"ConsolePanel.js",
1313
"ConsolePinPane.js",
1414
"ConsolePrompt.js",
15+
"ConsoleDiracPrompt.js",
1516
"ConsoleSidebar.js",
1617
"ConsoleView.js",
1718
"ConsoleViewMessage.js",

0 commit comments

Comments
 (0)