Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix list view default translate3d #97625

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
85c5b50
Distinguish a user removing a row from 'clear' in search
roblourens May 1, 2020
d07ffbc
Fix searchResult tests
roblourens May 1, 2020
69eb032
chore: bump electron@7.2.4 (#96819)
deepak1556 May 2, 2020
052c389
Merge pull request #96803 from microsoft/roblou/fix91901
roblourens May 3, 2020
d40b898
scope sync state per workspace in web
sandy081 May 3, 2020
8b2ee1b
add comment why sync state should be scoped
sandy081 May 4, 2020
c287385
update comment
sandy081 May 4, 2020
3f3d17e
Merge pull request #96873 from microsoft/sandy081/web/fixSyncState
sandy081 May 4, 2020
fd5d9a3
editor groups - resolve #96725 (#96820)
bpasero May 4, 2020
4229a3f
Fixes #96664: Accept `number[]` besides `Uint32Array` for semantic to…
alexdima May 4, 2020
21ace28
Merge pull request #96903 from microsoft/alex/96664
alexdima May 4, 2020
56d9340
Update onDidChangeTreeData event type, fixes #96932 (#96933)
May 4, 2020
d4b8ec9
Make image/dockerfile/dockerComposeFile optional
chrmarti May 4, 2020
96b89dd
Fix task instance limit (#97011)
alexr00 May 5, 2020
c56ec34
Apply scroll area to hover content, not status bar
Tyriar May 5, 2020
c3b0ae5
Merge pull request #97023 from microsoft/tyriar/r145_scroll
Tyriar May 5, 2020
d69a79b
Force custom editors in diff view to have 100% height wrappers (#96969)
mjbvz May 5, 2020
a480e43
Fix #97192 - delete bad setting validation
roblourens May 8, 2020
26e9cd5
Merge pull request #97255 from microsoft/roblou/fixSettingValidation
roblourens May 8, 2020
01a9782
fixes #97199 (#97487)
joaomoreno May 11, 2020
d476742
disable askpass, terminal and github auth when git is disabled (#97604)
joaomoreno May 12, 2020
c5f2f54
Fix #97498. Fallback to default value for translate3d
rebornix May 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .yarnrc
@@ -1,3 +1,3 @@
disturl "https://atom.io/download/electron"
target "7.2.2"
target "7.2.4"
runtime "electron"
4 changes: 2 additions & 2 deletions cgmanifest.json
Expand Up @@ -60,12 +60,12 @@
"git": {
"name": "electron",
"repositoryUrl": "https://github.com/electron/electron",
"commitHash": "959e80cc53cbebf8eb1d62eb2d14fa8fd86b0394"
"commitHash": "0552e0d5de46ffa3b481d741f1db5c779e201565"
}
},
"isOnlyProductionDependency": true,
"license": "MIT",
"version": "7.2.2"
"version": "7.2.4"
},
{
"component": {
Expand Down
27 changes: 18 additions & 9 deletions extensions/configuration-editing/schemas/devContainer.schema.json
Expand Up @@ -282,33 +282,42 @@
]
}
},
"allOf": [
"oneOf": [
{
"oneOf": [
"allOf": [
{
"allOf": [
"oneOf": [
{
"oneOf": [
"allOf": [
{
"$ref": "#/definitions/dockerfileContainer"
"oneOf": [
{
"$ref": "#/definitions/dockerfileContainer"
},
{
"$ref": "#/definitions/imageContainer"
}
]
},
{
"$ref": "#/definitions/imageContainer"
"$ref": "#/definitions/nonComposeBase"
}
]
},
{
"$ref": "#/definitions/nonComposeBase"
"$ref": "#/definitions/composeContainer"
}
]
},
{
"$ref": "#/definitions/composeContainer"
"$ref": "#/definitions/devContainerCommon"
}
]
},
{
"$ref": "#/definitions/devContainerCommon"
"type": "object",
"$ref": "#/definitions/devContainerCommon",
"additionalProperties": false
}
]
}
9 changes: 8 additions & 1 deletion extensions/git/src/askpass.ts
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { window, InputBoxOptions, Uri, OutputChannel, Disposable } from 'vscode';
import { window, InputBoxOptions, Uri, OutputChannel, Disposable, workspace } from 'vscode';
import { IDisposable, EmptyDisposable, toDisposable } from './util';
import * as path from 'path';
import { IIPCHandler, IIPCServer, createIPCServer } from './ipc/ipcServer';
Expand Down Expand Up @@ -31,6 +31,13 @@ export class Askpass implements IIPCHandler {
}

async handle({ request, host }: { request: string, host: string }): Promise<string> {
const config = workspace.getConfiguration('git', null);
const enabled = config.get<boolean>('enabled');

if (!enabled) {
return '';
}

const uri = Uri.parse(host);
const authority = uri.authority.replace(/^.*@/, '');
const password = /password/i.test(request);
Expand Down
3 changes: 2 additions & 1 deletion extensions/git/src/github.ts
Expand Up @@ -56,7 +56,8 @@ export class GithubCredentialProviderManager {
}

private refresh(): void {
this.enabled = workspace.getConfiguration('git', null).get('githubAuthentication', true);
const config = workspace.getConfiguration('git', null);
this.enabled = config.get<boolean>('enabled', true) && config.get('githubAuthentication', true);
}

dispose(): void {
Expand Down
3 changes: 2 additions & 1 deletion extensions/git/src/terminal.ts
Expand Up @@ -34,7 +34,8 @@ export class TerminalEnvironmentManager {
}

private refresh(): void {
this.enabled = workspace.getConfiguration('git', null).get('terminalAuthentication', true);
const config = workspace.getConfiguration('git', null);
this.enabled = config.get<boolean>('enabled', true) && config.get('terminalAuthentication', true);
}

dispose(): void {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -101,7 +101,7 @@
"css-loader": "^3.2.0",
"debounce": "^1.0.0",
"deemon": "^1.4.0",
"electron": "7.2.2",
"electron": "7.2.4",
"eslint": "6.8.0",
"eslint-plugin-jsdoc": "^19.1.0",
"event-stream": "3.3.4",
Expand Down
3 changes: 2 additions & 1 deletion src/vs/base/browser/ui/list/listView.ts
Expand Up @@ -278,7 +278,8 @@ export class ListView<T> implements ISpliceable<T>, IDisposable {
this.rowsContainer = document.createElement('div');
this.rowsContainer.className = 'monaco-list-rows';

if (options.transformOptimization) {
const transformOptimization = getOrDefault(options, o => o.transformOptimization, DefaultOptions.transformOptimization);
if (transformOptimization) {
this.rowsContainer.style.transform = 'translate3d(0px, 0px, 0px)';
}

Expand Down
2 changes: 1 addition & 1 deletion src/vs/code/electron-browser/proxy/auth.html
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Security-Policy"
content="default-src 'none'; img-src 'self' https: data:; media-src 'none'; child-src 'self'; object-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self' https:; font-src 'self' https:;">
content="default-src 'none'; img-src 'self' https: data:; media-src 'none'; child-src 'self'; object-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; connect-src 'self' https:; font-src 'self' https:;">
<style>
html,
body {
Expand Down
3 changes: 2 additions & 1 deletion src/vs/platform/menubar/electron-main/menubar.ts
Expand Up @@ -702,7 +702,8 @@ export class Menubar {
}

// DevTools focused
if (activeWindow.webContents.isDevToolsFocused()) {
if (activeWindow.webContents.isDevToolsFocused() &&
activeWindow.webContents.devToolsWebContents) {
return contextSpecificHandlers.inDevTools(activeWindow.webContents.devToolsWebContents);
}

Expand Down
2 changes: 1 addition & 1 deletion src/vs/vscode.d.ts
Expand Up @@ -7897,7 +7897,7 @@ declare module 'vscode' {
* This will trigger the view to update the changed element/root and its children recursively (if shown).
* To signal that root has changed, do not pass any argument or pass `undefined` or `null`.
*/
onDidChangeTreeData?: Event<T | undefined | null>;
onDidChangeTreeData?: Event<T | undefined | null | void>;

/**
* Get [TreeItem](#TreeItem) representation of the `element`
Expand Down
48 changes: 42 additions & 6 deletions src/vs/workbench/api/common/extHostLanguageFeatures.ts
Expand Up @@ -7,7 +7,7 @@ import { URI, UriComponents } from 'vs/base/common/uri';
import { mixin } from 'vs/base/common/objects';
import type * as vscode from 'vscode';
import * as typeConvert from 'vs/workbench/api/common/extHostTypeConverters';
import { Range, Disposable, CompletionList, SnippetString, CodeActionKind, SymbolInformation, DocumentSymbol, SemanticTokensEdits } from 'vs/workbench/api/common/extHostTypes';
import { Range, Disposable, CompletionList, SnippetString, CodeActionKind, SymbolInformation, DocumentSymbol, SemanticTokensEdits, SemanticTokens, SemanticTokensEdit } from 'vs/workbench/api/common/extHostTypes';
import { ISingleEditOperation } from 'vs/editor/common/model';
import * as modes from 'vs/editor/common/modes';
import { ExtHostDocuments } from 'vs/workbench/api/common/extHostDocuments';
Expand Down Expand Up @@ -676,6 +676,13 @@ class SemanticTokensPreviousResult {
) { }
}

type RelaxedSemanticTokens = { readonly resultId?: string; readonly data: number[]; };
type RelaxedSemanticTokensEdit = { readonly start: number; readonly deleteCount: number; readonly data?: number[]; };
type RelaxedSemanticTokensEdits = { readonly resultId?: string; readonly edits: RelaxedSemanticTokensEdit[]; };

type ProvidedSemanticTokens = vscode.SemanticTokens | RelaxedSemanticTokens;
type ProvidedSemanticTokensEdits = vscode.SemanticTokensEdits | RelaxedSemanticTokensEdits;

export class DocumentSemanticTokensAdapter {

private readonly _previousResults: Map<number, SemanticTokensPreviousResult>;
Expand All @@ -696,13 +703,14 @@ export class DocumentSemanticTokensAdapter {
return this._provider.provideDocumentSemanticTokensEdits(doc, previousResult.resultId, token);
}
return this._provider.provideDocumentSemanticTokens(doc, token);
}).then(value => {
}).then((value: ProvidedSemanticTokens | ProvidedSemanticTokensEdits | null | undefined) => {
if (previousResult) {
this._previousResults.delete(previousResultId);
}
if (!value) {
return null;
}
value = DocumentSemanticTokensAdapter._fixProvidedSemanticTokens(value);
return this._send(DocumentSemanticTokensAdapter._convertToEdits(previousResult, value), value);
});
}
Expand All @@ -711,12 +719,40 @@ export class DocumentSemanticTokensAdapter {
this._previousResults.delete(semanticColoringResultId);
}

private static _isSemanticTokens(v: vscode.SemanticTokens | vscode.SemanticTokensEdits): v is vscode.SemanticTokens {
return v && !!((v as vscode.SemanticTokens).data);
private static _fixProvidedSemanticTokens(v: ProvidedSemanticTokens | ProvidedSemanticTokensEdits): vscode.SemanticTokens | vscode.SemanticTokensEdits {
if (DocumentSemanticTokensAdapter._isSemanticTokens(v)) {
if (DocumentSemanticTokensAdapter._isCorrectSemanticTokens(v)) {
return v;
}
return new SemanticTokens(new Uint32Array(v.data), v.resultId);
} else if (DocumentSemanticTokensAdapter._isSemanticTokensEdits(v)) {
if (DocumentSemanticTokensAdapter._isCorrectSemanticTokensEdits(v)) {
return v;
}
return new SemanticTokensEdits(v.edits.map(edit => new SemanticTokensEdit(edit.start, edit.deleteCount, edit.data ? new Uint32Array(edit.data) : edit.data)), v.resultId);
}
return v;
}

private static _isSemanticTokens(v: ProvidedSemanticTokens | ProvidedSemanticTokensEdits): v is ProvidedSemanticTokens {
return v && !!((v as ProvidedSemanticTokens).data);
}

private static _isSemanticTokensEdits(v: vscode.SemanticTokens | vscode.SemanticTokensEdits): v is vscode.SemanticTokensEdits {
return v && Array.isArray((v as vscode.SemanticTokensEdits).edits);
private static _isCorrectSemanticTokens(v: ProvidedSemanticTokens): v is vscode.SemanticTokens {
return (v.data instanceof Uint32Array);
}

private static _isSemanticTokensEdits(v: ProvidedSemanticTokens | ProvidedSemanticTokensEdits): v is ProvidedSemanticTokensEdits {
return v && Array.isArray((v as ProvidedSemanticTokensEdits).edits);
}

private static _isCorrectSemanticTokensEdits(v: ProvidedSemanticTokensEdits): v is vscode.SemanticTokensEdits {
for (const edit of v.edits) {
if (!(edit.data instanceof Uint32Array)) {
return false;
}
}
return true;
}

private static _convertToEdits(previousResult: SemanticTokensPreviousResult | null | undefined, newResult: vscode.SemanticTokens | vscode.SemanticTokensEdits): vscode.SemanticTokens | vscode.SemanticTokensEdits {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/api/common/extHostTreeViews.ts
Expand Up @@ -153,7 +153,7 @@ export class ExtHostTreeViews implements ExtHostTreeViewsShape {
}
}

type Root = null | undefined;
type Root = null | undefined | void;
type TreeData<T> = { message: boolean, element: T | Root | false };

interface TreeNode extends IDisposable {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/common/editor/editorGroup.ts
Expand Up @@ -662,7 +662,7 @@ export class EditorGroup extends Disposable {
return null;
}));

this.mru = data.mru.map(i => this.editors[i]);
this.mru = coalesce(data.mru.map(i => this.editors[i]));

this.active = this.mru[0];

Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/search/browser/searchActions.ts
Expand Up @@ -615,7 +615,7 @@ export class RemoveAction extends AbstractSearchAndReplaceAction {
this.viewer.setFocus([nextFocusElement], getSelectionKeyboardEvent());
}

this.element.parent().remove(<any>this.element);
this.element.parent().remove(<any>this.element, true);
this.viewer.domFocus();

return Promise.resolve();
Expand Down