Skip to content

Commit 0089596

Browse files
committed
Rename isEdgeOrIE to isEdge
1 parent 7e4c8c9 commit 0089596

8 files changed

Lines changed: 11 additions & 13 deletions

File tree

src/vs/base/browser/browser.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ export const onDidChangeFullscreen = WindowManager.INSTANCE.onDidChangeFullscree
111111
const userAgent = navigator.userAgent;
112112

113113
export const isEdge = (userAgent.indexOf('Edge/') >= 0);
114-
export const isEdgeOrIE = isEdge;
115-
116114
export const isOpera = (userAgent.indexOf('Opera') >= 0);
117115
export const isFirefox = (userAgent.indexOf('Firefox') >= 0);
118116
export const isWebKit = (userAgent.indexOf('AppleWebKit') >= 0);

src/vs/base/browser/ui/scrollbar/scrollableElement.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import 'vs/css!./media/scrollbars';
7-
import { isEdgeOrIE } from 'vs/base/browser/browser';
7+
import { isEdge } from 'vs/base/browser/browser';
88
import * as dom from 'vs/base/browser/dom';
99
import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode';
1010
import { IMouseEvent, StandardWheelEvent, IMouseWheelEvent } from 'vs/base/browser/mouseEvent';
@@ -326,7 +326,7 @@ export abstract class AbstractScrollableElement extends Widget {
326326
this._onMouseWheel(new StandardWheelEvent(browserEvent));
327327
};
328328

329-
this._mouseWheelToDispose.push(dom.addDisposableListener(this._listenOnDomNode, isEdgeOrIE ? 'mousewheel' : 'wheel', onMouseWheel, { passive: false }));
329+
this._mouseWheelToDispose.push(dom.addDisposableListener(this._listenOnDomNode, isEdge ? 'mousewheel' : 'wheel', onMouseWheel, { passive: false }));
330330
}
331331
}
332332

src/vs/editor/browser/controller/mouseHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class MouseHandler extends ViewEventHandler {
119119
e.stopPropagation();
120120
}
121121
};
122-
this._register(dom.addDisposableListener(this.viewHelper.viewDomNode, browser.isEdgeOrIE ? 'mousewheel' : 'wheel', onMouseWheel, { capture: true, passive: false }));
122+
this._register(dom.addDisposableListener(this.viewHelper.viewDomNode, browser.isEdge ? 'mousewheel' : 'wheel', onMouseWheel, { capture: true, passive: false }));
123123

124124
this._context.addEventHandler(this);
125125
}

src/vs/editor/browser/controller/textAreaHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class VisibleTextAreaData {
5353
}
5454
}
5555

56-
const canUseZeroSizeTextarea = (browser.isEdgeOrIE || browser.isFirefox);
56+
const canUseZeroSizeTextarea = (browser.isEdge || browser.isFirefox);
5757

5858
export class TextAreaHandler extends ViewPart {
5959

@@ -283,7 +283,7 @@ export class TextAreaHandler extends ViewPart {
283283
}));
284284

285285
this._register(this._textAreaInput.onCompositionUpdate((e: ICompositionData) => {
286-
if (browser.isEdgeOrIE) {
286+
if (browser.isEdge) {
287287
// Due to isEdgeOrIE (where the textarea was not cleared initially)
288288
// we cannot assume the text consists only of the composited text
289289
this._visibleTextArea = this._visibleTextArea!.setWidth(0);

src/vs/editor/browser/controller/textAreaInput.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export class TextAreaInput extends Disposable {
191191
this._isDoingComposition = true;
192192

193193
// In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled.
194-
if (!browser.isEdgeOrIE) {
194+
if (!browser.isEdge) {
195195
this._setAndWriteTextAreaState('compositionstart', TextAreaState.EMPTY);
196196
}
197197

@@ -225,7 +225,7 @@ export class TextAreaInput extends Disposable {
225225
// Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue.
226226
// The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME,
227227
// which breaks this path of code.
228-
if (browser.isEdgeOrIE && locale === 'ja') {
228+
if (browser.isEdge && locale === 'ja') {
229229
return true;
230230
}
231231

@@ -266,7 +266,7 @@ export class TextAreaInput extends Disposable {
266266

267267
// Due to isEdgeOrIE (where the textarea was not cleared initially) and isChrome (the textarea is not updated correctly when composition ends)
268268
// we cannot assume the text at the end consists only of the composited text
269-
if (browser.isEdgeOrIE || browser.isChrome) {
269+
if (browser.isEdge || browser.isChrome) {
270270
this._textAreaState = TextAreaState.readFromTextArea(this._textArea);
271271
}
272272

src/vs/editor/browser/viewParts/lines/viewLine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const canUseFastRenderedViewLine = (function () {
4242
return true;
4343
})();
4444

45-
const alwaysRenderInlineSelection = (browser.isEdgeOrIE);
45+
const alwaysRenderInlineSelection = (browser.isEdge);
4646

4747
export class DomReadingContext {
4848

src/vs/editor/browser/viewParts/selections/selections.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function toStyled(item: LineVisibleRanges): LineVisibleRangesWithStyle {
6060
// TODO@Alex: Remove this once IE11 fixes Bug #524217
6161
// The problem in IE11 is that it does some sort of auto-zooming to accomodate for displays with different pixel density.
6262
// Unfortunately, this auto-zooming is buggy around dealing with rounded borders
63-
const isIEWithZoomingIssuesNearRoundedBorders = browser.isEdgeOrIE;
63+
const isIEWithZoomingIssuesNearRoundedBorders = browser.isEdge;
6464

6565

6666
export class SelectionsOverlay extends DynamicViewOverlay {

src/vs/editor/contrib/clipboard/clipboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste';
2323
const supportsCut = (platform.isNative || document.queryCommandSupported('cut'));
2424
const supportsCopy = (platform.isNative || document.queryCommandSupported('copy'));
2525
// IE and Edge have trouble with setting html content in clipboard
26-
const supportsCopyWithSyntaxHighlighting = (supportsCopy && !browser.isEdgeOrIE);
26+
const supportsCopyWithSyntaxHighlighting = (supportsCopy && !browser.isEdge);
2727
// Chrome incorrectly returns true for document.queryCommandSupported('paste')
2828
// when the paste feature is available but the calling script has insufficient
2929
// privileges to actually perform the action

0 commit comments

Comments
 (0)