Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)

This commit is contained in:
Anthony Dresser
2019-08-12 21:31:51 -07:00
committed by GitHub
parent 00250839fc
commit 7eba8c4c03
616 changed files with 9472 additions and 7087 deletions

View File

@@ -3,9 +3,6 @@
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy"
content="default-src 'none'; script-src 'self'; frame-src 'self'; style-src 'unsafe-inline'; worker-src 'self';" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Virtual Document</title>
@@ -16,4 +13,4 @@
<script src="host.js"></script>
</body>
</html>
</html>

View File

@@ -45,7 +45,7 @@ export class WebviewEditorInputFactory implements IEditorInputFactory {
const data: SerializedWebview = {
viewType: input.viewType,
title: input.getName(),
options: input.webview.options,
options: { ...input.webview.options, ...input.webview.contentOptions },
extensionLocation: input.extension ? input.extension.location : undefined,
extensionId: input.extension && input.extension.id ? input.extension.id.value : undefined,
state: input.webview.state,
@@ -118,4 +118,4 @@ function reviveState(state: unknown | undefined): undefined | string {
return (state as any).state;
}
return undefined;
}
}

View File

@@ -15,6 +15,7 @@ import { IEditorGroup, IEditorGroupsService } from 'vs/workbench/services/editor
import { ACTIVE_GROUP_TYPE, IEditorService, SIDE_GROUP_TYPE } from 'vs/workbench/services/editor/common/editorService';
import { RevivedWebviewEditorInput, WebviewEditorInput } from './webviewEditorInput';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
export const IWebviewEditorService = createDecorator<IWebviewEditorService>('webviewEditorService');
@@ -264,3 +265,5 @@ export class WebviewEditorService implements IWebviewEditorService {
return rootPaths;
}
}
registerSingleton(IWebviewEditorService, WebviewEditorService, true);

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { SimpleFindWidget } from 'vs/editor/contrib/find/simpleFindWidget';
import { SimpleFindWidget } from 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
@@ -54,4 +54,6 @@ export class WebviewFindWidget extends SimpleFindWidget {
protected onFindInputFocusTrackerFocus() { }
protected onFindInputFocusTrackerBlur() { }
}
protected findFirst() { }
}

View File

@@ -7,6 +7,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { IFrameWebview } from 'vs/workbench/contrib/webview/browser/webviewElement';
import { IWebviewService, WebviewContentOptions, WebviewEditorOverlay, WebviewElement, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview';
import { DynamicWebviewEditorOverlay } from './dynamicWebviewEditorOverlay';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
export class WebviewService implements IWebviewService {
_serviceBrand: any;
@@ -31,3 +32,5 @@ export class WebviewService implements IWebviewService {
return this._instantiationService.createInstance(DynamicWebviewEditorOverlay, id, options, contentOptions);
}
}
registerSingleton(IWebviewService, WebviewService, true);

View File

@@ -566,7 +566,7 @@ export class ElectronWebviewBasedWebview extends Disposable implements Webview {
}
public layout(): void {
if (!this._webview) {
if (!this._webview || this._webview.style.width === '0px') {
return;
}
const contents = this._webview.getWebContents();