未验证 提交 36a9c343 编写于 作者: M Michael Goderbauer 提交者: GitHub

Add nextId to traversal order (#4666)

上级 8fdcdf5f
...@@ -399,6 +399,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 { ...@@ -399,6 +399,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
String increasedValue, String increasedValue,
String decreasedValue, String decreasedValue,
TextDirection textDirection, TextDirection textDirection,
int nextNodeId,
int previousNodeId, int previousNodeId,
Float64List transform, Float64List transform,
Int32List children, Int32List children,
...@@ -423,6 +424,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 { ...@@ -423,6 +424,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
increasedValue, increasedValue,
decreasedValue, decreasedValue,
textDirection != null ? textDirection.index + 1 : 0, textDirection != null ? textDirection.index + 1 : 0,
nextNodeId ?? -1,
previousNodeId ?? -1, previousNodeId ?? -1,
transform, transform,
children,); children,);
...@@ -446,6 +448,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 { ...@@ -446,6 +448,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
String increasedValue, String increasedValue,
String decreasedValue, String decreasedValue,
int textDirection, int textDirection,
int nextNodeId,
int previousNodeId, int previousNodeId,
Float64List transform, Float64List transform,
Int32List children, Int32List children,
......
...@@ -76,6 +76,7 @@ struct SemanticsNode { ...@@ -76,6 +76,7 @@ struct SemanticsNode {
std::string increasedValue; std::string increasedValue;
std::string decreasedValue; std::string decreasedValue;
int32_t textDirection = 0; // 0=unknown, 1=rtl, 2=ltr int32_t textDirection = 0; // 0=unknown, 1=rtl, 2=ltr
int32_t nextNodeId = -1;
int32_t previousNodeId = -1; int32_t previousNodeId = -1;
SkRect rect = SkRect::MakeEmpty(); SkRect rect = SkRect::MakeEmpty();
......
...@@ -52,6 +52,7 @@ void SemanticsUpdateBuilder::updateNode(int id, ...@@ -52,6 +52,7 @@ void SemanticsUpdateBuilder::updateNode(int id,
std::string increasedValue, std::string increasedValue,
std::string decreasedValue, std::string decreasedValue,
int textDirection, int textDirection,
int nextNodeId,
int previousNodeId, int previousNodeId,
const tonic::Float64List& transform, const tonic::Float64List& transform,
const tonic::Int32List& children) { const tonic::Int32List& children) {
...@@ -71,6 +72,7 @@ void SemanticsUpdateBuilder::updateNode(int id, ...@@ -71,6 +72,7 @@ void SemanticsUpdateBuilder::updateNode(int id,
node.increasedValue = increasedValue; node.increasedValue = increasedValue;
node.decreasedValue = decreasedValue; node.decreasedValue = decreasedValue;
node.textDirection = textDirection; node.textDirection = textDirection;
node.nextNodeId = nextNodeId;
node.previousNodeId = previousNodeId; node.previousNodeId = previousNodeId;
node.transform.setColMajord(transform.data()); node.transform.setColMajord(transform.data());
node.children = std::vector<int32_t>( node.children = std::vector<int32_t>(
......
...@@ -43,6 +43,7 @@ class SemanticsUpdateBuilder ...@@ -43,6 +43,7 @@ class SemanticsUpdateBuilder
std::string increasedValue, std::string increasedValue,
std::string decreasedValue, std::string decreasedValue,
int textDirection, int textDirection,
int nextNodeId,
int previousNodeId, int previousNodeId,
const tonic::Float64List& transform, const tonic::Float64List& transform,
const tonic::Int32List& children); const tonic::Int32List& children);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册