Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
e2c4b276
E
engine
项目概览
qq_34031325
/
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,发现更多精彩内容 >>
未验证
提交
e2c4b276
编写于
3月 09, 2018
作者:
J
Jason Simmons
提交者:
GitHub
3月 09, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use Dart 2 camel case constants in the engine Dart libraries (#4766)
上级
9c1e4843
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
20 deletion
+20
-20
lib/ui/geometry.dart
lib/ui/geometry.dart
+11
-11
lib/ui/hooks.dart
lib/ui/hooks.dart
+5
-5
lib/ui/natives.dart
lib/ui/natives.dart
+1
-1
lib/ui/painting.dart
lib/ui/painting.dart
+2
-2
lib/ui/pointer.dart
lib/ui/pointer.dart
+1
-1
未找到文件。
lib/ui/geometry.dart
浏览文件 @
e2c4b276
...
...
@@ -17,16 +17,16 @@ abstract class OffsetBase {
final
double
_dx
;
final
double
_dy
;
/// Returns true if either component is [double.
INFINITY
], and false if both
/// Returns true if either component is [double.
infinity
], and false if both
/// are finite (or negative infinity, or NaN).
///
/// This is different than comparing for equality with an instance that has
/// _both_ components set to [double.
INFINITY
].
/// _both_ components set to [double.
infinity
].
///
/// See also:
///
/// * [isFinite], which is true if both components are finite (and not NaN).
bool
get
isInfinite
=>
_dx
>=
double
.
INFINITY
||
_dy
>=
double
.
INFINITY
;
bool
get
isInfinite
=>
_dx
>=
double
.
infinity
||
_dy
>=
double
.
infinity
;
/// Whether both components are finite (neither infinite nor NaN).
///
...
...
@@ -183,7 +183,7 @@ class Offset extends OffsetBase {
/// * [isInfinite], which checks whether either component is infinite.
/// * [isFinite], which checks whether both components are finite.
// This is included for completeness, because [Size.infinite] exists.
static
const
Offset
infinite
=
const
Offset
(
double
.
INFINITY
,
double
.
INFINITY
);
static
const
Offset
infinite
=
const
Offset
(
double
.
infinity
,
double
.
infinity
);
/// Returns a new offset with the x component scaled by `scaleX` and the y
/// component scaled by `scaleY`.
...
...
@@ -352,10 +352,10 @@ class Size extends OffsetBase {
const
Size
.
square
(
double
dimension
)
:
super
(
dimension
,
dimension
);
/// Creates a [Size] with the given [width] and an infinite [height].
const
Size
.
fromWidth
(
double
width
)
:
super
(
width
,
double
.
INFINITY
);
const
Size
.
fromWidth
(
double
width
)
:
super
(
width
,
double
.
infinity
);
/// Creates a [Size] with the given [height] and an infinite [width].
const
Size
.
fromHeight
(
double
height
)
:
super
(
double
.
INFINITY
,
height
);
const
Size
.
fromHeight
(
double
height
)
:
super
(
double
.
infinity
,
height
);
/// Creates a square [Size] whose [width] and [height] are twice the given
/// dimension.
...
...
@@ -382,7 +382,7 @@ class Size extends OffsetBase {
///
/// * [isInfinite], which checks whether either dimension is infinite.
/// * [isFinite], which checks whether both dimensions are finite.
static
const
Size
infinite
=
const
Size
(
double
.
INFINITY
,
double
.
INFINITY
);
static
const
Size
infinite
=
const
Size
(
double
.
infinity
,
double
.
infinity
);
/// Whether this size encloses a non-zero area.
///
...
...
@@ -670,10 +670,10 @@ class Rect {
/// Whether any of the coordinates of this rectangle are equal to positive infinity.
// included for consistency with Offset and Size
bool
get
isInfinite
{
return
left
>=
double
.
INFINITY
||
top
>=
double
.
INFINITY
||
right
>=
double
.
INFINITY
||
bottom
>=
double
.
INFINITY
;
return
left
>=
double
.
infinity
||
top
>=
double
.
infinity
||
right
>=
double
.
infinity
||
bottom
>=
double
.
infinity
;
}
/// Whether all coordinates of this rectangle are finite.
...
...
lib/ui/hooks.dart
浏览文件 @
e2c4b276
...
...
@@ -5,11 +5,11 @@
part of
dart
.
ui
;
String
_decodeUTF8
(
ByteData
message
)
{
return
message
!=
null
?
UTF
8
.
decoder
.
convert
(
message
.
buffer
.
asUint8List
())
:
null
;
return
message
!=
null
?
utf
8
.
decoder
.
convert
(
message
.
buffer
.
asUint8List
())
:
null
;
}
dynamic
_decodeJSON
(
String
message
)
{
return
message
!=
null
?
JSON
.
decode
(
message
)
:
null
;
return
message
!=
null
?
json
.
decode
(
message
)
:
null
;
}
void
_updateWindowMetrics
(
double
devicePixelRatio
,
...
...
@@ -50,8 +50,8 @@ void _updateLocale(String languageCode, String countryCode) {
_invoke
(
window
.
onLocaleChanged
,
window
.
_onLocaleChangedZone
);
}
void
_updateUserSettingsData
(
String
json
)
{
final
Map
<
String
,
dynamic
>
data
=
JSON
.
decode
(
json
);
void
_updateUserSettingsData
(
String
json
Data
)
{
final
Map
<
String
,
dynamic
>
data
=
json
.
decode
(
jsonData
);
_updateTextScaleFactor
(
data
[
'textScaleFactor'
].
toDouble
());
_updateAlwaysUse24HourFormat
(
data
[
'alwaysUse24HourFormat'
]);
}
...
...
@@ -174,7 +174,7 @@ void _invoke3<A1, A2, A3>(void callback(A1 a1, A2 a2, A3 a3), Zone zone, A1 arg1
const
int
_kPointerDataFieldCount
=
19
;
PointerDataPacket
_unpackPointerDataPacket
(
ByteData
packet
)
{
const
int
kStride
=
Int64List
.
BYTES_PER_ELEMENT
;
const
int
kStride
=
Int64List
.
bytesPerElement
;
const
int
kBytesPerPointerData
=
_kPointerDataFieldCount
*
kStride
;
final
int
length
=
packet
.
lengthInBytes
~/
kBytesPerPointerData
;
assert
(
length
*
kBytesPerPointerData
==
packet
.
lengthInBytes
);
...
...
lib/ui/natives.dart
浏览文件 @
e2c4b276
...
...
@@ -22,7 +22,7 @@ Future<developer.ServiceExtensionResponse> _scheduleFrame(
// Schedule the frame.
window
.
scheduleFrame
();
// Always succeed.
return
new
developer
.
ServiceExtensionResponse
.
result
(
JSON
.
encode
(<
String
,
String
>{
return
new
developer
.
ServiceExtensionResponse
.
result
(
json
.
encode
(<
String
,
String
>{
'type'
:
'Success'
,
}));
}
...
...
lib/ui/painting.dart
浏览文件 @
e2c4b276
...
...
@@ -838,9 +838,9 @@ enum PaintingStyle {
}
// If we actually run on big endian machines, we'll need to do something smarter
// here. We don't use [Endian
ness.HOST_ENDIAN
] because it's not a compile-time
// here. We don't use [Endian
.Host
] because it's not a compile-time
// constant and can't propagate into the set/get calls.
const
Endian
ness
_kFakeHostEndian
=
Endianness
.
LITTLE_ENDIAN
;
const
Endian
_kFakeHostEndian
=
Endian
.
little
;
/// A description of the style to use when drawing on a [Canvas].
///
...
...
lib/ui/pointer.dart
浏览文件 @
e2c4b276
...
...
@@ -55,7 +55,7 @@ enum PointerDeviceKind {
class
PointerData
{
/// Creates an object that represents the state of a pointer.
const
PointerData
({
this
.
timeStamp
:
Duration
.
ZERO
,
this
.
timeStamp
:
Duration
.
zero
,
this
.
change
:
PointerChange
.
cancel
,
this
.
kind
:
PointerDeviceKind
.
touch
,
this
.
device
:
0
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录