Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
bd0f9085
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,发现更多精彩内容 >>
未验证
提交
bd0f9085
编写于
3月 11, 2019
作者:
M
Michael Goderbauer
提交者:
GitHub
3月 11, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adds a platfromViewId to SemanticsNode (#8055)
上级
a71609f0
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
16 addition
and
1 deletion
+16
-1
lib/ui/semantics.dart
lib/ui/semantics.dart
+8
-0
lib/ui/semantics/semantics_node.h
lib/ui/semantics/semantics_node.h
+1
-0
lib/ui/semantics/semantics_update_builder.cc
lib/ui/semantics/semantics_update_builder.cc
+2
-0
lib/ui/semantics/semantics_update_builder.h
lib/ui/semantics/semantics_update_builder.h
+1
-0
shell/platform/android/io/flutter/view/AccessibilityBridge.java
...platform/android/io/flutter/view/AccessibilityBridge.java
+2
-0
shell/platform/android/platform_view_android.cc
shell/platform/android/platform_view_android.cc
+2
-1
未找到文件。
lib/ui/semantics.dart
浏览文件 @
bd0f9085
...
...
@@ -601,6 +601,11 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
/// The fields 'textSelectionBase' and 'textSelectionExtent' describe the
/// currently selected text within `value`.
///
/// 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.
///
/// For scrollable nodes `scrollPosition` describes the current scroll
/// position in logical pixel. `scrollExtentMax` and `scrollExtentMin`
/// describe the maximum and minimum in-rage values that `scrollPosition` can
...
...
@@ -629,6 +634,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
int
actions
,
int
textSelectionBase
,
int
textSelectionExtent
,
int
platformViewId
,
int
scrollChildren
,
int
scrollIndex
,
double
scrollPosition
,
...
...
@@ -656,6 +662,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
actions
,
textSelectionBase
,
textSelectionExtent
,
platformViewId
,
scrollChildren
,
scrollIndex
,
scrollPosition
,
...
...
@@ -685,6 +692,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
int
actions
,
int
textSelectionBase
,
int
textSelectionExtent
,
int
platformViewId
,
int
scrollChildren
,
int
scrollIndex
,
double
scrollPosition
,
...
...
lib/ui/semantics/semantics_node.h
浏览文件 @
bd0f9085
...
...
@@ -86,6 +86,7 @@ struct SemanticsNode {
int32_t
actions
=
0
;
int32_t
textSelectionBase
=
-
1
;
int32_t
textSelectionExtent
=
-
1
;
int32_t
platformViewId
=
-
1
;
int32_t
scrollChildren
=
0
;
int32_t
scrollIndex
=
0
;
double
scrollPosition
=
std
::
nan
(
""
);
...
...
lib/ui/semantics/semantics_update_builder.cc
浏览文件 @
bd0f9085
...
...
@@ -41,6 +41,7 @@ void SemanticsUpdateBuilder::updateNode(
int
actions
,
int
textSelectionBase
,
int
textSelectionExtent
,
int
platformViewId
,
int
scrollChildren
,
int
scrollIndex
,
double
scrollPosition
,
...
...
@@ -68,6 +69,7 @@ void SemanticsUpdateBuilder::updateNode(
node
.
actions
=
actions
;
node
.
textSelectionBase
=
textSelectionBase
;
node
.
textSelectionExtent
=
textSelectionExtent
;
node
.
platformViewId
=
platformViewId
;
node
.
scrollChildren
=
scrollChildren
;
node
.
scrollIndex
=
scrollIndex
;
node
.
scrollPosition
=
scrollPosition
;
...
...
lib/ui/semantics/semantics_update_builder.h
浏览文件 @
bd0f9085
...
...
@@ -29,6 +29,7 @@ class SemanticsUpdateBuilder
int
actions
,
int
textSelectionBase
,
int
textSelectionExtent
,
int
platformViewId
,
int
scrollChildren
,
int
scrollIndex
,
double
scrollPosition
,
...
...
shell/platform/android/io/flutter/view/AccessibilityBridge.java
浏览文件 @
bd0f9085
...
...
@@ -1614,6 +1614,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider {
private
int
actions
;
private
int
textSelectionBase
;
private
int
textSelectionExtent
;
private
int
platformViewId
;
private
int
scrollChildren
;
private
int
scrollIndex
;
private
float
scrollPosition
;
...
...
@@ -1748,6 +1749,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider {
actions
=
buffer
.
getInt
();
textSelectionBase
=
buffer
.
getInt
();
textSelectionExtent
=
buffer
.
getInt
();
platformViewId
=
buffer
.
getInt
();
scrollChildren
=
buffer
.
getInt
();
scrollIndex
=
buffer
.
getInt
();
scrollPosition
=
buffer
.
getFloat
();
...
...
shell/platform/android/platform_view_android.cc
浏览文件 @
bd0f9085
...
...
@@ -208,7 +208,7 @@ void PlatformViewAndroid::DispatchSemanticsAction(JNIEnv* env,
void
PlatformViewAndroid
::
UpdateSemantics
(
blink
::
SemanticsNodeUpdates
update
,
blink
::
CustomAccessibilityActionUpdates
actions
)
{
constexpr
size_t
kBytesPerNode
=
3
8
*
sizeof
(
int32_t
);
constexpr
size_t
kBytesPerNode
=
3
9
*
sizeof
(
int32_t
);
constexpr
size_t
kBytesPerChild
=
sizeof
(
int32_t
);
constexpr
size_t
kBytesPerAction
=
4
*
sizeof
(
int32_t
);
...
...
@@ -244,6 +244,7 @@ void PlatformViewAndroid::UpdateSemantics(
buffer_int32
[
position
++
]
=
node
.
actions
;
buffer_int32
[
position
++
]
=
node
.
textSelectionBase
;
buffer_int32
[
position
++
]
=
node
.
textSelectionExtent
;
buffer_int32
[
position
++
]
=
node
.
platformViewId
;
buffer_int32
[
position
++
]
=
node
.
scrollChildren
;
buffer_int32
[
position
++
]
=
node
.
scrollIndex
;
buffer_float32
[
position
++
]
=
(
float
)
node
.
scrollPosition
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录