提交 c8c1d83b 编写于 作者: B Benjamin Pasero

debt - upstream some changes from electron-3.0.x branch

上级 8c27e80e
......@@ -818,7 +818,6 @@ export function isHTMLElement(o: any): o is HTMLElement {
export const EventType = {
// Mouse
CLICK: 'click',
AUXCLICK: 'auxclick', // >= Chrome 56
DBLCLICK: 'dblclick',
MOUSE_UP: 'mouseup',
MOUSE_DOWN: 'mousedown',
......
......@@ -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 = /--disable-blink-features=Auxclick/;
const WINDOWS_WATCHER_HINT = /\\watcher\\win32\\CodeHelper\.exe/;
const WINDOWS_CRASH_REPORTER = /--crashes-directory/;
const WINDOWS_PTY = /\\pipe\\winpty-control/;
......@@ -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';
}
......
......@@ -553,7 +553,6 @@ export class TreeView extends HeightMap {
this.viewListeners.push(DOM.addDisposableListener(this.domNode, 'mousedown', (e) => this.onMouseDown(e)));
this.viewListeners.push(DOM.addDisposableListener(this.domNode, 'mouseup', (e) => this.onMouseUp(e)));
this.viewListeners.push(DOM.addDisposableListener(this.wrapper, 'click', (e) => this.onClick(e)));
this.viewListeners.push(DOM.addDisposableListener(this.wrapper, 'auxclick', (e) => this.onClick(e))); // >= Chrome 56
this.viewListeners.push(DOM.addDisposableListener(this.domNode, 'contextmenu', (e) => this.onContextMenu(e)));
this.viewListeners.push(DOM.addDisposableListener(this.wrapper, Touch.EventType.Tap, (e) => this.onTap(e)));
this.viewListeners.push(DOM.addDisposableListener(this.wrapper, Touch.EventType.Change, (e) => this.onTouchChange(e)));
......
......@@ -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();
......
......@@ -40,7 +40,8 @@ export class SharedProcess implements ISharedProcess {
webPreferences: {
images: false,
webaudio: false,
webgl: false
webgl: false,
disableBlinkFeatures: 'Auxclick' // do NOT change, allows us to identify this window as shared-process in the process explorer
}
});
const config = assign({
......
......@@ -133,8 +133,7 @@ export class CodeWindow implements ICodeWindow {
// want to enforce that Code stays in the foreground. This triggers a disable_hidden_
// flag that Electron provides via patch:
// https://github.com/electron/libchromiumcontent/blob/master/patches/common/chromium/disable_hidden.patch
'backgroundThrottling': false,
disableBlinkFeatures: 'Auxclick' // disable auxclick events (see https://developers.google.com/web/updates/2016/10/auxclick)
'backgroundThrottling': false
}
};
......
......@@ -67,10 +67,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
......@@ -117,10 +114,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);
......
......@@ -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._webview.setAttribute('disableblinkfeatures', 'Auxclick');
this._webview.setAttribute('disableguestresize', '');
this._webview.setAttribute('webpreferences', 'contextIsolation=yes');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册