VS Code merge to df8fe74bd55313de0dd2303bc47a4aab0ca56b0e (#17979)

* Merge from vscode 504f934659740e9d41501cad9f162b54d7745ad9

* delete unused folders

* distro

* Bump build node version

* update chokidar

* FIx hygiene errors

* distro

* Fix extension lint issues

* Remove strict-vscode

* Add copyright header exemptions

* Bump vscode-extension-telemetry to fix webpacking issue with zone.js

* distro

* Fix failing tests (revert marked.js back to current one until we decide to update)

* Skip searchmodel test

* Fix mac build

* temp debug script loading

* Try disabling coverage

* log error too

* Revert "log error too"

This reverts commit af0183e5d4ab458fdf44b88fbfab9908d090526f.

* Revert "temp debug script loading"

This reverts commit 3d687d541c76db2c5b55626c78ae448d3c25089c.

* Add comments explaining coverage disabling

* Fix ansi_up loading issue

* Merge latest from ads

* Use newer option

* Fix compile

* add debug logging warn

* Always log stack

* log more

* undo debug

* Update to use correct base path (+cleanup)

* distro

* fix compile errors

* Remove strict-vscode

* Fix sql editors not showing

* Show db dropdown input & fix styling

* Fix more info in gallery

* Fix gallery asset requests

* Delete unused workflow

* Fix tapable resolutions for smoke test compile error

* Fix smoke compile

* Disable crash reporting

* Disable interactive

Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
Charles Gagnon
2022-01-06 09:06:56 -08:00
committed by GitHub
parent fd2736b6a6
commit 2bc6a0cd01
2099 changed files with 79520 additions and 43813 deletions

View File

@@ -4,20 +4,19 @@
*--------------------------------------------------------------------------------------------*/
import * as browser from 'vs/base/browser/browser';
import { domEvent } from 'vs/base/browser/event';
import { BrowserFeatures } from 'vs/base/browser/canIUse';
import { IKeyboardEvent, StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { IMouseEvent, StandardMouseEvent } from 'vs/base/browser/mouseEvent';
import { TimeoutTimer } from 'vs/base/common/async';
import { onUnexpectedError } from 'vs/base/common/errors';
import { Emitter, Event } from 'vs/base/common/event';
import { Disposable, DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
import * as platform from 'vs/base/common/platform';
import { URI } from 'vs/base/common/uri';
import { FileAccess, RemoteAuthorities } from 'vs/base/common/network';
import { BrowserFeatures } from 'vs/base/browser/canIUse';
import { insane, InsaneOptions } from 'vs/base/common/insane/insane';
import { KeyCode } from 'vs/base/common/keyCodes';
import { Disposable, DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
import { FileAccess, RemoteAuthorities } from 'vs/base/common/network';
import * as platform from 'vs/base/common/platform';
import { withNullAsUndefined } from 'vs/base/common/types';
import { URI } from 'vs/base/common/uri';
export function clearNode(node: HTMLElement): void {
while (node.firstChild) {
@@ -671,7 +670,7 @@ function getParentFlowToElement(node: HTMLElement): HTMLElement | null {
}
/**
* Check if `testAncestor` is an ancessor of `testChild`, observing the explicit
* Check if `testAncestor` is an ancestor of `testChild`, observing the explicit
* parents set by `setParentFlowTo`.
*/
export function isAncestorUsingFlowTo(testChild: Node, testAncestor: Node): boolean {
@@ -975,8 +974,8 @@ class FocusTracker extends Disposable implements IFocusTracker {
}
};
this._register(domEvent(element, EventType.FOCUS, true)(onFocus));
this._register(domEvent(element, EventType.BLUR, true)(onBlur));
this._register(addDisposableListener(element, EventType.FOCUS, onFocus, true));
this._register(addDisposableListener(element, EventType.BLUR, onBlur, true));
}
refreshState() {
@@ -1180,7 +1179,7 @@ export function computeScreenAwareSize(cssPx: number): number {
/**
* Open safely a new window. This is the best way to do so, but you cannot tell
* if the window was opened or if it was blocked by the brower's popup blocker.
* if the window was opened or if it was blocked by the browser's popup blocker.
* If you want to tell if the browser blocked the new window, use `windowOpenNoOpenerWithSuccess`.
*
* See https://github.com/microsoft/monaco-editor/issues/601
@@ -1200,7 +1199,7 @@ export function windowOpenNoOpener(url: string): void {
}
/**
* Open safely a new window. This technique is not appropiate in certain contexts,
* Open safely a new window. This technique is not appropriate in certain contexts,
* like for example when the JS context is executing inside a sandboxed iframe.
* If it is not necessary to know if the browser blocked the new window, use
* `windowOpenNoOpener`.
@@ -1306,7 +1305,7 @@ export enum DetectedFullscreenMode {
DOCUMENT = 1,
/**
* The browser is fullsreen, e.g. because the user enabled
* The browser is fullscreen, e.g. because the user enabled
* native window fullscreen for it.
*/
BROWSER
@@ -1393,7 +1392,7 @@ const _ttpSafeInnerHtml = window.trustedTypes?.createPolicy('safeInnerHtml', {
export function safeInnerHtml(node: HTMLElement, value: string): void {
const options = _extInsaneOptions({
allowedTags: ['a', 'button', 'blockquote', 'code', 'div', 'h1', 'h2', 'h3', 'h4', 'i', 'img', 'input', 'label', 'li', 'p', 'pre', 'select', 'small', 'span', 'strong', 'textarea', 'ul', 'ol'], // {{SQL CARBON EDIT}} Add tags for welcome page support
allowedTags: ['a', 'button', 'blockquote', 'code', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'input', 'label', 'li', 'p', 'pre', 'select', 'small', 'span', 'strong', 'textarea', 'ul', 'ol'], // {{SQL CARBON EDIT}} Add i & img tags for welcome page support
allowedAttributes: {
'a': ['href', 'x-dispatch'],
'button': ['data-href', 'x-dispatch'],
@@ -1481,7 +1480,7 @@ export class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
metaKey: false
};
this._subscriptions.add(domEvent(window, 'keydown', true)(e => {
this._subscriptions.add(addDisposableListener(window, 'keydown', e => {
if (e.defaultPrevented) {
return;
}
@@ -1516,9 +1515,9 @@ export class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
this._keyStatus.event = e;
this.fire(this._keyStatus);
}
}));
}, true));
this._subscriptions.add(domEvent(window, 'keyup', true)(e => {
this._subscriptions.add(addDisposableListener(window, 'keyup', e => {
if (e.defaultPrevented) {
return;
}
@@ -1548,23 +1547,23 @@ export class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
this._keyStatus.event = e;
this.fire(this._keyStatus);
}
}));
}, true));
this._subscriptions.add(domEvent(document.body, 'mousedown', true)(e => {
this._subscriptions.add(addDisposableListener(document.body, 'mousedown', () => {
this._keyStatus.lastKeyPressed = undefined;
}));
}, true));
this._subscriptions.add(domEvent(document.body, 'mouseup', true)(e => {
this._subscriptions.add(addDisposableListener(document.body, 'mouseup', () => {
this._keyStatus.lastKeyPressed = undefined;
}));
}, true));
this._subscriptions.add(domEvent(document.body, 'mousemove', true)(e => {
this._subscriptions.add(addDisposableListener(document.body, 'mousemove', e => {
if (e.buttons) {
this._keyStatus.lastKeyPressed = undefined;
}
}));
}, true));
this._subscriptions.add(domEvent(window, 'blur')(e => {
this._subscriptions.add(addDisposableListener(window, 'blur', () => {
this.resetKeyStatus();
}));
}
@@ -1623,3 +1622,14 @@ export function addMatchMediaChangeListener(query: string, callback: () => void)
mediaQueryList.addListener(callback);
}
}
export const enum ZIndex {
SASH = 35,
SuggestWidget = 40,
Hover = 50,
DragImage = 1000,
MenubarMenuItemsHolder = 2000, // quick-input-widget
ContextView = 2500,
ModalDialog = 2600,
PaneDropOverlay = 10000
}