Skip to content

Commit

Permalink
remove obsolete disableBlinkFeatures: 'Auxclick'
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Aug 17, 2018
1 parent 7f6f08d commit 0ed4ecd
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/vs/base/node/ps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {

function findName(cmd: string): string {

const RENDERER_PROCESS_HINT = /--disable-blink-features=Auxclick/;
const SHARED_PROCESS_HINT = /--background-color=#ff0000/;
const WINDOWS_WATCHER_HINT = /\\watcher\\win32\\CodeHelper\.exe/;
const WINDOWS_CRASH_REPORTER = /--crashes-directory/;
const WINDOWS_PTY = /\\pipe\\winpty-control/;
Expand Down Expand Up @@ -91,7 +91,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
let matches = TYPE.exec(cmd);
if (matches && matches.length === 2) {
if (matches[1] === 'renderer') {
if (!RENDERER_PROCESS_HINT.exec(cmd)) {
if (SHARED_PROCESS_HINT.exec(cmd)) {
return 'shared-process';
}

Expand Down
5 changes: 1 addition & 4 deletions src/vs/code/electron-main/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ export class ProxyAuthHandler {
width: 450,
height: 220,
show: true,
title: 'VS Code',
webPreferences: {
disableBlinkFeatures: 'Auxclick'
}
title: 'VS Code'
};

const focusedWindow = this.windowsMainService.getFocusedWindow();
Expand Down
3 changes: 2 additions & 1 deletion src/vs/code/electron-main/sharedProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export class SharedProcess implements ISharedProcess {
images: false,
webaudio: false,
webgl: false
}
},
backgroundColor: '#ff0000' // do NOT change, allows us to identify this window as shared-process in the process explorer
});
const config = assign({
appRoot: this.environmentService.appRoot,
Expand Down
1 change: 0 additions & 1 deletion src/vs/code/electron-main/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ export class CodeWindow implements ICodeWindow {
title: product.nameLong,
webPreferences: {
'backgroundThrottling': false, // by default if Code is in the background, intervals and timeouts get throttled,
disableBlinkFeatures: 'Auxclick' // disable auxclick events (see https://developers.google.com/web/updates/2016/10/auxclick)
}
};

Expand Down
10 changes: 2 additions & 8 deletions src/vs/platform/issue/electron-main/issueService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ export class IssueService implements IIssueService {
x: position.x,
y: position.y,
title: localize('issueReporter', "Issue Reporter"),
backgroundColor: data.styles.backgroundColor || DEFAULT_BACKGROUND_COLOR,
webPreferences: {
disableBlinkFeatures: 'Auxclick'
}
backgroundColor: data.styles.backgroundColor || DEFAULT_BACKGROUND_COLOR
});

this._issueWindow.setMenuBarVisibility(false); // workaround for now, until a menu is implemented
Expand Down Expand Up @@ -111,10 +108,7 @@ export class IssueService implements IIssueService {
x: position.x,
y: position.y,
backgroundColor: data.styles.backgroundColor,
title: localize('processExplorer', "Process Explorer"),
webPreferences: {
disableBlinkFeatures: 'Auxclick'
}
title: localize('processExplorer', "Process Explorer")
});

this._processExplorerWindow.setMenuBarVisibility(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ export class WebviewElement extends Disposable {
this._webview = document.createElement('webview');
this._webview.setAttribute('partition', this._options.allowSvgs ? 'webview' : `webview${Date.now()}`);

// disable auxclick events (see https://developers.google.com/web/updates/2016/10/auxclick)

This comment has been minimized.

Copy link
@bpasero

bpasero Aug 17, 2018

Author Member

@mjbvz fyi as of Electron 3.0.x, we can no longer disable auxclick. It will now be fired when a non-primary mouse button is used (e.g. on a link).

this._webview.setAttribute('disableblinkfeatures', 'Auxclick');

this._webview.setAttribute('disableguestresize', '');
this._webview.setAttribute('webpreferences', 'contextIsolation=yes');

Expand Down

0 comments on commit 0ed4ecd

Please sign in to comment.