@@ -8,7 +8,6 @@ import { coalesce } from 'vs/base/common/arrays';
8
8
import { DeferredPromise } from 'vs/base/common/async' ;
9
9
import { decodeBase64 } from 'vs/base/common/buffer' ;
10
10
import { Emitter , Event } from 'vs/base/common/event' ;
11
- import { Disposable } from 'vs/base/common/lifecycle' ;
12
11
import { getExtensionForMimeType } from 'vs/base/common/mime' ;
13
12
import { FileAccess , Schemas } from 'vs/base/common/network' ;
14
13
import { equals } from 'vs/base/common/objects' ;
@@ -29,6 +28,8 @@ import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs';
29
28
import { IFileService } from 'vs/platform/files/common/files' ;
30
29
import { IOpenerService , matchesScheme , matchesSomeScheme } from 'vs/platform/opener/common/opener' ;
31
30
import { IStorageService } from 'vs/platform/storage/common/storage' ;
31
+ import { editorFindMatch , editorFindMatchHighlight } from 'vs/platform/theme/common/colorRegistry' ;
32
+ import { IThemeService , Themable } from 'vs/platform/theme/common/themeService' ;
32
33
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' ;
33
34
import { IWorkspaceTrustManagementService } from 'vs/platform/workspace/common/workspaceTrust' ;
34
35
import { asWebviewUri , webviewGenericCspSource } from 'vs/workbench/common/webview' ;
@@ -98,7 +99,7 @@ interface BacklayerWebviewOptions {
98
99
readonly outputLineHeight : number ;
99
100
}
100
101
101
- export class BackLayerWebView < T extends ICommonCellInfo > extends Disposable {
102
+ export class BackLayerWebView < T extends ICommonCellInfo > extends Themable {
102
103
103
104
private static _originStore ?: WebviewOriginStore ;
104
105
@@ -149,8 +150,9 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Disposable {
149
150
@IWorkspaceContextService private readonly workspaceContextService : IWorkspaceContextService ,
150
151
@IEditorGroupsService private readonly editorGroupService : IEditorGroupsService ,
151
152
@IStorageService private readonly storageService : IStorageService ,
153
+ @IThemeService themeService : IThemeService ,
152
154
) {
153
- super ( ) ;
155
+ super ( themeService ) ;
154
156
155
157
this . element = document . createElement ( 'div' ) ;
156
158
@@ -247,6 +249,8 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Disposable {
247
249
this . nonce ) ;
248
250
249
251
const enableCsp = this . configurationService . getValue ( 'notebook.experimental.enableCsp' ) ;
252
+ const findHighlight = this . getColor ( editorFindMatch ) ;
253
+ const currentMatchHighlight = this . getColor ( editorFindMatchHighlight ) ;
250
254
return /* html */ `
251
255
<html lang="en">
252
256
<head>
@@ -264,11 +268,11 @@ export class BackLayerWebView<T extends ICommonCellInfo> extends Disposable {
264
268
">` : '' }
265
269
<style nonce="${ this . nonce } ">
266
270
::highlight(find-highlight) {
267
- background-color: var(--vscode-editor-findMatchHighlightBackground );
271
+ background-color: var(--vscode-editor-findMatchBackground, ${ findHighlight } );
268
272
}
269
273
270
274
::highlight(current-find-highlight) {
271
- background-color: var(--vscode-editor-findMatchBackground );
275
+ background-color: var(--vscode-editor-findMatchHighlightBackground, ${ currentMatchHighlight } );
272
276
}
273
277
274
278
#container .cell_container {
0 commit comments