Skip to content

Commit 0b20f87

Browse files
committed
Remove more unused code (microsoft#38414)
1 parent 9f597f9 commit 0b20f87

7 files changed

Lines changed: 0 additions & 75 deletions

File tree

src/vs/base/browser/dom.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -714,23 +714,6 @@ export function createCSSRule(selector: string, cssText: string, style: HTMLStyl
714714
(<CSSStyleSheet>style.sheet).insertRule(selector + '{' + cssText + '}', 0);
715715
}
716716

717-
export function getCSSRule(selector: string, style: HTMLStyleElement = sharedStyle): any {
718-
if (!style) {
719-
return null;
720-
}
721-
722-
let rules = getDynamicStyleSheetRules(style);
723-
for (let i = 0; i < rules.length; i++) {
724-
let rule = rules[i];
725-
let normalizedSelectorText = rule.selectorText.replace(/::/gi, ':');
726-
if (normalizedSelectorText === selector) {
727-
return rule;
728-
}
729-
}
730-
731-
return null;
732-
}
733-
734717
export function removeCSSRulesContainingSelector(ruleName: string, style = sharedStyle): void {
735718
if (!style) {
736719
return;

src/vs/base/browser/fastDomNode.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,6 @@ export class FastDomNode<T extends HTMLElement> {
6464
this.domNode.style.width = this._width + 'px';
6565
}
6666

67-
public unsetWidth(): void {
68-
if (this._width === -1) {
69-
return;
70-
}
71-
this._width = -1;
72-
this.domNode.style.width = '';
73-
}
74-
7567
public setHeight(height: number): void {
7668
if (this._height === height) {
7769
return;
@@ -80,14 +72,6 @@ export class FastDomNode<T extends HTMLElement> {
8072
this.domNode.style.height = this._height + 'px';
8173
}
8274

83-
public unsetHeight(): void {
84-
if (this._height === -1) {
85-
return;
86-
}
87-
this._height = -1;
88-
this.domNode.style.height = '';
89-
}
90-
9175
public setTop(top: number): void {
9276
if (this._top === top) {
9377
return;
@@ -225,10 +209,6 @@ export class FastDomNode<T extends HTMLElement> {
225209
this.domNode.removeAttribute(name);
226210
}
227211

228-
public hasAttribute(name: string): boolean {
229-
return this.domNode.hasAttribute(name);
230-
}
231-
232212
public appendChild(child: FastDomNode<any>): void {
233213
this.domNode.appendChild(child.domNode);
234214
}

src/vs/base/browser/mouseEvent.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,6 @@ export class DragMouseEvent extends StandardMouseEvent {
114114

115115
}
116116

117-
export class DropMouseEvent extends DragMouseEvent {
118-
119-
constructor(e: MouseEvent) {
120-
super(e);
121-
}
122-
123-
}
124-
125117
interface IWebKitMouseWheelEvent {
126118
wheelDeltaY: number;
127119
wheelDeltaX: number;

src/vs/base/common/diff/diffChange.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
*--------------------------------------------------------------------------------------------*/
55
'use strict';
66

7-
export const DifferenceType = {
8-
Add: 0,
9-
Remove: 1,
10-
Change: 2
11-
};
12-
137
/**
148
* Represents information about a specific difference between two sequences.
159
*/
@@ -51,19 +45,6 @@ export class DiffChange {
5145
this.modifiedLength = modifiedLength;
5246
}
5347

54-
/**
55-
* The type of difference.
56-
*/
57-
public getChangeType() {
58-
if (this.originalLength === 0) {
59-
return DifferenceType.Add;
60-
} else if (this.modifiedLength === 0) {
61-
return DifferenceType.Remove;
62-
} else {
63-
return DifferenceType.Change;
64-
}
65-
}
66-
6748
/**
6849
* The end point (exclusive) of the change in the original sequence.
6950
*/

src/vs/base/common/errors.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ export function onUnexpectedExternalError(e: any): undefined {
148148
return undefined;
149149
}
150150

151-
export function onUnexpectedPromiseError<T>(promise: TPromise<T>): TPromise<T | void> {
152-
return promise.then(null, onUnexpectedError);
153-
}
154-
155151
export interface SerializedError {
156152
readonly $isError: true;
157153
readonly name: string;

src/vs/base/common/platform.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ interface IGlobals {
127127
const _globals = <IGlobals>(typeof self === 'object' ? self : global);
128128
export const globals: any = _globals;
129129

130-
export function hasWebWorkerSupport(): boolean {
131-
return typeof _globals.Worker !== 'undefined';
132-
}
133130
export const setTimeout = _globals.setTimeout.bind(_globals);
134131
export const clearTimeout = _globals.clearTimeout.bind(_globals);
135132

src/vs/editor/browser/config/configuration.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ class CSSBasedConfigurationCache {
4949
delete this._values[itemId];
5050
}
5151

52-
public getKeys(): BareFontInfo[] {
53-
return Object.keys(this._keys).map(id => this._keys[id]);
54-
}
55-
5652
public getValues(): FontInfo[] {
5753
return Object.keys(this._keys).map(id => this._values[id]);
5854
}

0 commit comments

Comments
 (0)