Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Dec 15, 2024
1 parent b3cb2e1 commit 21fd63c
Show file tree
Hide file tree
Showing 634 changed files with 208,123 additions and 88,557 deletions.
13 changes: 7 additions & 6 deletions Source/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,17 +304,18 @@ function configureCommandlineSwitchesSync(cliArgs: NativeParsedArgs) {
// Following features are disabled from the runtime:
// `CalculateNativeWinOcclusion` - Disable native window occlusion tracker (https://groups.google.com/a/chromium.org/g/embedder-dev/c/ZF3uHHyWLKw/m/VDN2hDXMAAAJ)
// `PlzDedicatedWorker` - Refs https://github.com/microsoft/vscode/issues/233060#issuecomment-2523212427
const featuresToDisable =
`CalculateNativeWinOcclusion,PlzDedicatedWorker,${app.commandLine.getSwitchValue('disable-features')}`;
app.commandLine.appendSwitch('disable-features', featuresToDisable);
const featuresToDisable = `CalculateNativeWinOcclusion,PlzDedicatedWorker,${app.commandLine.getSwitchValue("disable-features")}`;
app.commandLine.appendSwitch("disable-features", featuresToDisable);

app.commandLine.appendSwitch("disable-features", featuresToDisable);
// Blink features to configure.
// `FontMatchingCTMigration` - Siwtch font matching on macOS to Appkit (Refs https://github.com/microsoft/vscode/issues/224496#issuecomment-2270418470).
// `StandardizedBrowserZoom` - Disable zoom adjustment for bounding box (https://github.com/microsoft/vscode/issues/232750#issuecomment-2459495394)
const blinkFeaturesToDisable =
`FontMatchingCTMigration,StandardizedBrowserZoom,${app.commandLine.getSwitchValue('disable-blink-features')}`;
app.commandLine.appendSwitch('disable-blink-features', blinkFeaturesToDisable);
const blinkFeaturesToDisable = `FontMatchingCTMigration,StandardizedBrowserZoom,${app.commandLine.getSwitchValue("disable-blink-features")}`;
app.commandLine.appendSwitch(
"disable-blink-features",
blinkFeaturesToDisable,
);

app.commandLine.appendSwitch(
"disable-blink-features",
Expand Down
40 changes: 26 additions & 14 deletions Source/server-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,43 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import './bootstrap-server.js'; // this MUST come before other imports as it changes global state
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
import { devInjectNodeModuleLookupPath } from './bootstrap-node.js';
import { bootstrapESM } from './bootstrap-esm.js';
import { resolveNLSConfiguration } from './vs/base/node/nls.js';
import { product } from './bootstrap-meta.js';
import "./bootstrap-server.js"; // this MUST come before other imports as it changes global state

import { dirname, join } from "path";
import { fileURLToPath } from "url";

import { bootstrapESM } from "./bootstrap-esm.js";
import { product } from "./bootstrap-meta.js";
import { devInjectNodeModuleLookupPath } from "./bootstrap-node.js";
import { resolveNLSConfiguration } from "./vs/base/node/nls.js";

const __dirname = dirname(fileURLToPath(import.meta.url));

// NLS
const nlsConfiguration = await resolveNLSConfiguration({ userLocale: 'en', osLocale: 'en', commit: product.commit, userDataPath: '', nlsMetadataPath: __dirname });
process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfiguration); // required for `bootstrap-esm` to pick up NLS messages
const nlsConfiguration = await resolveNLSConfiguration({
userLocale: "en",
osLocale: "en",
commit: product.commit,
userDataPath: "",
nlsMetadataPath: __dirname,
});
process.env["VSCODE_NLS_CONFIG"] = JSON.stringify(nlsConfiguration); // required for `bootstrap-esm` to pick up NLS messages

if (process.env['VSCODE_DEV']) {
if (process.env["VSCODE_DEV"]) {
// When running out of sources, we need to load node modules from remote/node_modules,
// which are compiled against nodejs, not electron
process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'] = process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'] || join(__dirname, '..', 'remote', 'node_modules');
devInjectNodeModuleLookupPath(process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH']);
process.env["VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH"] =
process.env["VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH"] ||
join(__dirname, "..", "remote", "node_modules");
devInjectNodeModuleLookupPath(
process.env["VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH"],
);
} else {
delete process.env['VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH'];
delete process.env["VSCODE_DEV_INJECT_NODE_MODULE_LOOKUP_PATH"];
}

// Bootstrap ESM
await bootstrapESM();

// Load Server
await import('./vs/server/node/server.cli.js');
await import("./vs/server/node/server.cli.js");
45 changes: 32 additions & 13 deletions Source/vs/base/browser/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3119,23 +3119,42 @@ export function h(
}

/** @deprecated This is a duplication of the h function. Needs cleanup. */
export function svgElem<TTag extends string>
(tag: TTag):
TagToRecord<TTag> extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;
export function svgElem<TTag extends string>(
tag: TTag,
): TagToRecord<TTag> extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;
/** @deprecated This is a duplication of the h function. Needs cleanup. */
export function svgElem<TTag extends string, T extends Child[]>
(tag: TTag, children: [...T]):
(ArrayToObj<T> & TagToRecord<TTag>) extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;
export function svgElem<TTag extends string, T extends Child[]>(
tag: TTag,
children: [...T],
): ArrayToObj<T> & TagToRecord<TTag> extends infer Y
? { [TKey in keyof Y]: Y[TKey] }
: never;
/** @deprecated This is a duplication of the h function. Needs cleanup. */
export function svgElem<TTag extends string>
(tag: TTag, attributes: Partial<ElementAttributes<TagToElement<TTag>>>):
TagToRecord<TTag> extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;
export function svgElem<TTag extends string>(
tag: TTag,
attributes: Partial<ElementAttributes<TagToElement<TTag>>>,
): TagToRecord<TTag> extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;
/** @deprecated This is a duplication of the h function. Needs cleanup. */
export function svgElem<TTag extends string, T extends Child[]>
(tag: TTag, attributes: Partial<ElementAttributes<TagToElement<TTag>>>, children: [...T]):
(ArrayToObj<T> & TagToRecord<TTag>) extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;
export function svgElem<TTag extends string, T extends Child[]>(
tag: TTag,
attributes: Partial<ElementAttributes<TagToElement<TTag>>>,
children: [...T],
): ArrayToObj<T> & TagToRecord<TTag> extends infer Y
? { [TKey in keyof Y]: Y[TKey] }
: never;
/** @deprecated This is a duplication of the h function. Needs cleanup. */
export function svgElem(tag: string, ...args: [] | [attributes: { $: string } & Partial<ElementAttributes<HTMLElement>> | Record<string, any>, children?: any[]] | [children: any[]]): Record<string, HTMLElement> {
export function svgElem(
tag: string,
...args:
| []
| [
attributes:
| ({ $: string } & Partial<ElementAttributes<HTMLElement>>)
| Record<string, any>,
children?: any[],
]
| [children: any[]]
): Record<string, HTMLElement> {
let attributes: { $?: string } & Partial<ElementAttributes<HTMLElement>>;

let children: (Record<string, HTMLElement> | HTMLElement)[] | undefined;
Expand Down
4 changes: 0 additions & 4 deletions Source/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,7 @@ export class BreadcrumbsWidget {

for (
;

start < this._items.length && start < this._nodes.length;

start++
) {
const item = this._items[start];
Expand Down Expand Up @@ -515,9 +513,7 @@ export class BreadcrumbsWidget {

for (
let el: HTMLElement | null = event.target;

el;

el = el.parentElement
) {
const idx = this._nodes.indexOf(el as HTMLDivElement);
Expand Down
Loading

0 comments on commit 21fd63c

Please sign in to comment.