Skip to content

Commit c8c1d83

Browse files
author
Benjamin Pasero
committed
debt - upstream some changes from electron-3.0.x branch
1 parent 8c27e80 commit c8c1d83

8 files changed

Lines changed: 8 additions & 22 deletions

File tree

src/vs/base/browser/dom.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,6 @@ export function isHTMLElement(o: any): o is HTMLElement {
818818
export const EventType = {
819819
// Mouse
820820
CLICK: 'click',
821-
AUXCLICK: 'auxclick', // >= Chrome 56
822821
DBLCLICK: 'dblclick',
823822
MOUSE_UP: 'mouseup',
824823
MOUSE_DOWN: 'mousedown',

src/vs/base/node/ps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
6060

6161
function findName(cmd: string): string {
6262

63-
const RENDERER_PROCESS_HINT = /--disable-blink-features=Auxclick/;
63+
const SHARED_PROCESS_HINT = /--disable-blink-features=Auxclick/;
6464
const WINDOWS_WATCHER_HINT = /\\watcher\\win32\\CodeHelper\.exe/;
6565
const WINDOWS_CRASH_REPORTER = /--crashes-directory/;
6666
const WINDOWS_PTY = /\\pipe\\winpty-control/;
@@ -91,7 +91,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
9191
let matches = TYPE.exec(cmd);
9292
if (matches && matches.length === 2) {
9393
if (matches[1] === 'renderer') {
94-
if (!RENDERER_PROCESS_HINT.exec(cmd)) {
94+
if (SHARED_PROCESS_HINT.exec(cmd)) {
9595
return 'shared-process';
9696
}
9797

src/vs/base/parts/tree/browser/treeView.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,6 @@ export class TreeView extends HeightMap {
553553
this.viewListeners.push(DOM.addDisposableListener(this.domNode, 'mousedown', (e) => this.onMouseDown(e)));
554554
this.viewListeners.push(DOM.addDisposableListener(this.domNode, 'mouseup', (e) => this.onMouseUp(e)));
555555
this.viewListeners.push(DOM.addDisposableListener(this.wrapper, 'click', (e) => this.onClick(e)));
556-
this.viewListeners.push(DOM.addDisposableListener(this.wrapper, 'auxclick', (e) => this.onClick(e))); // >= Chrome 56
557556
this.viewListeners.push(DOM.addDisposableListener(this.domNode, 'contextmenu', (e) => this.onContextMenu(e)));
558557
this.viewListeners.push(DOM.addDisposableListener(this.wrapper, Touch.EventType.Tap, (e) => this.onTap(e)));
559558
this.viewListeners.push(DOM.addDisposableListener(this.wrapper, Touch.EventType.Change, (e) => this.onTouchChange(e)));

src/vs/code/electron-main/auth.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ export class ProxyAuthHandler {
5656
width: 450,
5757
height: 220,
5858
show: true,
59-
title: 'VS Code',
60-
webPreferences: {
61-
disableBlinkFeatures: 'Auxclick'
62-
}
59+
title: 'VS Code'
6360
};
6461

6562
const focusedWindow = this.windowsMainService.getFocusedWindow();

src/vs/code/electron-main/sharedProcess.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export class SharedProcess implements ISharedProcess {
4040
webPreferences: {
4141
images: false,
4242
webaudio: false,
43-
webgl: false
43+
webgl: false,
44+
disableBlinkFeatures: 'Auxclick' // do NOT change, allows us to identify this window as shared-process in the process explorer
4445
}
4546
});
4647
const config = assign({

src/vs/code/electron-main/window.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ export class CodeWindow implements ICodeWindow {
133133
// want to enforce that Code stays in the foreground. This triggers a disable_hidden_
134134
// flag that Electron provides via patch:
135135
// https://github.com/electron/libchromiumcontent/blob/master/patches/common/chromium/disable_hidden.patch
136-
'backgroundThrottling': false,
137-
disableBlinkFeatures: 'Auxclick' // disable auxclick events (see https://developers.google.com/web/updates/2016/10/auxclick)
136+
'backgroundThrottling': false
138137
}
139138
};
140139

src/vs/platform/issue/electron-main/issueService.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ export class IssueService implements IIssueService {
6767
x: position.x,
6868
y: position.y,
6969
title: localize('issueReporter', "Issue Reporter"),
70-
backgroundColor: data.styles.backgroundColor || DEFAULT_BACKGROUND_COLOR,
71-
webPreferences: {
72-
disableBlinkFeatures: 'Auxclick'
73-
}
70+
backgroundColor: data.styles.backgroundColor || DEFAULT_BACKGROUND_COLOR
7471
});
7572

7673
this._issueWindow.setMenuBarVisibility(false); // workaround for now, until a menu is implemented
@@ -117,10 +114,7 @@ export class IssueService implements IIssueService {
117114
x: position.x,
118115
y: position.y,
119116
backgroundColor: data.styles.backgroundColor,
120-
title: localize('processExplorer', "Process Explorer"),
121-
webPreferences: {
122-
disableBlinkFeatures: 'Auxclick'
123-
}
117+
title: localize('processExplorer', "Process Explorer")
124118
});
125119

126120
this._processExplorerWindow.setMenuBarVisibility(false);

src/vs/workbench/parts/webview/electron-browser/webviewElement.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ export class WebviewElement extends Disposable {
4949
this._webview = document.createElement('webview');
5050
this._webview.setAttribute('partition', this._options.allowSvgs ? 'webview' : `webview${Date.now()}`);
5151

52-
// disable auxclick events (see https://developers.google.com/web/updates/2016/10/auxclick)
53-
this._webview.setAttribute('disableblinkfeatures', 'Auxclick');
54-
5552
this._webview.setAttribute('disableguestresize', '');
5653
this._webview.setAttribute('webpreferences', 'contextIsolation=yes');
5754

0 commit comments

Comments
 (0)