Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
fb21b34f
E
engine
项目概览
weixin_43355755
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
fb21b34f
编写于
5月 15, 2020
作者:
C
Chris Bracken
提交者:
GitHub
5月 15, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
null-annotate native calls in lib/ui/window.dart (#18430)
上级
09012ceb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
33 addition
and
33 deletion
+33
-33
lib/ui/window.dart
lib/ui/window.dart
+15
-15
lib/web_ui/lib/src/engine/semantics/semantics.dart
lib/web_ui/lib/src/engine/semantics/semantics.dart
+1
-1
lib/web_ui/lib/src/engine/window.dart
lib/web_ui/lib/src/engine/window.dart
+9
-9
lib/web_ui/lib/src/ui/window.dart
lib/web_ui/lib/src/ui/window.dart
+8
-8
未找到文件。
lib/ui/window.dart
浏览文件 @
fb21b34f
...
...
@@ -981,7 +981,7 @@ class Window {
}
_SetNeedsReportTimingsFunc
_setNeedsReportTimings
;
void
_nativeSetNeedsReportTimings
(
bool
value
)
native
'Window_setNeedsReportTimings'
;
void
_nativeSetNeedsReportTimings
(
bool
/*!*/
value
)
native
'Window_setNeedsReportTimings'
;
/// A callback that is invoked when pointer data is available.
///
...
...
@@ -1030,8 +1030,8 @@ class Window {
/// * [Navigator], a widget that handles routing.
/// * [SystemChannels.navigation], which handles subsequent navigation
/// requests from the embedder.
String
get
defaultRouteName
=>
_defaultRouteName
();
String
_defaultRouteName
()
native
'Window_defaultRouteName'
;
String
/*!*/
get
defaultRouteName
=>
_defaultRouteName
();
String
/*!*/
_defaultRouteName
()
native
'Window_defaultRouteName'
;
/// Requests that, at the next appropriate opportunity, the [onBeginFrame]
/// and [onDrawFrame] callbacks be invoked.
...
...
@@ -1066,7 +1066,7 @@ class Window {
/// scheduling of frames.
/// * [RendererBinding], the Flutter framework class which manages layout and
/// painting.
void
render
(
Scene
scene
)
native
'Window_render'
;
void
render
(
Scene
/*!*/
scene
)
native
'Window_render'
;
/// Whether the user has requested that [updateSemantics] be called when
/// the semantic contents of window changes.
...
...
@@ -1127,7 +1127,7 @@ class Window {
///
/// In either case, this function disposes the given update, which means the
/// semantics update cannot be used further.
void
updateSemantics
(
SemanticsUpdate
update
)
native
'Window_updateSemantics'
;
void
updateSemantics
(
SemanticsUpdate
/*!*/
update
)
native
'Window_updateSemantics'
;
/// Set the debug name associated with this window's root isolate.
///
...
...
@@ -1137,7 +1137,7 @@ class Window {
/// This can be combined with flutter tools `--isolate-filter` flag to debug
/// specific root isolates. For example: `flutter attach --isolate-filter=[name]`.
/// Note that this does not rename any child isolates of the root.
void
setIsolateDebugName
(
String
name
)
native
'Window_setIsolateDebugName'
;
void
setIsolateDebugName
(
String
/*!*/
name
)
native
'Window_setIsolateDebugName'
;
/// Sends a message to a platform-specific plugin.
///
...
...
@@ -1148,17 +1148,17 @@ class Window {
///
/// The framework invokes [callback] in the same zone in which this method
/// was called.
void
sendPlatformMessage
(
String
name
,
ByteData
data
,
PlatformMessageResponseCallback
callback
)
{
void
sendPlatformMessage
(
String
/*!*/
name
,
ByteData
/*?*/
data
,
PlatformMessageResponseCallback
/*?*/
callback
)
{
final
String
error
=
_sendPlatformMessage
(
name
,
_zonedPlatformMessageResponseCallback
(
callback
),
data
);
if
(
error
!=
null
)
throw
Exception
(
error
);
}
String
_sendPlatformMessage
(
String
name
,
PlatformMessageResponseCallback
callback
,
ByteData
data
)
native
'Window_sendPlatformMessage'
;
String
_sendPlatformMessage
(
String
/*!*/
name
,
PlatformMessageResponseCallback
/*?*/
callback
,
ByteData
/*?*/
data
)
native
'Window_sendPlatformMessage'
;
/// Called whenever this window receives a message from a platform-specific
/// plugin.
...
...
@@ -1182,12 +1182,12 @@ class Window {
}
/// Called by [_dispatchPlatformMessage].
void
_respondToPlatformMessage
(
int
responseId
,
ByteData
data
)
void
_respondToPlatformMessage
(
int
/*!*/
responseId
,
ByteData
/*?*/
data
)
native
'Window_respondToPlatformMessage'
;
/// Wraps the given [callback] in another callback that ensures that the
/// original callback is called in the zone it was registered in.
static
PlatformMessageResponseCallback
_zonedPlatformMessageResponseCallback
(
PlatformMessageResponseCallback
callback
)
{
static
PlatformMessageResponseCallback
/*?*/
_zonedPlatformMessageResponseCallback
(
PlatformMessageResponseCallback
/*?*/
callback
)
{
if
(
callback
==
null
)
return
null
;
...
...
@@ -1209,7 +1209,7 @@ class Window {
///
/// For asynchronous communication between the embedder and isolate, a
/// platform channel may be used.
ByteData
getPersistentIsolateData
()
native
'Window_getPersistentIsolateData'
;
ByteData
/*?*/
getPersistentIsolateData
()
native
'Window_getPersistentIsolateData'
;
}
/// Additional accessibility features that may be enabled by the platform.
...
...
lib/web_ui/lib/src/engine/semantics/semantics.dart
浏览文件 @
fb21b34f
...
...
@@ -1422,7 +1422,7 @@ class EngineSemanticsOwner {
}
/// Updates the semantics tree from data in the [uiUpdate].
void
updateSemantics
(
ui
.
SemanticsUpdate
uiUpdate
)
{
void
updateSemantics
(
ui
.
SemanticsUpdate
/*!*/
uiUpdate
)
{
if
(!
_semanticsEnabled
)
{
return
;
}
...
...
lib/web_ui/lib/src/engine/window.dart
浏览文件 @
fb21b34f
...
...
@@ -154,7 +154,7 @@ class EngineWindow extends ui.Window {
String
_defaultRouteName
;
@override
String
get
defaultRouteName
=>
_defaultRouteName
??=
_browserHistory
.
currentPath
;
String
/*!*/
get
defaultRouteName
=>
_defaultRouteName
??=
_browserHistory
.
currentPath
;
/// Change the strategy to use for handling browser history location.
/// Setting this member will automatically update [_browserHistory].
...
...
@@ -367,16 +367,16 @@ class EngineWindow extends ui.Window {
@override
void
sendPlatformMessage
(
String
name
,
ByteData
data
,
ui
.
PlatformMessageResponseCallback
callback
,
String
/*!*/
name
,
ByteData
/*?*/
data
,
ui
.
PlatformMessageResponseCallback
/*?*/
callback
,
)
{
_sendPlatformMessage
(
name
,
data
,
_zonedPlatformMessageResponseCallback
(
callback
));
}
/// Wraps the given [callback] in another callback that ensures that the
/// original callback is called in the zone it was registered in.
static
ui
.
PlatformMessageResponseCallback
_zonedPlatformMessageResponseCallback
(
ui
.
PlatformMessageResponseCallback
callback
)
{
static
ui
.
PlatformMessageResponseCallback
/*?*/
_zonedPlatformMessageResponseCallback
(
ui
.
PlatformMessageResponseCallback
/*?*/
callback
)
{
if
(
callback
==
null
)
return
null
;
...
...
@@ -389,9 +389,9 @@ class EngineWindow extends ui.Window {
}
void
_sendPlatformMessage
(
String
name
,
ByteData
data
,
ui
.
PlatformMessageResponseCallback
callback
,
String
/*!*/
name
,
ByteData
/*?*/
data
,
ui
.
PlatformMessageResponseCallback
/*?*/
callback
,
)
{
// In widget tests we want to bypass processing of platform messages.
if
(
assertionsEnabled
&&
ui
.
debugEmulateFlutterTesterEnvironment
)
{
...
...
@@ -604,7 +604,7 @@ class EngineWindow extends ui.Window {
}
@override
void
render
(
ui
.
Scene
scene
)
{
void
render
(
ui
.
Scene
/*!*/
scene
)
{
if
(
experimentalUseSkia
)
{
final
LayerScene
layerScene
=
scene
;
rasterizer
.
draw
(
layerScene
.
layerTree
);
...
...
lib/web_ui/lib/src/ui/window.dart
浏览文件 @
fb21b34f
...
...
@@ -846,7 +846,7 @@ abstract class Window {
/// * [Navigator], a widget that handles routing.
/// * [SystemChannels.navigation], which handles subsequent navigation
/// requests from the embedder.
String
get
defaultRouteName
;
String
/*!*/
get
defaultRouteName
;
/// Whether the user has requested that [updateSemantics] be called when
/// the semantic contents of window changes.
...
...
@@ -907,7 +907,7 @@ abstract class Window {
///
/// In either case, this function disposes the given update, which means the
/// semantics update cannot be used further.
void
updateSemantics
(
SemanticsUpdate
update
)
{
void
updateSemantics
(
SemanticsUpdate
/*!*/
update
)
{
engine
.
EngineSemanticsOwner
.
instance
.
updateSemantics
(
update
);
}
...
...
@@ -921,9 +921,9 @@ abstract class Window {
/// The framework invokes [callback] in the same zone in which this method
/// was called.
void
sendPlatformMessage
(
String
name
,
ByteData
data
,
PlatformMessageResponseCallback
callback
,
String
/*!*/
name
,
ByteData
/*?*/
data
,
PlatformMessageResponseCallback
/*?*/
callback
,
);
/// Additional accessibility features that may be enabled by the platform.
...
...
@@ -954,15 +954,15 @@ abstract class Window {
/// scheduling of frames.
/// * [RendererBinding], the Flutter framework class which manages layout and
/// painting.
void
render
(
Scene
scene
);
void
render
(
Scene
/*!*/
scene
);
String
get
initialLifecycleState
=>
_initialLifecycleState
;
String
_initialLifecycleState
;
void
setIsolateDebugName
(
String
name
)
{}
void
setIsolateDebugName
(
String
/*!*/
name
)
{}
ByteData
getPersistentIsolateData
()
=>
null
;
ByteData
/*?*/
getPersistentIsolateData
()
=>
null
;
}
VoidCallback
webOnlyScheduleFrameCallback
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录