Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
ac45051f
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,发现更多精彩内容 >>
未验证
提交
ac45051f
编写于
10月 04, 2019
作者:
K
Kate Lovett
提交者:
GitHub
10月 04, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Adding Link SemanticsFlag (#12453)" (#12815)
This reverts commit
974ca210
.
上级
60ce643b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
5 addition
and
22 deletion
+5
-22
lib/ui/semantics.dart
lib/ui/semantics.dart
+1
-12
lib/ui/semantics/semantics_node.h
lib/ui/semantics/semantics_node.h
+0
-1
shell/platform/android/io/flutter/view/AccessibilityBridge.java
...platform/android/io/flutter/view/AccessibilityBridge.java
+2
-3
shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm
...tform/darwin/ios/framework/Source/accessibility_bridge.mm
+0
-3
shell/platform/embedder/embedder.h
shell/platform/embedder/embedder.h
+2
-3
未找到文件。
lib/ui/semantics.dart
浏览文件 @
ac45051f
...
...
@@ -291,7 +291,6 @@ class SemanticsFlag {
static
const
int
_kIsMultilineIndex
=
1
<<
19
;
static
const
int
_kIsReadOnlyIndex
=
1
<<
20
;
static
const
int
_kIsFocusableIndex
=
1
<<
21
;
static
const
int
_kIsLinkIndex
=
1
<<
22
;
const
SemanticsFlag
.
_
(
this
.
index
);
...
...
@@ -334,7 +333,7 @@ class SemanticsFlag {
/// Whether the semantic node represents a button.
///
/// Platforms ha
ve
special handling for buttons, for example Android's TalkBack
/// Platforms ha
s
special handling for buttons, for example Android's TalkBack
/// and iOS's VoiceOver provides an additional hint when the focused object is
/// a button.
static
const
SemanticsFlag
isButton
=
SemanticsFlag
.
_
(
_kIsButtonIndex
);
...
...
@@ -350,13 +349,6 @@ class SemanticsFlag {
/// Only applicable when [isTextField] is true.
static
const
SemanticsFlag
isReadOnly
=
SemanticsFlag
.
_
(
_kIsReadOnlyIndex
);
/// Whether the semantic node is an interactive link.
///
/// Platforms have special handling for links, for example iOS's VoiceOver
/// provides an additional hint when the focused object is a link, as well as
/// the ability to parse the links through another navigation menu.
static
const
SemanticsFlag
isLink
=
SemanticsFlag
.
_
(
_kIsLinkIndex
);
/// Whether the semantic node is able to hold the user's focus.
///
/// The focused element is usually the current receiver of keyboard inputs.
...
...
@@ -536,7 +528,6 @@ class SemanticsFlag {
_kHasImplicitScrollingIndex:
hasImplicitScrolling
,
_kIsMultilineIndex:
isMultiline
,
_kIsReadOnlyIndex:
isReadOnly
,
_kIsLinkIndex:
isLink
,
};
@override
...
...
@@ -584,8 +575,6 @@ class SemanticsFlag {
return
'SemanticsFlag.isMultiline'
;
case
_kIsReadOnlyIndex:
return
'SemanticsFlag.isReadOnly'
;
case
_kIsLinkIndex:
return
'SemanticsFlag.isLink'
;
}
return
null
;
}
...
...
lib/ui/semantics/semantics_node.h
浏览文件 @
ac45051f
...
...
@@ -73,7 +73,6 @@ enum class SemanticsFlags : int32_t {
// kIsMultiline = 1 << 19,
kIsReadOnly
=
1
<<
20
,
kIsFocusable
=
1
<<
21
,
kIsLink
=
1
<<
22
,
};
const
int
kScrollableSemanticsFlags
=
...
...
shell/platform/android/io/flutter/view/AccessibilityBridge.java
浏览文件 @
ac45051f
...
...
@@ -591,7 +591,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider {
}
}
if
(
semanticsNode
.
hasFlag
(
Flag
.
IS_BUTTON
)
||
semanticsNode
.
hasFlag
(
Flag
.
IS_LINK
)
)
{
if
(
semanticsNode
.
hasFlag
(
Flag
.
IS_BUTTON
))
{
result
.
setClassName
(
"android.widget.Button"
);
}
if
(
semanticsNode
.
hasFlag
(
Flag
.
IS_IMAGE
))
{
...
...
@@ -1648,8 +1648,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider {
// The Dart API defines the following flag but it isn't used in Android.
// IS_MULTILINE(1 << 19);
IS_READ_ONLY
(
1
<<
20
),
IS_FOCUSABLE
(
1
<<
21
),
IS_LINK
(
1
<<
22
);
IS_FOCUSABLE
(
1
<<
21
);
final
int
value
;
...
...
shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm
浏览文件 @
ac45051f
...
...
@@ -407,9 +407,6 @@ flutter::SemanticsAction GetSemanticsActionForScrollDirection(
if
([
self
node
].
HasFlag
(
flutter
::
SemanticsFlags
::
kIsLiveRegion
))
{
traits
|=
UIAccessibilityTraitUpdatesFrequently
;
}
if
([
self
node
].
HasFlag
(
flutter
::
SemanticsFlags
::
kIsLink
))
{
traits
|=
UIAccessibilityTraitLink
;
}
return
traits
;
}
...
...
shell/platform/embedder/embedder.h
浏览文件 @
ac45051f
...
...
@@ -63,7 +63,8 @@ typedef enum {
/// Must match the `SemanticsAction` enum in semantics.dart.
typedef
enum
{
/// The equivalent of a user briefly tapping the screen with the finger
/// without moving it.
/// without
/// moving it.
kFlutterSemanticsActionTap
=
1
<<
0
,
/// The equivalent of a user pressing and holding the screen with the finger
/// for a few seconds without moving it.
...
...
@@ -171,8 +172,6 @@ typedef enum {
kFlutterSemanticsFlagIsReadOnly
=
1
<<
20
,
/// Whether the semantic node can hold the user's focus.
kFlutterSemanticsFlagIsFocusable
=
1
<<
21
,
/// Whether the semantics node represents a link.
kFlutterSemanticsFlagIsLink
=
1
<<
22
,
}
FlutterSemanticsFlag
;
typedef
enum
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录