Skip to content

Commit

Permalink
trusted types
Browse files Browse the repository at this point in the history
related to #106285
  • Loading branch information
joaomoreno committed Sep 9, 2020
1 parent eb92195 commit 8b993b8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
5 changes: 1 addition & 4 deletions src/vs/base/browser/ui/list/listWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -824,10 +824,7 @@ export class DefaultStyleController implements IStyleController {
content.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${styles.listMatchesShadow}; }`);
}

const newStyles = content.join('\n');
if (newStyles !== this.styleElement.innerHTML) {
this.styleElement.innerHTML = newStyles;
}
this.styleElement.textContent = content.join('\n');
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/browser/ui/sash/sash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export class Sash extends Disposable {
}
}

style.innerHTML = `* { cursor: ${cursor} !important; }`;
style.textContent = `* { cursor: ${cursor} !important; }`;
};

const disposables = new DisposableStore();
Expand Down
6 changes: 1 addition & 5 deletions src/vs/base/browser/ui/tree/abstractTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1474,11 +1474,7 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
content.push(`.monaco-list${suffix} .monaco-tl-indent > .indent-guide.active { border-color: ${styles.treeIndentGuidesStroke}; }`);
}

const newStyles = content.join('\n');
if (newStyles !== this.styleElement.innerHTML) {
this.styleElement.innerHTML = newStyles;
}

this.styleElement.textContent = content.join('\n');
this.view.style(styles);
}

Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ export class DirtyDiffWorkbenchController extends Disposable implements ext.IWor

private setViewState(state: IViewState): void {
this.viewState = state;
this.stylesheet.innerHTML = `
this.stylesheet.textContent = `
.monaco-editor .dirty-diff-modified,.monaco-editor .dirty-diff-added{border-left-width:${state.width}px;}
.monaco-editor .dirty-diff-modified, .monaco-editor .dirty-diff-added, .monaco-editor .dirty-diff-deleted {
opacity: ${state.visibility === 'always' ? 1 : 0};
Expand Down

0 comments on commit 8b993b8

Please sign in to comment.