Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
fe80dff3
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,发现更多精彩内容 >>
未验证
提交
fe80dff3
编写于
6月 04, 2020
作者:
Y
Yegor
提交者:
GitHub
6月 04, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
null annotate window.dart (#18789)
上级
201dc00c
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
322 addition
and
409 deletion
+322
-409
lib/ui/window.dart
lib/ui/window.dart
+123
-122
lib/web_ui/lib/src/engine.dart
lib/web_ui/lib/src/engine.dart
+1
-1
lib/web_ui/lib/src/engine/window.dart
lib/web_ui/lib/src/engine/window.dart
+18
-4
lib/web_ui/lib/src/ui/test_embedding.dart
lib/web_ui/lib/src/ui/test_embedding.dart
+1
-1
lib/web_ui/lib/src/ui/window.dart
lib/web_ui/lib/src/ui/window.dart
+179
-281
未找到文件。
lib/ui/window.dart
浏览文件 @
fe80dff3
此差异已折叠。
点击以展开。
lib/web_ui/lib/src/engine.dart
浏览文件 @
fe80dff3
...
...
@@ -184,7 +184,7 @@ void webOnlyInitializeEngine() {
}
bool
waitingForAnimation
=
false
;
ui
.
webOnlyS
cheduleFrameCallback
=
()
{
s
cheduleFrameCallback
=
()
{
// We're asked to schedule a frame and call `frameHandler` when the frame
// fires.
if
(!
waitingForAnimation
)
{
...
...
lib/web_ui/lib/src/engine/window.dart
浏览文件 @
fe80dff3
...
...
@@ -8,6 +8,11 @@ part of engine;
/// When set to true, all platform messages will be printed to the console.
const
bool
_debugPrintPlatformMessages
=
false
;
/// Requests that the browser schedule a frame.
///
/// This may be overridden in tests, for example, to pump fake frames.
ui
.
VoidCallback
scheduleFrameCallback
;
/// The Web implementation of [ui.Window].
class
EngineWindow
extends
ui
.
Window
{
EngineWindow
()
{
...
...
@@ -156,6 +161,15 @@ class EngineWindow extends ui.Window {
@override
String
/*!*/
get
defaultRouteName
=>
_defaultRouteName
??=
_browserHistory
.
currentPath
;
@override
void
scheduleFrame
()
{
if
(
scheduleFrameCallback
==
null
)
{
throw
new
Exception
(
'scheduleFrameCallback must be initialized first.'
);
}
scheduleFrameCallback
();
}
/// Change the strategy to use for handling browser history location.
/// Setting this member will automatically update [_browserHistory].
///
...
...
@@ -198,9 +212,9 @@ class EngineWindow extends ui.Window {
}
@override
ui
.
VoidCallback
get
onMetricsChanged
=>
_onMetricsChanged
;
ui
.
VoidCallback
_onMetricsChanged
;
Zone
_onMetricsChangedZone
;
ui
.
VoidCallback
/*?*/
get
onMetricsChanged
=>
_onMetricsChanged
;
ui
.
VoidCallback
/*?*/
_onMetricsChanged
;
Zone
/*!*/
_onMetricsChangedZone
=
Zone
.
root
;
@override
set
onMetricsChanged
(
ui
.
VoidCallback
callback
)
{
_onMetricsChanged
=
callback
;
...
...
@@ -766,7 +780,7 @@ void _invoke3<A1, A2, A3>(
/// `dart:ui` window delegates to this value. However, this value has a wider
/// API surface, providing Web-specific functionality that the standard
/// `dart:ui` version does not.
final
EngineWindow
window
=
EngineWindow
();
final
EngineWindow
/*!*/
window
=
EngineWindow
();
/// The Web implementation of [ui.WindowPadding].
class
WindowPadding
implements
ui
.
WindowPadding
{
...
...
lib/web_ui/lib/src/ui/test_embedding.dart
浏览文件 @
fe80dff3
...
...
@@ -40,7 +40,7 @@ Future<void> webOnlyInitializeTestDomRenderer({double devicePixelRatio = 3.0}) {
engine
.
window
.
debugOverrideDevicePixelRatio
(
devicePixelRatio
);
engine
.
window
.
webOnlyDebugPhysicalSizeOverride
=
Size
(
800
*
devicePixelRatio
,
600
*
devicePixelRatio
);
webOnlyS
cheduleFrameCallback
=
()
{};
engine
.
s
cheduleFrameCallback
=
()
{};
debugEmulateFlutterTesterEnvironment
=
true
;
if
(
_platformInitializedFuture
!=
null
)
{
...
...
lib/web_ui/lib/src/ui/window.dart
浏览文件 @
fe80dff3
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录