Skip to content

Commit

Permalink
devtools -> dirac as of 9b75efc
Browse files Browse the repository at this point in the history
  • Loading branch information
babot committed Oct 30, 2020
1 parent 614e655 commit 52dfa35
Show file tree
Hide file tree
Showing 71 changed files with 8,546 additions and 180 deletions.
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ generated_non_autostart_non_remote_modules = [
"$resources_out_dir/timeline_model/timeline_model_module.js",
"$resources_out_dir/timeline/timeline_module.js",
"$resources_out_dir/web_audio/web_audio_module.js",
"$resources_out_dir/dirac_lazy/dirac_lazy_module.js",
"$resources_out_dir/webauthn/webauthn_module.js",
"$resources_out_dir/workspace_diff/workspace_diff_module.js",
"$resources_out_dir/emulated_devices/emulated_devices_module.js",
Expand Down
90 changes: 45 additions & 45 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ hooks = [
'--no_auth',
'--bucket', 'chromium-nodejs/12.14.1',
'-s', 'third_party/node/linux/node-linux-x64.tar.gz.sha1',
],
],
},
{
'name': 'node_mac',
Expand All @@ -109,7 +109,7 @@ hooks = [
'--no_auth',
'--bucket', 'chromium-nodejs/12.14.1',
'-s', 'third_party/node/mac/node-darwin-x64.tar.gz.sha1',
],
],
},
{
'name': 'node_win',
Expand All @@ -121,7 +121,7 @@ hooks = [
'--no_auth',
'--bucket', 'chromium-nodejs/12.14.1',
'-s', 'third_party/node/win/node.exe.sha1',
],
],
},

{
Expand All @@ -130,9 +130,9 @@ hooks = [
'name': 'disable_depot_tools_selfupdate',
'pattern': '.',
'action': [
'python',
'third_party/depot_tools/update_depot_tools_toggle.py',
'--disable',
'python',
'third_party/depot_tools/update_depot_tools_toggle.py',
'--disable',
],
},

Expand All @@ -147,7 +147,7 @@ hooks = [
'--no_auth',
'--bucket', 'chromium-clang-format',
'-s', 'buildtools/win/clang-format.exe.sha1',
],
],
},
{
'name': 'clang_format_mac',
Expand All @@ -159,7 +159,7 @@ hooks = [
'--no_auth',
'--bucket', 'chromium-clang-format',
'-s', 'buildtools/mac/clang-format.sha1',
],
],
},
{
'name': 'clang_format_linux',
Expand All @@ -171,46 +171,46 @@ hooks = [
'--no_auth',
'--bucket', 'chromium-clang-format',
'-s', 'buildtools/linux64/clang-format.sha1',
],
],
},

# Pull chromium from common storage
{
'name': 'download_chromium_win',
'pattern': '.',
'condition': 'host_os == "win"',
'action': [ 'python',
'scripts/deps/download_chromium.py',
'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win_x64/' + Var('chromium_win') + '/chrome-win.zip',
'third_party/chrome',
'chrome-win/chrome.exe',
Var('chromium_win'),
],
},
{
'name': 'download_chromium_mac',
'pattern': '.',
'condition': 'host_os == "mac"',
'action': [ 'python',
'scripts/deps/download_chromium.py',
'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/' + Var('chromium_mac') + '/chrome-mac.zip',
'third_party/chrome',
'chrome-mac/Chromium.app/Contents',
Var('chromium_mac'),
],
},
{
'name': 'download_chromium_linux',
'pattern': '.',
'condition': 'host_os == "linux"',
'action': [ 'python',
'scripts/deps/download_chromium.py',
'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/' + Var('chromium_linux') + '/chrome-linux.zip',
'third_party/chrome',
'chrome-linux/chrome',
Var('chromium_linux'),
],
},
# {
# 'name': 'download_chromium_win',
# 'pattern': '.',
# 'condition': 'host_os == "win"',
# 'action': [ 'python',
# 'scripts/deps/download_chromium.py',
# 'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win_x64/' + Var('chromium_win') + '/chrome-win.zip',
# 'third_party/chrome',
# 'chrome-win/chrome.exe',
# Var('chromium_win'),
# ],
# },
# {
# 'name': 'download_chromium_mac',
# 'pattern': '.',
# 'condition': 'host_os == "mac"',
# 'action': [ 'python',
# 'scripts/deps/download_chromium.py',
# 'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/' + Var('chromium_mac') + '/chrome-mac.zip',
# 'third_party/chrome',
# 'chrome-mac/Chromium.app/Contents',
# Var('chromium_mac'),
# ],
# },
# {
# 'name': 'download_chromium_linux',
# 'pattern': '.',
# 'condition': 'host_os == "linux"',
# 'action': [ 'python',
# 'scripts/deps/download_chromium.py',
# 'https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/' + Var('chromium_linux') + '/chrome-linux.zip',
# 'third_party/chrome',
# 'chrome-linux/chrome',
# Var('chromium_linux'),
# ],
# },
{
'name': 'sysroot_x64',
'pattern': '.',
Expand Down
15 changes: 15 additions & 0 deletions all_devtools_files.gni
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@
import("./scripts/build/ninja/vars.gni")

all_devtools_files = [
# dirac - start
"front_end/console/clojure-parinfer.js",
"front_end/console/dirac-hacks.css",
"front_end/console/dirac-codemirror.css",
"front_end/console/dirac-theme.css",
"front_end/console/dirac-prompt.css",
"front_end/dirac/module.json",
"front_end/dirac/parinfer.js",
"front_end/dirac/parinfer-codemirror.js",
"front_end/dirac/keysim.js",
"front_end/dirac/dirac.js",
"front_end/dirac/require-implant.js",
"front_end/dirac_lazy/module.json",
"front_end/dirac_lazy/dirac_lazy.js",
# dirac - end
"front_end/shell.js",
"front_end/accessibility_test_runner/accessibility_test_runner.js",
"front_end/accessibility_test_runner/module.json",
Expand Down
8 changes: 8 additions & 0 deletions all_devtools_modules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ import("./scripts/build/ninja/vars.gni")
generated_typescript_modules = []

all_typescript_module_sources = [
# dirac - start
# "dirac/parinfer.js",
# "dirac/parinfer-codemirror.js",
# "dirac/keysim.js",
"third_party/codemirror/package/addon/runmode/runmode.js",
"third_party/codemirror/package/addon/display/placeholder.js",
"console/ConsoleDiracPrompt.js",
# dirac - end
"accessibility/ARIAAttributesView.js",
"accessibility/ARIAMetadata.js",
"accessibility/AXBreadcrumbsPane.js",
Expand Down
10 changes: 10 additions & 0 deletions devtools.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.idea" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
12 changes: 12 additions & 0 deletions devtools_grd_files.gni
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
# are missed from the GRD.

grd_files_release_sources = [
# dirac - start
# "front_end/dirac/dirac.js",
# "front_end/dirac/parinfer.js",
# "front_end/dirac/parinfer-codemirror.js",
# "front_end/dirac/keysim.js",
# "front_end/dirac_lazy/dirac_lazy_module.js",
# dirac - end
"front_end/Images/accelerometer-back.svg",
"front_end/Images/accelerometer-bottom.png",
"front_end/Images/accelerometer-front.svg",
Expand Down Expand Up @@ -448,6 +455,7 @@ grd_files_debug_sources = [
"front_end/console/ConsolePanel.js",
"front_end/console/ConsolePinPane.js",
"front_end/console/ConsolePrompt.js",
"front_end/console/ConsoleDiracPrompt.js",
"front_end/console/ConsoleSidebar.js",
"front_end/console/ConsoleView.js",
"front_end/console/ConsoleViewMessage.js",
Expand Down Expand Up @@ -904,6 +912,10 @@ grd_files_debug_sources = [
"front_end/third_party/codemirror/package/addon/runmode/runmode-standalone.js",
"front_end/third_party/codemirror/package/addon/selection/active-line.js",
"front_end/third_party/codemirror/package/addon/selection/mark-selection.js",
# dirac - start
"front_end/third_party/codemirror/package/addon/runmode/runmode.js",
"front_end/third_party/codemirror/package/addon/display/placeholder.js",
# dirac - end
"front_end/third_party/codemirror/package/lib/codemirror.js",
"front_end/third_party/codemirror/package/mode/clike/clike.js",
"front_end/third_party/codemirror/package/mode/clojure/clojure.js",
Expand Down
1 change: 1 addition & 0 deletions front_end/accessibility/ARIAAttributesView.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
Expand Down
7 changes: 7 additions & 0 deletions front_end/bindings/ResourceScriptMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,13 @@ export class ResourceScriptFile extends Common.ObjectWrapper.ObjectWrapper {
Workspace.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
}

/**
* @return {?SDK.Script.Script}
*/
getScript() {
return this._script;
}

/**
* @param {!Array.<!SDK.Script.Script>} scripts
* @return {boolean}
Expand Down
4 changes: 4 additions & 0 deletions front_end/cm/cm.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ import '../third_party/codemirror/package/addon/selection/mark-selection.js';
import '../third_party/codemirror/package/addon/fold/foldcode.js';
import '../third_party/codemirror/package/addon/fold/foldgutter.js';
import '../third_party/codemirror/package/addon/fold/brace-fold.js';

// for dirac
import '../third_party/codemirror/package/addon/runmode/runmode.js';
import '../third_party/codemirror/package/addon/display/placeholder.js';
8 changes: 6 additions & 2 deletions front_end/cm/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"../third_party/codemirror/package/addon/selection/mark-selection.js",
"../third_party/codemirror/package/addon/fold/foldcode.js",
"../third_party/codemirror/package/addon/fold/foldgutter.js",
"../third_party/codemirror/package/addon/fold/brace-fold.js"
"../third_party/codemirror/package/addon/fold/brace-fold.js",
"../third_party/codemirror/package/addon/runmode/runmode.js",
"../third_party/codemirror/package/addon/display/placeholder.js"
],
"skip_compilation": [
"codemirror.js",
Expand All @@ -27,7 +29,9 @@
"../third_party/codemirror/package/addon/selection/mark-selection.js",
"../third_party/codemirror/package/addon/fold/foldcode.js",
"../third_party/codemirror/package/addon/fold/foldgutter.js",
"../third_party/codemirror/package/addon/fold/brace-fold.js"
"../third_party/codemirror/package/addon/fold/brace-fold.js",
"../third_party/codemirror/package/addon/runmode/runmode.js",
"../third_party/codemirror/package/addon/display/placeholder.js"
], "resources": [
"codemirror.css"
]
Expand Down
2 changes: 1 addition & 1 deletion front_end/common/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export class RegExpSetting extends Setting {
* @param {string=} regexFlags
*/
constructor(settings, name, defaultValue, eventSupport, storage, regexFlags) {
super(settings, name, defaultValue ? [{pattern: defaultValue}] : [], eventSupport, storage);
super(settings, name, defaultValue ? (typeof defaultValue === 'string' ? [{pattern: defaultValue}] : defaultValue) : [], eventSupport, storage);
this._regexFlags = regexFlags;
}

Expand Down
11 changes: 11 additions & 0 deletions front_end/components/Linkifier.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
Expand Down Expand Up @@ -827,6 +828,7 @@ export class Linkifier {
}
if (contentProvider) {
const lineNumber = uiLocation ? uiLocation.lineNumber : info.lineNumber || 0;
const columnNumber = uiLocation ? uiLocation.columnNumber : info.columnNumber || 0;
for (const title of linkHandlers.keys()) {
const handler = linkHandlers.get(title);
if (!handler) {
Expand All @@ -843,6 +845,15 @@ export class Linkifier {
result.push(action);
}
}
if (dirac.hasLinkActions) {
const diracAction = Components.Linkifier.diracLinkHandlerAction;
if (diracAction) {
result.unshift({
title: diracAction.title,
handler: diracAction.handler.bind(null, result, contentProvider.contentURL(), lineNumber, columnNumber)
});
}
}
}
if (resource || info.url) {
result.push({
Expand Down
3 changes: 3 additions & 0 deletions front_end/components/components-legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Components.Linkifier.LinkHandlerSettingUI = ComponentsModule.Linkifier.LinkHandl
/** @constructor */
Components.Linkifier.ContentProviderContextMenuProvider = ComponentsModule.Linkifier.ContentProviderContextMenuProvider;

/** @type {?Object} */
Components.Linkifier.diracLinkHandlerAction = null;

/** @interface */
Components.LinkDecorator = ComponentsModule.Linkifier.LinkDecorator;

Expand Down
1 change: 1 addition & 0 deletions front_end/console/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ devtools_module("console") {
"ConsolePanel.js",
"ConsolePinPane.js",
"ConsolePrompt.js",
"ConsoleDiracPrompt.js",
"ConsoleSidebar.js",
"ConsoleView.js",
"ConsoleViewMessage.js",
Expand Down
Loading

0 comments on commit 52dfa35

Please sign in to comment.