Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
77617e47
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,发现更多精彩内容 >>
未验证
提交
77617e47
编写于
6月 03, 2020
作者:
S
stuartmorgan
提交者:
GitHub
6月 03, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "null-annotate SemanticsUpdateBuilder.updateNode (#18552)" (#18785)
This reverts commit
cc08940e
.
上级
243bb59c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
95 addition
and
143 deletion
+95
-143
lib/ui/semantics.dart
lib/ui/semantics.dart
+67
-91
lib/web_ui/lib/src/ui/semantics.dart
lib/web_ui/lib/src/ui/semantics.dart
+28
-52
未找到文件。
lib/ui/semantics.dart
浏览文件 @
77617e47
...
...
@@ -647,21 +647,19 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
/// reading direction of all these strings is given by `textDirection`.
///
/// The fields `textSelectionBase` and `textSelectionExtent` describe the
/// currently selected text within `value`. A value of -1 indicates no
/// current text selection base or extent.
/// currently selected text within `value`.
///
/// The field `maxValueLength` is used to indicate that an editable text
///
field has a limit on the number of characters entered. If it is -1 there
///
is
no limit on the number of characters entered. The field
/// The field `maxValueLength` is used to indicate that an editable text
field
///
has a limit on the number of characters entered. If it is -1 there is
/// no limit on the number of characters entered. The field
/// `currentValueLength` indicates how much of that limit has already been
/// used up. When `maxValueLength` is
>= 0
, `currentValueLength` must also be
///
>= 0, otherwise it should be specified to be -1
.
/// used up. When `maxValueLength` is
set
, `currentValueLength` must also be
///
set
.
///
/// The field `platformViewId` references the platform view, whose semantics
/// nodes will be added as children to this node. If a platform view is
/// specified, `childrenInHitTestOrder` and `childrenInTraversalOrder` must
/// be empty. A value of -1 indicates that this node is not associated with a
/// platform view.
/// specified, `childrenInHitTestOrder` and `childrenInTraversalOrder` must be
/// empty.
///
/// For scrollable nodes `scrollPosition` describes the current scroll
/// position in logical pixel. `scrollExtentMax` and `scrollExtentMin`
...
...
@@ -685,61 +683,39 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
/// z-direction starting at `elevation`. Basically, in the z-direction the
/// node starts at `elevation` above the parent and ends at `elevation` +
/// `thickness` above the parent.
// TODO(cbracken): https://github.com/flutter/flutter/issues/57720
void
updateNode
({
/*required*/
int
/*!*/
id
,
/*required*/
int
/*!*/
flags
,
/*required*/
int
/*!*/
actions
,
/*required*/
int
/*!*/
maxValueLength
,
/*required*/
int
/*!*/
currentValueLength
,
/*required*/
int
/*!*/
textSelectionBase
,
/*required*/
int
/*!*/
textSelectionExtent
,
/*required*/
int
/*!*/
platformViewId
,
/*required*/
int
/*!*/
scrollChildren
,
/*required*/
int
/*!*/
scrollIndex
,
/*required*/
double
/*!*/
scrollPosition
,
/*required*/
double
/*!*/
scrollExtentMax
,
/*required*/
double
/*!*/
scrollExtentMin
,
/*required*/
double
/*!*/
elevation
,
/*required*/
double
/*!*/
thickness
,
/*required*/
Rect
/*!*/
rect
,
/*required*/
String
/*!*/
label
,
/*required*/
String
/*!*/
hint
,
/*required*/
String
/*!*/
value
,
/*required*/
String
/*!*/
increasedValue
,
/*required*/
String
/*!*/
decreasedValue
,
TextDirection
/*?*/
textDirection
,
/*required*/
Float64List
/*!*/
transform
,
/*required*/
Int32List
/*!*/
childrenInTraversalOrder
,
/*required*/
Int32List
/*!*/
childrenInHitTestOrder
,
/*required*/
Int32List
/*!*/
additionalActions
,
int
id
,
int
flags
,
int
actions
,
int
maxValueLength
,
int
currentValueLength
,
int
textSelectionBase
,
int
textSelectionExtent
,
int
platformViewId
,
int
scrollChildren
,
int
scrollIndex
,
double
scrollPosition
,
double
scrollExtentMax
,
double
scrollExtentMin
,
double
elevation
,
double
thickness
,
Rect
rect
,
String
label
,
String
hint
,
String
value
,
String
increasedValue
,
String
decreasedValue
,
TextDirection
textDirection
,
Float64List
transform
,
Int32List
childrenInTraversalOrder
,
Int32List
childrenInHitTestOrder
,
Int32List
additionalActions
,
})
{
assert
(
id
!=
null
);
assert
(
flags
!=
null
);
assert
(
actions
!=
null
);
assert
(
maxValueLength
!=
null
);
assert
(
currentValueLength
!=
null
);
assert
(
textSelectionBase
!=
null
);
assert
(
textSelectionExtent
!=
null
);
assert
(
platformViewId
!=
null
);
assert
(
scrollChildren
!=
null
);
assert
(
scrollIndex
!=
null
);
assert
(
scrollPosition
!=
null
);
assert
(
scrollExtentMax
!=
null
);
assert
(
scrollExtentMin
!=
null
);
assert
(
elevation
!=
null
);
assert
(
thickness
!=
null
);
assert
(
rect
!=
null
);
assert
(
label
!=
null
);
assert
(
hint
!=
null
);
assert
(
value
!=
null
);
assert
(
increasedValue
!=
null
);
assert
(
decreasedValue
!=
null
);
assert
(
transform
!=
null
);
assert
(
childrenInTraversalOrder
!=
null
);
assert
(
childrenInHitTestOrder
!=
null
);
assert
(
additionalActions
!=
null
);
assert
(
_matrix4IsValid
(
transform
));
assert
(
scrollChildren
==
0
||
scrollChildren
==
null
||
(
scrollChildren
>
0
&&
childrenInHitTestOrder
!=
null
),
'If a node has scrollChildren, it must have childrenInHitTestOrder'
,
);
_updateNode
(
id
,
flags
,
...
...
@@ -773,35 +749,35 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
);
}
void
_updateNode
(
int
/*!*/
id
,
int
/*!*/
flags
,
int
/*!*/
actions
,
int
/*!*/
maxValueLength
,
int
/*!*/
currentValueLength
,
int
/*!*/
textSelectionBase
,
int
/*!*/
textSelectionExtent
,
int
/*!*/
platformViewId
,
int
/*!*/
scrollChildren
,
int
/*!*/
scrollIndex
,
double
/*!*/
scrollPosition
,
double
/*!*/
scrollExtentMax
,
double
/*!*/
scrollExtentMin
,
double
/*!*/
left
,
double
/*!*/
top
,
double
/*!*/
right
,
double
/*!*/
bottom
,
double
/*!*/
elevation
,
double
/*!*/
thickness
,
String
/*!*/
label
,
String
/*!*/
hint
,
String
/*!*/
value
,
String
/*!*/
increasedValue
,
String
/*!*/
decreasedValue
,
int
/*!*/
textDirection
,
Float64List
/*!*/
transform
,
Int32List
/*!*/
childrenInTraversalOrder
,
Int32List
/*!*/
childrenInHitTestOrder
,
Int32List
/*!*/
additionalActions
,
int
id
,
int
flags
,
int
actions
,
int
maxValueLength
,
int
currentValueLength
,
int
textSelectionBase
,
int
textSelectionExtent
,
int
platformViewId
,
int
scrollChildren
,
int
scrollIndex
,
double
scrollPosition
,
double
scrollExtentMax
,
double
scrollExtentMin
,
double
left
,
double
top
,
double
right
,
double
bottom
,
double
elevation
,
double
thickness
,
String
label
,
String
hint
,
String
value
,
String
increasedValue
,
String
decreasedValue
,
int
textDirection
,
Float64List
transform
,
Int32List
childrenInTraversalOrder
,
Int32List
childrenInHitTestOrder
,
Int32List
additionalActions
,
)
native
'SemanticsUpdateBuilder_updateNode'
;
/// Update the custom semantics action associated with the given `id`.
...
...
lib/web_ui/lib/src/ui/semantics.dart
浏览文件 @
77617e47
...
...
@@ -667,59 +667,35 @@ class SemanticsUpdateBuilder {
/// The `transform` is a matrix that maps this node's coordinate system into
/// its parent's coordinate system.
void
updateNode
({
/*required*/
int
/*!*/
id
,
/*required*/
int
/*!*/
flags
,
/*required*/
int
/*!*/
actions
,
/*required*/
int
/*!*/
maxValueLength
,
/*required*/
int
/*!*/
currentValueLength
,
/*required*/
int
/*!*/
textSelectionBase
,
/*required*/
int
/*!*/
textSelectionExtent
,
/*required*/
int
/*!*/
platformViewId
,
/*required*/
int
/*!*/
scrollChildren
,
/*required*/
int
/*!*/
scrollIndex
,
/*required*/
double
/*!*/
scrollPosition
,
/*required*/
double
/*!*/
scrollExtentMax
,
/*required*/
double
/*!*/
scrollExtentMin
,
/*required*/
double
/*!*/
elevation
,
/*required*/
double
/*!*/
thickness
,
/*required*/
Rect
/*!*/
rect
,
/*required*/
String
/*!*/
label
,
/*required*/
String
/*!*/
hint
,
/*required*/
String
/*!*/
value
,
/*required*/
String
/*!*/
increasedValue
,
/*required*/
String
/*!*/
decreasedValue
,
TextDirection
/*?*/
textDirection
,
/*required*/
Float64List
/*!*/
transform
,
/*required*/
Int32List
/*!*/
childrenInTraversalOrder
,
/*required*/
Int32List
/*!*/
childrenInHitTestOrder
,
/*required*/
Int32List
/*!*/
additionalActions
,
int
id
,
int
flags
,
int
actions
,
int
maxValueLength
,
int
currentValueLength
,
int
textSelectionBase
,
int
textSelectionExtent
,
int
platformViewId
,
int
scrollChildren
,
int
scrollIndex
,
double
scrollPosition
,
double
scrollExtentMax
,
double
scrollExtentMin
,
double
elevation
,
double
thickness
,
Rect
rect
,
String
label
,
String
hint
,
String
value
,
String
increasedValue
,
String
decreasedValue
,
TextDirection
textDirection
,
Float64List
transform
,
Int32List
childrenInTraversalOrder
,
Int32List
childrenInHitTestOrder
,
Int32List
additionalActions
,
})
{
assert
(
id
!=
null
);
assert
(
flags
!=
null
);
assert
(
actions
!=
null
);
assert
(
maxValueLength
!=
null
);
assert
(
currentValueLength
!=
null
);
assert
(
textSelectionBase
!=
null
);
assert
(
textSelectionExtent
!=
null
);
assert
(
platformViewId
!=
null
);
assert
(
scrollChildren
!=
null
);
assert
(
scrollIndex
!=
null
);
assert
(
scrollPosition
!=
null
);
assert
(
scrollExtentMax
!=
null
);
assert
(
scrollExtentMin
!=
null
);
assert
(
elevation
!=
null
);
assert
(
thickness
!=
null
);
assert
(
rect
!=
null
);
assert
(
label
!=
null
);
assert
(
hint
!=
null
);
assert
(
value
!=
null
);
assert
(
increasedValue
!=
null
);
assert
(
decreasedValue
!=
null
);
assert
(
transform
!=
null
);
assert
(
childrenInTraversalOrder
!=
null
);
assert
(
childrenInHitTestOrder
!=
null
);
assert
(
additionalActions
!=
null
);
assert
(
transform
.
length
==
16
,
'transform argument must have 16 entries.'
);
if
(
transform
.
length
!=
16
)
throw
ArgumentError
(
'transform argument must have 16 entries.'
);
_nodeUpdates
.
add
(
engine
.
SemanticsNodeUpdate
(
id:
id
,
flags:
flags
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录