Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
48a6fde3
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
未验证
提交
48a6fde3
编写于
7月 17, 2020
作者:
C
chunhtai
提交者:
GitHub
7月 17, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix On iOS, dialog titles are announced twice (#19826)
上级
8825f917
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
11 deletion
+13
-11
shell/platform/darwin/ios/framework/Source/SemanticsObject.h
shell/platform/darwin/ios/framework/Source/SemanticsObject.h
+1
-1
shell/platform/darwin/ios/framework/Source/SemanticsObject.mm
...l/platform/darwin/ios/framework/Source/SemanticsObject.mm
+8
-7
shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm
...tform/darwin/ios/framework/Source/accessibility_bridge.mm
+1
-2
shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm
.../darwin/ios/framework/Source/accessibility_bridge_test.mm
+3
-1
未找到文件。
shell/platform/darwin/ios/framework/Source/SemanticsObject.h
浏览文件 @
48a6fde3
...
...
@@ -93,7 +93,7 @@ constexpr int32_t kRootNodeId = 0;
-
(
BOOL
)
nodeWillCauseScroll
:(
const
flutter
::
SemanticsNode
*
)
node
;
-
(
BOOL
)
nodeShouldTriggerAnnouncement
:(
const
flutter
::
SemanticsNode
*
)
node
;
-
(
void
)
collectRoutes
:(
NSMutableArray
<
SemanticsObject
*>*
)
edges
;
-
(
NSString
*
)
routeName
;
-
(
SemanticsObject
*
)
routeFocusObject
;
-
(
BOOL
)
onCustomAccessibilityAction
:(
FlutterCustomAccessibilityAction
*
)
action
;
@end
...
...
shell/platform/darwin/ios/framework/Source/SemanticsObject.mm
浏览文件 @
48a6fde3
...
...
@@ -282,20 +282,21 @@ flutter::SemanticsAction GetSemanticsActionForScrollDirection(
return
YES
;
}
-
(
NSString
*
)
routeName
{
// Returns the first non-null and non-empty semantic label of a child
// with an NamesRoute flag. Otherwise returns nil.
-
(
SemanticsObject
*
)
routeFocusObject
{
// Returns the first SemanticObject in this branch that has
// the NamesRoute flag with a non-nil semantic label. Otherwise
// returns nil.
if
([
self
node
].
HasFlag
(
flutter
::
SemanticsFlags
::
kNamesRoute
))
{
NSString
*
newName
=
[
self
accessibilityLabel
];
if
(
newName
!=
nil
&&
[
newName
length
]
>
0
)
{
return
newName
;
return
self
;
}
}
if
([
self
hasChildren
])
{
for
(
SemanticsObject
*
child
in
self
.
children
)
{
NSString
*
newName
=
[
child
routeName
];
if
(
newName
!=
nil
&&
[
newName
length
]
>
0
)
{
return
newName
;
SemanticsObject
*
focusObject
=
[
child
routeFocusObject
];
if
(
focusObject
!=
nil
)
{
return
focusObject
;
}
}
}
...
...
shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm
浏览文件 @
48a6fde3
...
...
@@ -199,9 +199,8 @@ void AccessibilityBridge::UpdateSemantics(flutter::SemanticsNodeUpdates nodes,
layoutChanged
=
layoutChanged
||
[
doomed_uids
count
]
>
0
;
if
(
routeChanged
)
{
if
(
!
ios_delegate_
->
IsFlutterViewControllerPresentingModalViewController
(
view_
))
{
NSString
*
routeName
=
[
lastAdded
routeName
];
ios_delegate_
->
PostAccessibilityNotification
(
UIAccessibilityScreenChangedNotification
,
routeName
);
[
lastAdded
routeFocusObject
]
);
}
}
else
if
(
layoutChanged
)
{
// TODO(goderbauer): figure out which node to focus next.
...
...
shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm
浏览文件 @
48a6fde3
...
...
@@ -311,7 +311,9 @@ fml::RefPtr<fml::TaskRunner> CreateNewThread(std::string name) {
bridge
->
UpdateSemantics
(
/*nodes=*/
nodes
,
/*actions=*/
actions
);
XCTAssertEqual
([
accessibility_notifications
count
],
1ul
);
XCTAssertEqualObjects
(
accessibility_notifications
[
0
][
@"argument"
],
@"route"
);
SemanticsObject
*
focusObject
=
accessibility_notifications
[
0
][
@"argument"
];
XCTAssertEqual
([
focusObject
uid
],
1
);
XCTAssertEqualObjects
([
focusObject
accessibilityLabel
],
@"route"
);
XCTAssertEqual
([
accessibility_notifications
[
0
][
@"notification"
]
unsignedIntValue
],
UIAccessibilityScreenChangedNotification
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录