Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
954c5ae2
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
954c5ae2
编写于
3月 20, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't set resource on webviews
Fixes #46217
上级
dd3ce6c8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
9 deletion
+13
-9
src/vs/workbench/api/electron-browser/mainThreadWebview.ts
src/vs/workbench/api/electron-browser/mainThreadWebview.ts
+1
-1
src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
...bench/parts/update/electron-browser/releaseNotesEditor.ts
+1
-2
src/vs/workbench/parts/webview/electron-browser/webviewEditor.ts
...workbench/parts/webview/electron-browser/webviewEditor.ts
+1
-1
src/vs/workbench/parts/webview/electron-browser/webviewInput.ts
.../workbench/parts/webview/electron-browser/webviewInput.ts
+10
-5
未找到文件。
src/vs/workbench/api/electron-browser/mainThreadWebview.ts
浏览文件 @
954c5ae2
...
...
@@ -54,7 +54,7 @@ export class MainThreadWebviews implements MainThreadWebviewsShape {
options
:
vscode
.
WebviewOptions
,
extensionFolderPath
:
string
):
void
{
const
webviewInput
=
new
WebviewInput
(
URI
.
parse
(
'
webview://
'
+
handle
),
title
,
options
,
''
,
{
const
webviewInput
=
new
WebviewInput
(
title
,
options
,
''
,
{
onMessage
:
message
=>
this
.
_proxy
.
$onMessage
(
handle
,
message
),
onDidChangePosition
:
position
=>
this
.
_proxy
.
$onDidChangePosition
(
handle
,
position
),
onDispose
:
()
=>
{
...
...
src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts
浏览文件 @
954c5ae2
...
...
@@ -83,8 +83,7 @@ export class ReleaseNotesManager {
this
.
_editorService
.
openEditor
(
this
.
_currentReleaseNotes
,
{
preserveFocus
:
true
});
}
}
else
{
const
uri
=
URI
.
parse
(
'
release-notes:
'
+
version
);
this
.
_currentReleaseNotes
=
new
WebviewInput
(
uri
,
title
,
{
tryRestoreScrollPosition
:
true
,
enableFindWidget
:
true
},
html
,
{
this
.
_currentReleaseNotes
=
new
WebviewInput
(
title
,
{
tryRestoreScrollPosition
:
true
,
enableFindWidget
:
true
},
html
,
{
onDidClickLink
:
uri
=>
this
.
onDidClickLink
(
uri
),
onDispose
:
()
=>
{
this
.
_currentReleaseNotes
=
undefined
;
}
},
this
.
_partService
);
...
...
src/vs/workbench/parts/webview/electron-browser/webviewEditor.ts
浏览文件 @
954c5ae2
...
...
@@ -141,7 +141,7 @@ export class WebviewEditor extends BaseWebviewEditor {
return
undefined
;
}
if
(
this
.
input
&&
this
.
input
.
getResource
().
fsPath
!==
input
.
getResource
().
fsPath
)
{
if
(
this
.
input
)
{
(
this
.
input
as
WebviewInput
).
releaseWebview
(
this
);
this
.
_webview
=
undefined
;
this
.
webviewContent
=
undefined
;
...
...
src/vs/workbench/parts/webview/electron-browser/webviewInput.ts
浏览文件 @
954c5ae2
...
...
@@ -28,7 +28,6 @@ export interface WebviewInputOptions extends vscode.WebviewOptions {
export
class
WebviewInput
extends
EditorInput
{
private
static
handlePool
=
0
;
private
readonly
_resource
:
URI
;
private
_name
:
string
;
private
_options
:
WebviewInputOptions
;
private
_html
:
string
;
...
...
@@ -43,7 +42,6 @@ export class WebviewInput extends EditorInput {
public
readonly
extensionFolderPath
:
URI
|
undefined
;
constructor
(
resource
:
URI
,
name
:
string
,
options
:
WebviewInputOptions
,
html
:
string
,
...
...
@@ -52,7 +50,6 @@ export class WebviewInput extends EditorInput {
extensionFolderPath
?:
string
)
{
super
();
this
.
_resource
=
resource
;
this
.
_name
=
name
;
this
.
_options
=
options
;
this
.
_html
=
html
;
...
...
@@ -90,20 +87,28 @@ export class WebviewInput extends EditorInput {
}
public
getResource
():
URI
{
return
this
.
_resource
;
return
null
;
}
public
getName
():
string
{
return
this
.
_name
;
}
public
getTitle
()
{
return
this
.
getName
();
}
public
getDescription
():
string
{
return
null
;
}
public
setName
(
value
:
string
):
void
{
this
.
_name
=
value
;
this
.
_onDidChangeLabel
.
fire
();
}
matches
(
other
:
IEditorInput
):
boolean
{
return
other
&&
other
instanceof
WebviewInput
&&
other
.
getResource
().
fsPath
===
this
.
getResource
().
fsPath
;
return
other
&&
other
===
this
;
}
public
get
position
():
Position
|
undefined
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录