Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/scripts/vscode.patch

936 lines
61 KiB
Diff
Raw Normal View History

diff --git a/src/vs/base/browser/browser.ts b/src/vs/base/browser/browser.ts
index 639ac3d031..85999db640 100644
--- a/src/vs/base/browser/browser.ts
+++ b/src/vs/base/browser/browser.ts
@@ -153,0 +154,4 @@ export const isEdgeWebView = isEdge && (userAgent.indexOf('WebView/') >= 0);
+export const isMacintosh = userAgent.indexOf("Macintosh") >= 0;
+export const isWindows = userAgent.indexOf("Windows") >= 0;
+export const isLinux = userAgent.indexOf("Linux") >= 0;
+
diff --git a/src/vs/base/browser/keyboardEvent.ts b/src/vs/base/browser/keyboardEvent.ts
index a6fdce5c7c..7a80c85398 100644
--- a/src/vs/base/browser/keyboardEvent.ts
+++ b/src/vs/base/browser/keyboardEvent.ts
@@ -154 +154 @@ let INVERSE_KEY_CODE_MAP: KeyCode[] = new Array(KeyCode.MAX_VALUE);
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
@@ -159 +159 @@ let INVERSE_KEY_CODE_MAP: KeyCode[] = new Array(KeyCode.MAX_VALUE);
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
@@ -202 +202 @@ export interface IKeyboardEvent {
-const ctrlKeyMod = (platform.isMacintosh ? KeyMod.WinCtrl : KeyMod.CtrlCmd);
+const ctrlKeyMod = (browser.isMacintosh ? KeyMod.WinCtrl : KeyMod.CtrlCmd);
@@ -205 +205 @@ const shiftKeyMod = KeyMod.Shift;
-const metaKeyMod = (platform.isMacintosh ? KeyMod.CtrlCmd : KeyMod.WinCtrl);
+const metaKeyMod = (browser.isMacintosh ? KeyMod.CtrlCmd : KeyMod.WinCtrl);
diff --git a/src/vs/base/browser/ui/aria/aria.ts b/src/vs/base/browser/ui/aria/aria.ts
index 1922450144..9900776aa2 100644
--- a/src/vs/base/browser/ui/aria/aria.ts
+++ b/src/vs/base/browser/ui/aria/aria.ts
@@ -8 +8 @@ import * as nls from 'vs/nls';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts
2019-03-06 20:10:23 +01:00
index e6b2e4e39b..06cdfe152f 100644
--- a/src/vs/base/browser/ui/list/listWidget.ts
+++ b/src/vs/base/browser/ui/list/listWidget.ts
@@ -13 +13 @@ import * as DOM from 'vs/base/browser/dom';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -257 +257 @@ class KeyboardController<T> implements IDisposable {
- onKeyDown.filter(e => (platform.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === KeyCode.KEY_A).on(this.onCtrlA, this, this.disposables);
+ onKeyDown.filter(e => (browser.isMacintosh ? e.metaKey : e.ctrlKey) && e.keyCode === KeyCode.KEY_A).on(this.onCtrlA, this, this.disposables);
@@ -479 +479 @@ export function isSelectionSingleChangeEvent(event: IListMouseEvent<any> | IList
- return platform.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;
+ return browser.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;
2019-03-06 20:10:23 +01:00
@@ -540 +540 @@ class MouseController<T> implements IDisposable {
- return platform.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;
+ return browser.isMacintosh ? event.browserEvent.metaKey : event.browserEvent.ctrlKey;
diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts
index 8c7168bad5..8bbea63b3b 100644
--- a/src/vs/base/browser/ui/sash/sash.ts
+++ b/src/vs/base/browser/ui/sash/sash.ts
@@ -9 +9 @@ import { isIPad } from 'vs/base/browser/browser';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
index 9b31c847f7..51de0eaf2f 100644
--- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
+++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
@@ -18 +18 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -269 +269 @@ export abstract class AbstractScrollableElement extends Widget {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
@@ -338 +338 @@ export abstract class AbstractScrollableElement extends Widget {
- const shiftConvert = !platform.isMacintosh && e.browserEvent && e.browserEvent.shiftKey;
+ const shiftConvert = !browser.isMacintosh && e.browserEvent && e.browserEvent.shiftKey;
@@ -571 +571 @@ function resolveOptions(opts: ScrollableElementCreationOptions): ScrollableEleme
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/base/browser/ui/selectBox/selectBox.ts b/src/vs/base/browser/ui/selectBox/selectBox.ts
index 0e7314fd28..814fb0abd8 100644
--- a/src/vs/base/browser/ui/selectBox/selectBox.ts
+++ b/src/vs/base/browser/ui/selectBox/selectBox.ts
@@ -16 +16 @@ import { SelectBoxList } from 'vs/base/browser/ui/selectBox/selectBoxCustom';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
index 77ca7e4f06..2dc4bf24f6 100644
--- a/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
+++ b/src/vs/base/browser/ui/selectBox/selectBoxCustom.ts
@@ -20 +20 @@ import { ISelectBoxDelegate, ISelectOptionItem, ISelectBoxOptions, ISelectBoxSty
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/browser/ui/selectBox/selectBoxNative.ts b/src/vs/base/browser/ui/selectBox/selectBoxNative.ts
index 01f59d40fa..453d5c4ed3 100644
--- a/src/vs/base/browser/ui/selectBox/selectBoxNative.ts
+++ b/src/vs/base/browser/ui/selectBox/selectBoxNative.ts
@@ -12 +12 @@ import { ISelectBoxDelegate, ISelectOptionItem, ISelectBoxOptions, ISelectBoxSty
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/browser/ui/tree/abstractTree.ts b/src/vs/base/browser/ui/tree/abstractTree.ts
2019-03-06 20:10:23 +01:00
index d9665944a1..80659bb5f0 100644
--- a/src/vs/base/browser/ui/tree/abstractTree.ts
+++ b/src/vs/base/browser/ui/tree/abstractTree.ts
@@ -24 +24 @@ import { disposableTimeout } from 'vs/base/common/async';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
index 65cdc14af5..f3567da05d 100644
--- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
+++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
@@ -8 +8 @@ import * as nls from 'vs/nls';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -66 +66 @@ export class QuickOpenController extends DefaultController {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/base/parts/tree/browser/treeDefaults.ts b/src/vs/base/parts/tree/browser/treeDefaults.ts
index 8d30a79e50..30cb97a224 100644
--- a/src/vs/base/parts/tree/browser/treeDefaults.ts
+++ b/src/vs/base/parts/tree/browser/treeDefaults.ts
@@ -8,0 +9 @@ import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -111 +112 @@ export class DefaultController implements _.IController {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
@@ -153 +154 @@ export class DefaultController implements _.IController {
- const isMac = platform.isMacintosh;
+ const isMac = browser.isMacintosh;
diff --git a/src/vs/code/electron-browser/issue/issueReporterMain.ts b/src/vs/code/electron-browser/issue/issueReporterMain.ts
index 169de560b5..1b79b77040 100644
--- a/src/vs/code/electron-browser/issue/issueReporterMain.ts
+++ b/src/vs/code/electron-browser/issue/issueReporterMain.ts
@@ -405 +405 @@ export class IssueReporter extends Disposable {
- const cmdOrCtrlKey = platform.isMacintosh ? e.metaKey : e.ctrlKey;
+ const cmdOrCtrlKey = browser.isMacintosh ? e.metaKey : e.ctrlKey;
@@ -439 +439 @@ export class IssueReporter extends Disposable {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/code/electron-browser/processExplorer/processExplorerMain.ts b/src/vs/code/electron-browser/processExplorer/processExplorerMain.ts
index a9e8f38c81..0c305e4c1a 100644
--- a/src/vs/code/electron-browser/processExplorer/processExplorerMain.ts
+++ b/src/vs/code/electron-browser/processExplorer/processExplorerMain.ts
@@ -304 +304 @@ export function startup(data: ProcessExplorerData): void {
- const cmdOrCtrlKey = platform.isMacintosh ? e.metaKey : e.ctrlKey;
+ const cmdOrCtrlKey = browser.isMacintosh ? e.metaKey : e.ctrlKey;
2019-01-19 01:04:24 +01:00
diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
index a342222d04..c731e82591 100644
2019-01-19 01:04:24 +01:00
--- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
+++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
@@ -195,0 +196,2 @@ async function handshake(configuration: ISharedProcessConfiguration): Promise<vo
2019-01-19 01:04:24 +01:00
+
+startup({ machineId: "1" });
diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts
index cfdce8929b..873476f3f1 100644
--- a/src/vs/editor/browser/config/configuration.ts
+++ b/src/vs/editor/browser/config/configuration.ts
@@ -352 +352 @@ export class Configuration extends CommonEditorConfiguration {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts
index 1a8af35373..fe56af9340 100644
--- a/src/vs/editor/browser/controller/mouseHandler.ts
+++ b/src/vs/editor/browser/controller/mouseHandler.ts
@@ -222 +222 @@ export class MouseHandler extends ViewEventHandler {
- if (platform.isMacintosh && e.leftButton && e.ctrlKey) {
+ if (browser.isMacintosh && e.leftButton && e.ctrlKey) {
diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts
index df30bd1a03..536edba762 100644
--- a/src/vs/editor/browser/controller/textAreaHandler.ts
+++ b/src/vs/editor/browser/controller/textAreaHandler.ts
@@ -213 +213 @@ export class TextAreaHandler extends ViewPart {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts
index 7ccf0e99d2..8c30ca2df0 100644
--- a/src/vs/editor/browser/controller/textAreaInput.ts
+++ b/src/vs/editor/browser/controller/textAreaInput.ts
@@ -262 +262 @@ export class TextAreaInput extends Disposable {
- const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/platform.isMacintosh, /*couldBeTypingAtOffset0*/previousEventWasFocus && platform.isMacintosh);
+ const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/browser.isMacintosh, /*couldBeTypingAtOffset0*/previousEventWasFocus && browser.isMacintosh);
diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts
index b88b781dbb..af9b3ed23a 100644
--- a/src/vs/editor/common/config/commonEditorConfig.ts
+++ b/src/vs/editor/common/config/commonEditorConfig.ts
@@ -372 +372 @@ const editorConfiguration: IConfigurationNode = {
- 'included': platform.isMacintosh
+ 'included': false && platform.isMacintosh
diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts
index d8ee1d9226..8f8bd8fe90 100644
--- a/src/vs/editor/common/config/editorOptions.ts
+++ b/src/vs/editor/common/config/editorOptions.ts
@@ -9,0 +10 @@ import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -1751 +1752 @@ export class EditorOptionsValidator {
- configuredMulticursorModifier = platform.isMacintosh ? 'metaKey' : 'ctrlKey';
+ configuredMulticursorModifier = browser.isMacintosh ? 'metaKey' : 'ctrlKey';
@@ -2513 +2514 @@ export const EDITOR_FONT_DEFAULTS = {
- platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY)
+ browser.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY)
@@ -2517 +2518 @@ export const EDITOR_FONT_DEFAULTS = {
- platform.isMacintosh ? 12 : 14
+ browser.isMacintosh ? 12 : 14
diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts
index 88cb52aa90..c4a1be9c98 100644
--- a/src/vs/editor/common/config/fontInfo.ts
+++ b/src/vs/editor/common/config/fontInfo.ts
@@ -6 +6 @@
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -14 +14 @@ import { EditorZoom } from 'vs/editor/common/config/editorZoom';
-const GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35;
+const GOLDEN_LINE_HEIGHT_RATIO = browser.isMacintosh ? 1.5 : 1.35;
diff --git a/src/vs/editor/contrib/clipboard/clipboard.ts b/src/vs/editor/contrib/clipboard/clipboard.ts
index 5e43f1b39e..2244391563 100644
--- a/src/vs/editor/contrib/clipboard/clipboard.ts
+++ b/src/vs/editor/contrib/clipboard/clipboard.ts
@@ -29 +29,2 @@ const supportsCopyWithSyntaxHighlighting = (supportsCopy && !browser.isEdgeOrIE)
-const supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));
+// const supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));
+const supportsPaste = true;
@@ -176,0 +178 @@ class ExecCommandPasteAction extends ExecCommandAction {
+ const { workbench } = require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench');
@@ -181 +183 @@ class ExecCommandPasteAction extends ExecCommandAction {
- precondition: EditorContextKeys.writable,
+ precondition: (require('vs/platform/contextkey/common/contextkey') as typeof import('vs/platform/contextkey/common/contextkey')).ContextKeyExpr.and(EditorContextKeys.writable, workbench.clipboardContextKey),
@@ -191 +193,2 @@ class ExecCommandPasteAction extends ExecCommandAction {
- order: 3
+ order: 3,
+ when: workbench.clipboardContextKey,
@@ -194,0 +198,14 @@ class ExecCommandPasteAction extends ExecCommandAction {
+
+ public async run(accessor, editor: ICodeEditor): Promise<void> {
2019-02-06 19:59:03 +01:00
+ if (editor instanceof (require('vs/editor/browser/widget/codeEditorWidget') as typeof import('vs/editor/browser/widget/codeEditorWidget')).CodeEditorWidget) {
+ try {
2019-02-06 19:59:03 +01:00
+ editor.trigger('', (require('vs/editor/common/editorCommon') as typeof import ('vs/editor/common/editorCommon')).Handler.Paste, {
+ text: await (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.clipboardText,
+ });
+ } catch (ex) {
+ super.run(accessor, editor);
+ }
+ } else {
+ super.run(accessor, editor);
+ }
+ }
diff --git a/src/vs/editor/contrib/dnd/dnd.ts b/src/vs/editor/contrib/dnd/dnd.ts
index caa3ea75fd..e32371f932 100644
--- a/src/vs/editor/contrib/dnd/dnd.ts
+++ b/src/vs/editor/contrib/dnd/dnd.ts
@@ -9 +9 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/editor/contrib/goToDefinition/clickLinkGesture.ts b/src/vs/editor/contrib/goToDefinition/clickLinkGesture.ts
index 3b72a01a35..0d723f5800 100644
--- a/src/vs/editor/contrib/goToDefinition/clickLinkGesture.ts
+++ b/src/vs/editor/contrib/goToDefinition/clickLinkGesture.ts
@@ -86 +86 @@ function createOptions(multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): C
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
@@ -92 +92 @@ function createOptions(multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): C
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/editor/contrib/links/links.ts b/src/vs/editor/contrib/links/links.ts
index d224f2254a..4baf574025 100644
--- a/src/vs/editor/contrib/links/links.ts
+++ b/src/vs/editor/contrib/links/links.ts
@@ -13 +13 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -29 +29 @@ const HOVER_MESSAGE_GENERAL_META = new MarkdownString().appendText(
- platform.isMacintosh
+ browser.isMacintosh
@@ -35 +35 @@ const HOVER_MESSAGE_COMMAND_META = new MarkdownString().appendText(
- platform.isMacintosh
+ browser.isMacintosh
@@ -41 +41 @@ const HOVER_MESSAGE_GENERAL_ALT = new MarkdownString().appendText(
- platform.isMacintosh
+ browser.isMacintosh
@@ -47 +47 @@ const HOVER_MESSAGE_COMMAND_ALT = new MarkdownString().appendText(
- platform.isMacintosh
+ browser.isMacintosh
diff --git a/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts b/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts
index 605c1209e1..e8131513de 100644
--- a/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts
+++ b/src/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.ts
@@ -261 +261 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
- platform.isMacintosh
+ browser.isMacintosh
@@ -290 +290 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
- platform.isMacintosh
+ browser.isMacintosh
2019-01-19 01:04:24 +01:00
diff --git a/src/vs/loader.js b/src/vs/loader.js
index 4eddcab3a0..abda3c04f9 100644
2019-01-19 01:04:24 +01:00
--- a/src/vs/loader.js
+++ b/src/vs/loader.js
@@ -671,4 +671,4 @@ var AMDLoader;
2019-01-19 01:04:24 +01:00
- this._fs = nodeRequire('fs');
- this._vm = nodeRequire('vm');
- this._path = nodeRequire('path');
- this._crypto = nodeRequire('crypto');
+ this._fs = require('fs');
+ this._vm = require('vm');
+ this._path = require('path');
+ this._crypto = require('crypto');
@@ -736,0 +737,12 @@ var AMDLoader;
2019-01-19 01:04:24 +01:00
+ const context = require.context("../", true, /.*/);
+ if (scriptSrc.indexOf("file:///") !== -1) {
+ const vsSrc = scriptSrc.split("file:///")[1].split(".js")[0];
+ if (this._env.isWindows) {
+ const vsSrcSplit = vsSrc.split(":/");
+ vsSrcSplit.shift();
+ vsSrc = vsSrcSplit.join(":/");
+ }
+ if (vsSrc && vsSrc.startsWith("vs/")) {
2019-01-19 01:04:24 +01:00
+ scriptSrc = `node|./${vsSrc}`;
+ }
+ }
@@ -741 +753 @@ var AMDLoader;
2019-01-19 01:04:24 +01:00
- moduleExports_1 = nodeRequire(pieces[1]);
+ moduleExports_1 = context(pieces[1]);
diff --git a/src/vs/platform/clipboard/electron-browser/clipboardService.ts b/src/vs/platform/clipboard/electron-browser/clipboardService.ts
index 667b47218a..36dd5ddd3e 100644
--- a/src/vs/platform/clipboard/electron-browser/clipboardService.ts
+++ b/src/vs/platform/clipboard/electron-browser/clipboardService.ts
@@ -9 +9 @@ import { URI } from 'vs/base/common/uri';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts
index 56eaeef6f4..ec8a6e5960 100644
--- a/src/vs/platform/windows/common/windows.ts
+++ b/src/vs/platform/windows/common/windows.ts
@@ -9 +9,2 @@ import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry';
-import { IProcessEnvironment, isMacintosh } from 'vs/base/common/platform';
+import { IProcessEnvironment } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/platform/workbench/common/contextkeys.ts b/src/vs/platform/workbench/common/contextkeys.ts
index 94b03a0ce9..c3608a2763 100644
--- a/src/vs/platform/workbench/common/contextkeys.ts
+++ b/src/vs/platform/workbench/common/contextkeys.ts
@@ -7 +7 @@ import { RawContextKey } from 'vs/platform/contextkey/common/contextkey';
-import { isMacintosh, isLinux, isWindows } from 'vs/base/common/platform';
+import { isMacintosh, isLinux, isWindows } from 'vs/base/browser/browser';
2019-01-31 23:19:12 +01:00
diff --git a/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts b/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts
index 6c52cbc937..09adbe7f51 100644
2019-01-31 23:19:12 +01:00
--- a/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts
+++ b/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts
@@ -57,0 +58,3 @@ export class HeapService implements IHeapService {
2019-02-02 02:55:32 +01:00
+ // Cannot control GC in the browser.
2019-01-31 23:19:12 +01:00
+ return Promise.resolve(obj);
+
diff --git a/src/vs/workbench/api/electron-browser/mainThreadWebview.ts b/src/vs/workbench/api/electron-browser/mainThreadWebview.ts
index ee93e07d8d..f1921f02e4 100644
--- a/src/vs/workbench/api/electron-browser/mainThreadWebview.ts
+++ b/src/vs/workbench/api/electron-browser/mainThreadWebview.ts
@@ -306 +306 @@ export class MainThreadWebviews implements MainThreadWebviewsShape, WebviewReviv
- <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src vscode-core-resource: https: 'unsafe-inline'; child-src 'none'; frame-src 'none';">
+ <!--<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src vscode-core-resource: https: 'unsafe-inline'; child-src 'none'; frame-src 'none';">-->
2019-02-06 20:04:54 +01:00
diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts
index 1f4a1e100b..1bf605a064 100644
2019-02-06 20:04:54 +01:00
--- a/src/vs/workbench/api/node/extHostExtensionService.ts
+++ b/src/vs/workbench/api/node/extHostExtensionService.ts
@@ -719 +719 @@ function loadCommonJSModule<T>(logService: ILogService, modulePath: string, acti
2019-02-06 20:04:54 +01:00
- r = require.__$__nodeRequire<T>(modulePath);
+ r = (global as any).nativeNodeRequire(modulePath);
2019-01-30 22:40:01 +01:00
diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts
index e73acff052..c52bb3c7a2 100644
2019-01-30 22:40:01 +01:00
--- a/src/vs/workbench/browser/dnd.ts
+++ b/src/vs/workbench/browser/dnd.ts
@@ -171 +171 @@ export class ResourcesDropHandler {
2019-01-30 22:40:01 +01:00
- return;
+ return (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.handleDrop(event, resolveTargetGroup, afterDrop, targetIndex);
diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts
index 7213400c86..a54def1640 100644
--- a/src/vs/workbench/browser/layout.ts
+++ b/src/vs/workbench/browser/layout.ts
@@ -29 +29 @@ import { getZoomFactor } from 'vs/base/browser/browser';
-const TITLE_BAR_HEIGHT = isMacintosh ? 22 : 30;
+const TITLE_BAR_HEIGHT = /* isMacintosh ? 22 : */30;
diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts
index b262c8aeef..4e23df1bc6 100644
--- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts
+++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts
@@ -48 +48 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/browser/parts/editor/editorDropTarget.ts b/src/vs/workbench/browser/parts/editor/editorDropTarget.ts
index 9eca348265..df1d84514f 100644
--- a/src/vs/workbench/browser/parts/editor/editorDropTarget.ts
+++ b/src/vs/workbench/browser/parts/editor/editorDropTarget.ts
@@ -14 +14 @@ import { IEditorIdentifier, EditorInput, EditorOptions } from 'vs/workbench/comm
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/browser/parts/editor/resourceViewer.ts b/src/vs/workbench/browser/parts/editor/resourceViewer.ts
index a0cc90b573..781e0187a0 100644
--- a/src/vs/workbench/browser/parts/editor/resourceViewer.ts
+++ b/src/vs/workbench/browser/parts/editor/resourceViewer.ts
@@ -23 +23 @@ import { memoize } from 'vs/base/common/decorators';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -444 +444 @@ class InlineImageView {
- if (platform.isMacintosh ? altPressed : ctrlPressed) {
+ if (browser.isMacintosh ? altPressed : ctrlPressed) {
@@ -458 +458 @@ class InlineImageView {
- if (!(platform.isMacintosh ? altPressed : ctrlPressed)) {
+ if (!(browser.isMacintosh ? altPressed : ctrlPressed)) {
@@ -478 +478 @@ class InlineImageView {
- if (!(platform.isMacintosh ? altPressed : ctrlPressed)) { // zoom in
+ if (!(browser.isMacintosh ? altPressed : ctrlPressed)) { // zoom in
@@ -502 +502 @@ class InlineImageView {
- const isScrollWhellKeyPressed = platform.isMacintosh ? altPressed : ctrlPressed;
+ const isScrollWhellKeyPressed = browser.isMacintosh ? altPressed : ctrlPressed;
diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
index 5f957c221a..f29d27759e 100644
--- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
+++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts
@@ -7 +7 @@ import 'vs/css!./media/tabstitlecontrol';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/browser/parts/quickinput/quickInputList.ts b/src/vs/workbench/browser/parts/quickinput/quickInputList.ts
index f24bb0bcc0..219a1dcae5 100644
--- a/src/vs/workbench/browser/parts/quickinput/quickInputList.ts
+++ b/src/vs/workbench/browser/parts/quickinput/quickInputList.ts
@@ -24 +24 @@ import { range } from 'vs/base/common/arrays';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -263 +263 @@ export class QuickInputList {
- if (platform.isMacintosh ? e.metaKey : e.ctrlKey) {
+ if (browser.isMacintosh ? e.metaKey : e.ctrlKey) {
diff --git a/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css b/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css
index 38794f793d..d4daa083bd 100644
--- a/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css
+++ b/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css
@@ -44,0 +45 @@
+.web > .monaco-workbench .part.titlebar,
diff --git a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts
index 121bf09bb8..f5d425300a 100644
--- a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts
+++ b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts
@@ -16 +16,2 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
-import { isMacintosh, isLinux } from 'vs/base/common/platform';
+import { isNative } from 'vs/base/common/platform';
+import { isMacintosh, isLinux } from 'vs/base/browser/browser';
@@ -113 +114 @@ export class MenubarControl extends Disposable {
- if (isMacintosh) {
+ if (isNative && isMacintosh) {
@@ -119 +120 @@ export class MenubarControl extends Disposable {
- if (isMacintosh || this.currentTitlebarStyleSetting !== 'custom') {
+ if ((isNative && isMacintosh) || this.currentTitlebarStyleSetting !== 'custom') {
@@ -255 +256 @@ export class MenubarControl extends Disposable {
- if (!isMacintosh && this.currentTitlebarStyleSetting === 'custom') {
+ if (!(isNative && isMacintosh) && this.currentTitlebarStyleSetting === 'custom') {
@@ -271 +272 @@ export class MenubarControl extends Disposable {
- if (!isMacintosh && this.currentTitlebarStyleSetting === 'custom') {
+ if (!(isNative && isMacintosh) && this.currentTitlebarStyleSetting === 'custom') {
@@ -432 +433 @@ export class MenubarControl extends Disposable {
- if (!isMacintosh) {
+ if (!(isNative && isMacintosh)) {
@@ -648 +649 @@ export class MenubarControl extends Disposable {
- if (!isMacintosh && this.currentTitlebarStyleSetting === 'custom') {
+ if (!(isNative && isMacintosh) && this.currentTitlebarStyleSetting === 'custom') {
diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
index 4b3eb7bdb8..9161baf086 100644
--- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
+++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
@@ -25 +25,2 @@ import { TITLE_BAR_ACTIVE_BACKGROUND, TITLE_BAR_ACTIVE_FOREGROUND, TITLE_BAR_INA
-import { isMacintosh, isWindows, isLinux } from 'vs/base/common/platform';
+import { isNative } from 'vs/base/common/platform';
+import { isMacintosh, isWindows, isLinux } from 'vs/base/browser/browser';
@@ -320 +321 @@ export class TitlebarPart extends Part implements ITitleService, ISerializableVi
- if (!isMacintosh) {
+ if (!(isNative && isMacintosh)) {
@@ -336 +337 @@ export class TitlebarPart extends Part implements ITitleService, ISerializableVi
- if (!isMacintosh) {
+ if (!(isNative && isMacintosh)) {
@@ -543 +544 @@ export class TitlebarPart extends Part implements ITitleService, ISerializableVi
- if (!isMacintosh &&
+ if (!(isNative && isMacintosh) &&
@@ -559 +560 @@ export class TitlebarPart extends Part implements ITitleService, ISerializableVi
- if (isMacintosh || this.configurationService.getValue<MenuBarVisibility>('window.menuBarVisibility') === 'hidden') {
+ if ((isNative && isMacintosh) || this.configurationService.getValue<MenuBarVisibility>('window.menuBarVisibility') === 'hidden') {
diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts
index 3798dbde4f..b0a5c23521 100644
--- a/src/vs/workbench/browser/workbench.contribution.ts
+++ b/src/vs/workbench/browser/workbench.contribution.ts
@@ -9 +9 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions, Configur
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/electron-browser/actions/helpActions.ts b/src/vs/workbench/electron-browser/actions/helpActions.ts
index 85d39d64d7..4b958dc79f 100644
--- a/src/vs/workbench/electron-browser/actions/helpActions.ts
+++ b/src/vs/workbench/electron-browser/actions/helpActions.ts
@@ -9 +9,2 @@ import product from 'vs/platform/node/product';
-import { isMacintosh, isLinux, language } from 'vs/base/common/platform';
+import { language } from 'vs/base/common/platform';
+import { isMacintosh, isLinux } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/electron-browser/actions/windowActions.ts b/src/vs/workbench/electron-browser/actions/windowActions.ts
index 0cf3ec6611..b8b61194ba 100644
--- a/src/vs/workbench/electron-browser/actions/windowActions.ts
+++ b/src/vs/workbench/electron-browser/actions/windowActions.ts
@@ -14 +14 @@ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configurat
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
2019-01-19 01:04:24 +01:00
diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts
index 1e6333c731..0a7bdeeb9b 100644
2019-01-19 01:04:24 +01:00
--- a/src/vs/workbench/electron-browser/main.ts
+++ b/src/vs/workbench/electron-browser/main.ts
@@ -147,7 +147,7 @@ function openWorkbench(configuration: IWindowConfiguration): Promise<void> {
2019-01-19 01:04:24 +01:00
- (<any>self).require.config({
- onError: err => {
- if (err.errorCode === 'load') {
- shell.onUnexpectedError(new Error(nls.localize('loaderErrorNative', "Failed to load a required file. Please restart the application to try again. Details: {0}", JSON.stringify(err))));
- }
- }
- });
+ // (<any>self).require.config({
+ // onError: err => {
+ // if (err.errorCode === 'load') {
+ // shell.onUnexpectedError(new Error(nls.localize('loaderErrorNative', "Failed to load a required file. Please restart the application to try again. Details: {0}", JSON.stringify(err))));
+ // }
+ // }
+ // });
diff --git a/src/vs/workbench/electron-browser/shell.contribution.ts b/src/vs/workbench/electron-browser/shell.contribution.ts
index bc02c150a7..4ef622f669 100644
--- a/src/vs/workbench/electron-browser/shell.contribution.ts
+++ b/src/vs/workbench/electron-browser/shell.contribution.ts
@@ -14 +14,2 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes';
-import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform';
+import { isNative, isWeb } from 'vs/base/common/platform';
+import { isWindows, isLinux, isMacintosh } from 'vs/base/browser/browser';
@@ -488 +489 @@ configurationRegistry.registerConfiguration({
- isMacintosh ?
+ isNative && isMacintosh ?
@@ -495 +496 @@ configurationRegistry.registerConfiguration({
- isMacintosh ?
+ isNative && isMacintosh ?
@@ -582 +583 @@ configurationRegistry.registerConfiguration({
- 'included': isWindows || isLinux
+ 'included': isWeb || isWindows || isLinux
@@ -589 +590 @@ configurationRegistry.registerConfiguration({
- 'included': isWindows || isLinux
+ 'included': isWeb || isWindows || isLinux
@@ -615 +616 @@ configurationRegistry.registerConfiguration({
- 'included': isMacintosh && parseFloat(os.release()) >= 16 // Minimum: macOS Sierra (10.12.x = darwin 16.x)
+ 'included': isNative && isMacintosh && parseFloat(os.release()) >= 16 // Minimum: macOS Sierra (10.12.x = darwin 16.x)
@@ -621 +622 @@ configurationRegistry.registerConfiguration({
- 'included': isMacintosh
+ 'included': isNative && isMacintosh
@@ -632 +632,0 @@ configurationRegistry.registerConfiguration({
-
diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts
2019-02-26 21:31:25 +01:00
index fd95939506..2f32077a15 100644
--- a/src/vs/workbench/electron-browser/shell.ts
+++ b/src/vs/workbench/electron-browser/shell.ts
@@ -548 +548 @@ export class Shell extends Disposable {
- addClasses(this.container, 'monaco-shell', platform.isWindows ? 'windows' : platform.isLinux ? 'linux' : 'mac');
2019-02-26 21:31:25 +01:00
+ addClasses(this.container, 'web monaco-shell', browser.isWindows ? 'windows' : browser.isLinux ? 'linux' : 'mac');
diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts
index c0aff6bd4b..15af61a9ec 100644
--- a/src/vs/workbench/electron-browser/window.ts
+++ b/src/vs/workbench/electron-browser/window.ts
@@ -49 +49 @@ const TextInputActions: IAction[] = [
- new Action('editor.action.clipboardPasteAction', nls.localize('paste', "Paste"), undefined, true, () => Promise.resolve(document.execCommand('paste'))),
+ (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.pasteAction,
@@ -263 +263 @@ export class ElectronWindow extends Themable {
- (<any>window).open = function (url: string, target: string, features: string, replace: boolean): any {
+ (<any>window).openInvalid = function (url: string, target: string, features: string, replace: boolean): any {
@@ -304 +304 @@ export class ElectronWindow extends Themable {
- !isMacintosh || // macOS only
+ !browser.isMacintosh || // macOS only
2019-01-30 22:40:01 +01:00
diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts
index d82db96296..ceabf4f791 100644
2019-01-30 22:40:01 +01:00
--- a/src/vs/workbench/electron-browser/workbench.ts
+++ b/src/vs/workbench/electron-browser/workbench.ts
@@ -19 +19,2 @@ import { Registry } from 'vs/platform/registry/common/platform';
-import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform';
+import { isWeb, isNative } from 'vs/base/common/platform';
+import { isWindows, isLinux, isMacintosh } from 'vs/base/browser/browser';
@@ -272,0 +274 @@ export class Workbench extends Disposable implements IPartService {
+ (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.serviceCollection = serviceCollection;
@@ -380 +382 @@ export class Workbench extends Disposable implements IPartService {
- if (!isMacintosh && this.useCustomTitleBarStyle()) {
+ if (isWeb || (!isMacintosh && this.useCustomTitleBarStyle())) {
@@ -1098 +1100 @@ export class Workbench extends Disposable implements IPartService {
- if ((isWindows || isLinux) && this.useCustomTitleBarStyle()) {
+ if ((isWeb || isWindows || isLinux) && this.useCustomTitleBarStyle()) {
@@ -1265 +1267 @@ export class Workbench extends Disposable implements IPartService {
- } else if (isMacintosh) {
+ } else if (isNative && isMacintosh) {
diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts
index 265a7bc474..8eef7e5d10 100644
--- a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts
+++ b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts
@@ -15,0 +16 @@ import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -196 +197 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
- platform.isMacintosh
+ browser.isMacintosh
@@ -238 +239 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
- platform.isMacintosh
+ browser.isMacintosh
diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/suggestEnabledInput.ts b/src/vs/workbench/parts/codeEditor/electron-browser/suggestEnabledInput.ts
index 8c692b4fcc..ce990c83d6 100644
--- a/src/vs/workbench/parts/codeEditor/electron-browser/suggestEnabledInput.ts
+++ b/src/vs/workbench/parts/codeEditor/electron-browser/suggestEnabledInput.ts
@@ -14 +14 @@ import { mixin } from 'vs/base/common/objects';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts b/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts
index 5e1b6da216..f8643d2e18 100644
--- a/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts
+++ b/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts
@@ -8 +8 @@ import { Action } from 'vs/base/common/actions';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -84 +84 @@ MenuRegistry.appendMenuItem(MenuId.MenubarSelectionMenu, {
- platform.isMacintosh
+ browser.isMacintosh
diff --git a/src/vs/workbench/parts/comments/electron-browser/commentNode.ts b/src/vs/workbench/parts/comments/electron-browser/commentNode.ts
index 5d1c0b3b43..dc4ed358c1 100644
--- a/src/vs/workbench/parts/comments/electron-browser/commentNode.ts
+++ b/src/vs/workbench/parts/comments/electron-browser/commentNode.ts
@@ -26 +26 @@ import { KeyCode } from 'vs/base/common/keyCodes';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/parts/comments/electron-browser/commentThreadWidget.ts b/src/vs/workbench/parts/comments/electron-browser/commentThreadWidget.ts
index c5eea6a8d0..72f8329f2f 100644
--- a/src/vs/workbench/parts/comments/electron-browser/commentThreadWidget.ts
+++ b/src/vs/workbench/parts/comments/electron-browser/commentThreadWidget.ts
@@ -15 +15 @@ import { IDisposable } from 'vs/base/common/lifecycle';
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -636 +636 @@ export class ReviewZoneWidget extends ZoneWidget {
- let keybinding = platform.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter';
+ let keybinding = browser.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter';
diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts
index 49bb7903ac..624d03d56e 100644
--- a/src/vs/workbench/parts/debug/browser/linkDetector.ts
+++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts
@@ -9 +9 @@ import { URI as uri } from 'vs/base/common/uri';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
index 2d640f1a84..cbc7353a20 100644
--- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
+++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
@@ -45 +45 @@ import { ViewsRegistry } from 'vs/workbench/common/views';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts
index f6350174f3..5a884fc81b 100644
--- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts
+++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts
@@ -9,0 +10 @@ import * as env from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -180 +181 @@ export class DebugEditorContribution implements IDebugEditorContribution {
- if (e.event.rightButton || (env.isMacintosh && e.event.leftButton && e.event.ctrlKey)) {
+ if (e.event.rightButton || (browser.isMacintosh && e.event.leftButton && e.event.ctrlKey)) {
@@ -429 +430 @@ export class DebugEditorContribution implements IDebugEditorContribution {
- const stopKey = env.isMacintosh ? 'metaKey' : 'ctrlKey';
+ const stopKey = browser.isMacintosh ? 'metaKey' : 'ctrlKey';
@@ -447 +448 @@ export class DebugEditorContribution implements IDebugEditorContribution {
- const stopKey = env.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl;
+ const stopKey = browser.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl;
diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts
index 21b493db79..b608d21912 100644
--- a/src/vs/workbench/parts/debug/electron-browser/repl.ts
+++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts
@@ -13 +13 @@ import * as aria from 'vs/base/browser/ui/aria/aria';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
Make everything use active evals (#30) * Add trace log level * Use active eval to implement spdlog * Split server/client active eval interfaces Since all properties are *not* valid on both sides * +200% fire resistance * Implement exec using active evaluations * Fully implement child process streams * Watch impl, move child_process back to explicitly adding events Automatically forwarding all events might be the right move, but wanna think/discuss it a bit more because it didn't come out very cleanly. * Would you like some args with that callback? * Implement the rest of child_process using active evals * Rampant memory leaks Emit "kill" to active evaluations when client disconnects in order to kill processes. Most likely won't be the final solution. * Resolve some minor issues with output panel * Implement node-pty with active evals * Provide clearTimeout to vm sandbox * Implement socket with active evals * Extract some callback logic Also remove some eval interfaces, need to re-think those. * Implement net.Server and remainder of net.Socket using active evals * Implement dispose for active evaluations * Use trace for express requests * Handle sending buffers through evaluation events * Make event logging a bit more clear * Fix some errors due to us not actually instantiating until connect/listen * is this a commit message? * We can just create the evaluator in the ctor Not sure what I was thinking. * memory leak for you, memory leak for everyone * it's a ternary now * Don't dispose automatically on close or error The code may or may not be disposable at that point. * Handle parsing buffers on the client side as well * Remove unused protobuf * Remove TypedValue * Remove unused forkProvider and test * Improve dispose pattern for active evals * Socket calls close after error; no need to bind both * Improve comment * Comment is no longer wishy washy due to explicit boolean * Simplify check for sendHandle and options * Replace _require with __non_webpack_require__ Webpack will then replace this with `require` which we then provide to the vm sandbox. * Provide path.parse * Prevent original-fs from loading * Start with a pid of -1 vscode immediately checks the PID to see if the debug process launch correctly, but of course we don't get the pid synchronously. * Pass arguments to bootstrap-fork * Fully implement streams Was causing errors because internally the stream would set this.writing to true and it would never become false, so subsequent messages would never send. * Fix serializing errors and streams emitting errors multiple times * Was emitting close to data * Fix missing path for spawned processes * Move evaluation onDispose call Now it's accurate and runs when the active evaluation has actually disposed. * Fix promisifying fs.exists * Fix some active eval callback issues * Patch existsSync in debug adapter
2019-02-19 17:17:03 +01:00
diff --git a/src/vs/workbench/parts/debug/node/debugAdapter.ts b/src/vs/workbench/parts/debug/node/debugAdapter.ts
index 81954344b9..2bdce9603e 100644
Make everything use active evals (#30) * Add trace log level * Use active eval to implement spdlog * Split server/client active eval interfaces Since all properties are *not* valid on both sides * +200% fire resistance * Implement exec using active evaluations * Fully implement child process streams * Watch impl, move child_process back to explicitly adding events Automatically forwarding all events might be the right move, but wanna think/discuss it a bit more because it didn't come out very cleanly. * Would you like some args with that callback? * Implement the rest of child_process using active evals * Rampant memory leaks Emit "kill" to active evaluations when client disconnects in order to kill processes. Most likely won't be the final solution. * Resolve some minor issues with output panel * Implement node-pty with active evals * Provide clearTimeout to vm sandbox * Implement socket with active evals * Extract some callback logic Also remove some eval interfaces, need to re-think those. * Implement net.Server and remainder of net.Socket using active evals * Implement dispose for active evaluations * Use trace for express requests * Handle sending buffers through evaluation events * Make event logging a bit more clear * Fix some errors due to us not actually instantiating until connect/listen * is this a commit message? * We can just create the evaluator in the ctor Not sure what I was thinking. * memory leak for you, memory leak for everyone * it's a ternary now * Don't dispose automatically on close or error The code may or may not be disposable at that point. * Handle parsing buffers on the client side as well * Remove unused protobuf * Remove TypedValue * Remove unused forkProvider and test * Improve dispose pattern for active evals * Socket calls close after error; no need to bind both * Improve comment * Comment is no longer wishy washy due to explicit boolean * Simplify check for sendHandle and options * Replace _require with __non_webpack_require__ Webpack will then replace this with `require` which we then provide to the vm sandbox. * Provide path.parse * Prevent original-fs from loading * Start with a pid of -1 vscode immediately checks the PID to see if the debug process launch correctly, but of course we don't get the pid synchronously. * Pass arguments to bootstrap-fork * Fully implement streams Was causing errors because internally the stream would set this.writing to true and it would never become false, so subsequent messages would never send. * Fix serializing errors and streams emitting errors multiple times * Was emitting close to data * Fix missing path for spawned processes * Move evaluation onDispose call Now it's accurate and runs when the active evaluation has actually disposed. * Fix promisifying fs.exists * Fix some active eval callback issues * Patch existsSync in debug adapter
2019-02-19 17:17:03 +01:00
--- a/src/vs/workbench/parts/debug/node/debugAdapter.ts
+++ b/src/vs/workbench/parts/debug/node/debugAdapter.ts
@@ -315 +315 @@ export class ExecutableDebugAdapter extends StreamDebugAdapter {
- return new Promise<void>((resolve, reject) => {
+ return new Promise<void>(async (resolve, reject) => {
@@ -320 +320 @@ export class ExecutableDebugAdapter extends StreamDebugAdapter {
- if (!fs.existsSync(this.adapterExecutable.command)) {
+ if (!(await require("util").promisify(fs.exists)(this.adapterExecutable.command))) {
diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.ts
index 65574224a7..9474897de8 100644
--- a/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.ts
+++ b/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.ts
@@ -62 +62 @@ function renderBody(body: string): string {
- <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src vscode-core-resource:; child-src 'none'; frame-src 'none';">
+ <!--<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src vscode-core-resource:; child-src 'none'; frame-src 'none';">-->
diff --git a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts
index 6d25977a66..788f5c96e7 100644
--- a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts
+++ b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts
@@ -118 +118 @@ class Extension implements IExtension {
- return `${product.extensionsGallery.itemUrl}?itemName=${this.publisher}.${this.name}`;
+ return undefined; // `${product.extensionsGallery.itemUrl}?itemName=${this.publisher}.${this.name}`;
diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts
2019-03-06 20:10:23 +01:00
index 9df71eeec1..c68c42e922 100644
--- a/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts
+++ b/src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts
@@ -17 +17 @@ import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/co
-import { isWindows, isMacintosh } from 'vs/base/common/platform';
+import { isWindows, isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts
index 0bd9b93fcc..1c8adeb5ca 100644
--- a/src/vs/workbench/parts/files/electron-browser/fileCommands.ts
+++ b/src/vs/workbench/parts/files/electron-browser/fileCommands.ts
@@ -29 +29 @@ import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes';
-import { isWindows, isMacintosh } from 'vs/base/common/platform';
+import { isWindows, isMacintosh } from 'vs/base/browser/browser';
2019-01-30 22:40:01 +01:00
diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts
2019-03-06 20:10:23 +01:00
index 45b32eec0a..1f58bdcd70 100644
2019-01-30 22:40:01 +01:00
--- a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts
+++ b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts
@@ -39 +39 @@ import { DesktopDragAndDropData, ExternalElementsDragAndDropData, ElementsDragAn
-import { isMacintosh, isLinux } from 'vs/base/common/platform';
+import { isMacintosh, isLinux } from 'vs/base/browser/browser';
2019-03-06 20:10:23 +01:00
@@ -591,0 +592 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
+ return (require('vs/../../../../packages/vscode/src/workbench') as typeof import('vs/../../../../packages/vscode/src/workbench')).workbench.handleExternalDrop(target, originalEvent);
Make everything use active evals (#30) * Add trace log level * Use active eval to implement spdlog * Split server/client active eval interfaces Since all properties are *not* valid on both sides * +200% fire resistance * Implement exec using active evaluations * Fully implement child process streams * Watch impl, move child_process back to explicitly adding events Automatically forwarding all events might be the right move, but wanna think/discuss it a bit more because it didn't come out very cleanly. * Would you like some args with that callback? * Implement the rest of child_process using active evals * Rampant memory leaks Emit "kill" to active evaluations when client disconnects in order to kill processes. Most likely won't be the final solution. * Resolve some minor issues with output panel * Implement node-pty with active evals * Provide clearTimeout to vm sandbox * Implement socket with active evals * Extract some callback logic Also remove some eval interfaces, need to re-think those. * Implement net.Server and remainder of net.Socket using active evals * Implement dispose for active evaluations * Use trace for express requests * Handle sending buffers through evaluation events * Make event logging a bit more clear * Fix some errors due to us not actually instantiating until connect/listen * is this a commit message? * We can just create the evaluator in the ctor Not sure what I was thinking. * memory leak for you, memory leak for everyone * it's a ternary now * Don't dispose automatically on close or error The code may or may not be disposable at that point. * Handle parsing buffers on the client side as well * Remove unused protobuf * Remove TypedValue * Remove unused forkProvider and test * Improve dispose pattern for active evals * Socket calls close after error; no need to bind both * Improve comment * Comment is no longer wishy washy due to explicit boolean * Simplify check for sendHandle and options * Replace _require with __non_webpack_require__ Webpack will then replace this with `require` which we then provide to the vm sandbox. * Provide path.parse * Prevent original-fs from loading * Start with a pid of -1 vscode immediately checks the PID to see if the debug process launch correctly, but of course we don't get the pid synchronously. * Pass arguments to bootstrap-fork * Fully implement streams Was causing errors because internally the stream would set this.writing to true and it would never become false, so subsequent messages would never send. * Fix serializing errors and streams emitting errors multiple times * Was emitting close to data * Fix missing path for spawned processes * Move evaluation onDispose call Now it's accurate and runs when the active evaluation has actually disposed. * Fix promisifying fs.exists * Fix some active eval callback issues * Patch existsSync in debug adapter
2019-02-19 17:17:03 +01:00
diff --git a/src/vs/workbench/parts/logs/electron-browser/logs.contribution.ts b/src/vs/workbench/parts/logs/electron-browser/logs.contribution.ts
index 4015c9cd5d..bebdb25f6c 100644
--- a/src/vs/workbench/parts/logs/electron-browser/logs.contribution.ts
+++ b/src/vs/workbench/parts/logs/electron-browser/logs.contribution.ts
@@ -31 +31,2 @@ class LogOutputChannels extends Disposable implements IWorkbenchContribution {
- outputChannelRegistry.registerChannel({ id: Constants.mainLogChannelId, label: nls.localize('mainLog', "Main"), file: URI.file(join(environmentService.logsPath, `main.log`)), log: true });
+ // This channel only seems to be used when loading the app and we skip all of that, so it is never actually created or written to.
+ // outputChannelRegistry.registerChannel({ id: Constants.mainLogChannelId, label: nls.localize('mainLog', "Main"), file: URI.file(join(environmentService.logsPath, `main.log`)), log: true });
diff --git a/src/vs/workbench/parts/output/common/outputLinkProvider.ts b/src/vs/workbench/parts/output/common/outputLinkProvider.ts
index 6d9451401a..15e4dcf366 100644
Make everything use active evals (#30) * Add trace log level * Use active eval to implement spdlog * Split server/client active eval interfaces Since all properties are *not* valid on both sides * +200% fire resistance * Implement exec using active evaluations * Fully implement child process streams * Watch impl, move child_process back to explicitly adding events Automatically forwarding all events might be the right move, but wanna think/discuss it a bit more because it didn't come out very cleanly. * Would you like some args with that callback? * Implement the rest of child_process using active evals * Rampant memory leaks Emit "kill" to active evaluations when client disconnects in order to kill processes. Most likely won't be the final solution. * Resolve some minor issues with output panel * Implement node-pty with active evals * Provide clearTimeout to vm sandbox * Implement socket with active evals * Extract some callback logic Also remove some eval interfaces, need to re-think those. * Implement net.Server and remainder of net.Socket using active evals * Implement dispose for active evaluations * Use trace for express requests * Handle sending buffers through evaluation events * Make event logging a bit more clear * Fix some errors due to us not actually instantiating until connect/listen * is this a commit message? * We can just create the evaluator in the ctor Not sure what I was thinking. * memory leak for you, memory leak for everyone * it's a ternary now * Don't dispose automatically on close or error The code may or may not be disposable at that point. * Handle parsing buffers on the client side as well * Remove unused protobuf * Remove TypedValue * Remove unused forkProvider and test * Improve dispose pattern for active evals * Socket calls close after error; no need to bind both * Improve comment * Comment is no longer wishy washy due to explicit boolean * Simplify check for sendHandle and options * Replace _require with __non_webpack_require__ Webpack will then replace this with `require` which we then provide to the vm sandbox. * Provide path.parse * Prevent original-fs from loading * Start with a pid of -1 vscode immediately checks the PID to see if the debug process launch correctly, but of course we don't get the pid synchronously. * Pass arguments to bootstrap-fork * Fully implement streams Was causing errors because internally the stream would set this.writing to true and it would never become false, so subsequent messages would never send. * Fix serializing errors and streams emitting errors multiple times * Was emitting close to data * Fix missing path for spawned processes * Move evaluation onDispose call Now it's accurate and runs when the active evaluation has actually disposed. * Fix promisifying fs.exists * Fix some active eval callback issues * Patch existsSync in debug adapter
2019-02-19 17:17:03 +01:00
--- a/src/vs/workbench/parts/output/common/outputLinkProvider.ts
+++ b/src/vs/workbench/parts/output/common/outputLinkProvider.ts
@@ -77,0 +78 @@ export class OutputLinkProvider {
Make everything use active evals (#30) * Add trace log level * Use active eval to implement spdlog * Split server/client active eval interfaces Since all properties are *not* valid on both sides * +200% fire resistance * Implement exec using active evaluations * Fully implement child process streams * Watch impl, move child_process back to explicitly adding events Automatically forwarding all events might be the right move, but wanna think/discuss it a bit more because it didn't come out very cleanly. * Would you like some args with that callback? * Implement the rest of child_process using active evals * Rampant memory leaks Emit "kill" to active evaluations when client disconnects in order to kill processes. Most likely won't be the final solution. * Resolve some minor issues with output panel * Implement node-pty with active evals * Provide clearTimeout to vm sandbox * Implement socket with active evals * Extract some callback logic Also remove some eval interfaces, need to re-think those. * Implement net.Server and remainder of net.Socket using active evals * Implement dispose for active evaluations * Use trace for express requests * Handle sending buffers through evaluation events * Make event logging a bit more clear * Fix some errors due to us not actually instantiating until connect/listen * is this a commit message? * We can just create the evaluator in the ctor Not sure what I was thinking. * memory leak for you, memory leak for everyone * it's a ternary now * Don't dispose automatically on close or error The code may or may not be disposable at that point. * Handle parsing buffers on the client side as well * Remove unused protobuf * Remove TypedValue * Remove unused forkProvider and test * Improve dispose pattern for active evals * Socket calls close after error; no need to bind both * Improve comment * Comment is no longer wishy washy due to explicit boolean * Simplify check for sendHandle and options * Replace _require with __non_webpack_require__ Webpack will then replace this with `require` which we then provide to the vm sandbox. * Provide path.parse * Prevent original-fs from loading * Start with a pid of -1 vscode immediately checks the PID to see if the debug process launch correctly, but of course we don't get the pid synchronously. * Pass arguments to bootstrap-fork * Fully implement streams Was causing errors because internally the stream would set this.writing to true and it would never become false, so subsequent messages would never send. * Fix serializing errors and streams emitting errors multiple times * Was emitting close to data * Fix missing path for spawned processes * Move evaluation onDispose call Now it's accurate and runs when the active evaluation has actually disposed. * Fix promisifying fs.exists * Fix some active eval callback issues * Patch existsSync in debug adapter
2019-02-19 17:17:03 +01:00
+ return Promise.resolve([]);
diff --git a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts
index e6ffdb918b..3960ca32e3 100644
--- a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts
+++ b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts
@@ -6 +6 @@
-import * as env from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -94 +94 @@ Registry.as<IQuickOpenRegistry>(QuickOpenExtensions.Quickopen).registerQuickOpen
- description: env.isMacintosh ? nls.localize('gotoLineDescriptionMac', "Go to Line") : nls.localize('gotoLineDescriptionWin', "Go to Line")
+ description: browser.isMacintosh ? nls.localize('gotoLineDescriptionMac', "Go to Line") : nls.localize('gotoLineDescriptionWin', "Go to Line")
diff --git a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts
index 21d823df72..25e16f7a6f 100644
--- a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts
+++ b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts
@@ -18 +18,2 @@ import { isEqual } from 'vs/base/common/resources';
-import { isLinux, isMacintosh } from 'vs/base/common/platform';
+import { isNative, isLinux } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
@@ -69 +70 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
- if (isMacintosh && config.window && typeof config.window.nativeTabs === 'boolean' && config.window.nativeTabs !== this.nativeTabs) {
+ if (isNative && isMacintosh && config.window && typeof config.window.nativeTabs === 'boolean' && config.window.nativeTabs !== this.nativeTabs) {
@@ -75 +76 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
- if (isMacintosh && config.window && typeof config.window.nativeFullScreen === 'boolean' && config.window.nativeFullScreen !== this.nativeFullScreen) {
+ if (isNative && isMacintosh && config.window && typeof config.window.nativeFullScreen === 'boolean' && config.window.nativeFullScreen !== this.nativeFullScreen) {
diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
index 920cc42b0a..be9f59e2a5 100644
--- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
+++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
@@ -51 +51 @@ import { IPanelDndController, Panel } from 'vs/base/browser/ui/splitview/panelvi
-import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -817 +817 @@ export class RepositoryPanel extends ViewletPanel {
- const label = binding ? binding.getLabel() : (platform.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter');
+ const label = binding ? binding.getLabel() : (browser.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter');
diff --git a/src/vs/workbench/parts/search/electron-browser/search.contribution.ts b/src/vs/workbench/parts/search/electron-browser/search.contribution.ts
index a299f18b82..2013a81ab7 100644
--- a/src/vs/workbench/parts/search/electron-browser/search.contribution.ts
+++ b/src/vs/workbench/parts/search/electron-browser/search.contribution.ts
@@ -657 +657 @@ configurationRegistry.registerConfiguration({
- included: platform.isMacintosh
+ included: platform.isNative && platform.isMacintosh
diff --git a/src/vs/workbench/parts/tasks/common/problemMatcher.ts b/src/vs/workbench/parts/tasks/common/problemMatcher.ts
index a9889946c2..54bc6aa811 100644
--- a/src/vs/workbench/parts/tasks/common/problemMatcher.ts
+++ b/src/vs/workbench/parts/tasks/common/problemMatcher.ts
@@ -222 +222 @@ export function createLineMatcher(matcher: ProblemMatcher): ILineMatcher {
-const endOfLine: string = Platform.OS === Platform.OperatingSystem.Windows ? '\r\n' : '\n';
+const endOfLine: string = Platform.isWindows ? '\r\n' : '\n';
diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts
index fb600958c8..0698638175 100644
--- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts
+++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts
@@ -12,0 +13 @@ import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -219 +220 @@ configurationRegistry.registerConfiguration({
- default: platform.isMacintosh ? 'selectWord' : platform.isWindows ? 'copyPaste' : 'default',
+ default: browser.isMacintosh ? 'selectWord' : browser.isWindows ? 'copyPaste' : 'default',
diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts
index 31a1d6fc8e..bcfe2b24ec 100644
--- a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts
+++ b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts
@@ -7,0 +8 @@ import * as path from 'path';
+import * as browser from 'vs/base/browser/browser';
@@ -214 +215 @@ export class TerminalLinkHandler {
- return platform.isMacintosh ? event.metaKey : event.ctrlKey;
+ return browser.isMacintosh ? event.metaKey : event.ctrlKey;
@@ -222 +223 @@ export class TerminalLinkHandler {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts
index 6395712ee9..f2d1c0769b 100644
--- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts
+++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts
@@ -8,0 +9 @@ import * as platform from 'vs/base/common/platform';
+import * as browser from 'vs/base/browser/browser';
@@ -232 +233 @@ export class TerminalPanel extends Panel {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
index 94afb719e6..9244831637 100644
--- a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
+++ b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
@@ -40 +40 @@ function renderBody(
- <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src vscode-core-resource: https: 'unsafe-inline'; child-src 'none'; frame-src 'none';">
+ <!--<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src https: data:; media-src https:; script-src 'none'; style-src vscode-core-resource: https: 'unsafe-inline'; child-src 'none'; frame-src 'none';">-->
diff --git a/src/vs/workbench/parts/webview/electron-browser/webview-pre.js b/src/vs/workbench/parts/webview/electron-browser/webview-pre.js
index 29593dc6b6..dd3d25098d 100644
--- a/src/vs/workbench/parts/webview/electron-browser/webview-pre.js
+++ b/src/vs/workbench/parts/webview/electron-browser/webview-pre.js
@@ -10 +10,19 @@
- const ipcRenderer = require('electron').ipcRenderer;
+ const ipcRenderer = {
+ on: (channel, callback) => {
+ window.addEventListener("message", (event) => {
+ if (event.data.channel === channel) {
+ callback(event.data.channel, ...event.data.data);
+ }
+ });
+ },
+ sendToHost: (channel, ...args) => {
+ window.parent.postMessage({
+ channel,
+ data: args,
+ id: document.body.id,
+ }, "*");
+ },
+ };
+ const process = {
+ pid: undefined,
+ };
@@ -22,7 +40,7 @@
- require('electron').webFrame.registerURLSchemeAsPrivileged('vscode-resource', {
- secure: true,
- bypassCSP: false,
- allowServiceWorkers: false,
- supportFetchAPI: true,
- corsEnabled: true
- });
+ // require('electron').webFrame.registerURLSchemeAsPrivileged('vscode-resource', {
+ // secure: true,
+ // bypassCSP: false,
+ // allowServiceWorkers: false,
+ // supportFetchAPI: true,
+ // corsEnabled: true
+ // });
diff --git a/src/vs/workbench/parts/webview/electron-browser/webview.contribution.ts b/src/vs/workbench/parts/webview/electron-browser/webview.contribution.ts
index 033bd98d00..ba776c5ff3 100644
--- a/src/vs/workbench/parts/webview/electron-browser/webview.contribution.ts
+++ b/src/vs/workbench/parts/webview/electron-browser/webview.contribution.ts
@@ -24 +24 @@ import { InputFocusedContextKey } from 'vs/platform/workbench/common/contextkeys
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/workbench/parts/webview/electron-browser/webviewElement.ts b/src/vs/workbench/parts/webview/electron-browser/webviewElement.ts
2019-03-06 20:10:23 +01:00
index d8de423529..5953e920c3 100644
--- a/src/vs/workbench/parts/webview/electron-browser/webviewElement.ts
+++ b/src/vs/workbench/parts/webview/electron-browser/webviewElement.ts
@@ -21 +21 @@ import { endsWith } from 'vs/base/common/strings';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
2019-03-06 20:10:23 +01:00
@@ -265,0 +266,3 @@ export class WebviewElement extends Disposable {
+ Object.defineProperty(this._options, 'useSameOriginForRoot', {
+ value: true,
+ });
diff --git a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts
index 147f05b246..fa89583203 100644
--- a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts
+++ b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts
@@ -31,6 +31,6 @@ export class WalkThroughContentProvider implements ITextModelContentProvider, IW
- require([query.moduleId], content => {
2019-02-02 02:55:32 +01:00
- try {
- resolve(content.default());
- } catch (err) {
- reject(err);
- }
+ // This works because the only walkthrough that is a module is the welcome page.
+ // We have to explicitly import it or Webpack won't pick it up.
+ import("vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page").then((content) => {
2019-02-02 02:55:32 +01:00
+ resolve(content.default());
+ }).catch((err) => {
+ reject(err);
@@ -38 +38,3 @@ export class WalkThroughContentProvider implements ITextModelContentProvider, IW
2019-02-02 02:55:32 +01:00
- }) : this.textFileService.resolveTextContent(URI.file(resource.fsPath)).then(content => content.value));
+ }) : (resource.scheme !== "file"
+ ? fetch(resource.path).then((res) => res.text())
+ : this.textFileService.resolveTextContent(URI.file(resource.fsPath)).then(content => content.value)));
@@ -64 +66 @@ export class WalkThroughSnippetContentProvider implements ITextModelContentProvi
2019-02-02 02:55:32 +01:00
- return this.textFileService.resolveTextContent(URI.file(resource.fsPath)).then(content => {
+ return fetch(resource.path).then((res) => res.text()).then((content) => {
@@ -81,5 +83,5 @@ export class WalkThroughSnippetContentProvider implements ITextModelContentProvi
2019-02-02 02:55:32 +01:00
- const textBuffer = content.value.create(DefaultEndOfLine.LF);
- const lineCount = textBuffer.getLineCount();
- const range = new Range(1, 1, lineCount, textBuffer.getLineLength(lineCount) + 1);
- const markdown = textBuffer.getValueInRange(range, EndOfLinePreference.TextDefined);
- marked(markdown, { renderer });
+ // const textBuffer = content.value.create(DefaultEndOfLine.LF);
+ // const lineCount = textBuffer.getLineCount();
+ // const range = new Range(1, 1, lineCount, textBuffer.getLineLength(lineCount) + 1);
+ // const markdown = textBuffer.getValueInRange(range, EndOfLinePreference.TextDefined);
+ marked(content, { renderer });
@@ -91 +93 @@ export class WalkThroughSnippetContentProvider implements ITextModelContentProvi
2019-02-02 02:55:32 +01:00
- this.modelService.updateModel(codeEditorModel, content.value);
+ this.modelService.updateModel(codeEditorModel, content);
2019-02-06 18:01:15 +01:00
diff --git a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts
index 29cbfd65c4..ee7e776bdb 100644
2019-02-06 18:01:15 +01:00
--- a/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts
+++ b/src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts
@@ -33,0 +34 @@ function getSystemExtensionsRoot(): string {
+ return (require('vs/../../../../packages/vscode/src/fill/paths') as typeof import ('vs/../../../../packages/vscode/src/fill/paths')).getBuiltInExtensionsDirectory();
diff --git a/src/vs/workbench/services/extensions/node/extensionHostProcess.ts b/src/vs/workbench/services/extensions/node/extensionHostProcess.ts
index 5f2935618c..af5498d7ac 100644
--- a/src/vs/workbench/services/extensions/node/extensionHostProcess.ts
+++ b/src/vs/workbench/services/extensions/node/extensionHostProcess.ts
@@ -132 +132 @@ function connectToRenderer(protocol: IMessagePassingProtocol): Promise<IRenderer
- process.kill(initData.parentPid, 0); // throws an exception if the main process doesn't exist anymore.
+ // process.kill(initData.parentPid, 0); // throws an exception if the main process doesn't exist anymore.
2019-03-02 00:35:41 +01:00
diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
index 817b087ec8..a134b680b5 100644
--- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
+++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts
@@ -16 +16 @@ import { KeybindingParser } from 'vs/base/common/keybindingParser';
-import { OS, OperatingSystem } from 'vs/base/common/platform';
+import { OS, OperatingSystem, isNative } from 'vs/base/common/platform';
@@ -128 +128 @@ export class KeyboardMapperFactory {
- if (OS === OperatingSystem.Windows) {
+ if (isNative && OS === OperatingSystem.Windows) {
diff --git a/src/vs/workbench/workbench.main.ts b/src/vs/workbench/workbench.main.ts
index 1ad274696d..f52d1e0d2e 100644
--- a/src/vs/workbench/workbench.main.ts
+++ b/src/vs/workbench/workbench.main.ts
@@ -25 +25 @@ import 'vs/workbench/browser/actions/navigationActions';
-import 'vs/workbench/browser/parts/quickopen/quickopenActions';
+import 'vs/workbench/browser/parts/quickopen/quickOpenActions';