Add nextId to traversal order (flutter/engine#4666)

This commit is contained in:
Michael Goderbauer
2018-02-13 14:27:23 -08:00
committed by GitHub
parent c69188ad9f
commit 2adfbd3202
4 changed files with 7 additions and 0 deletions

View File

@@ -399,6 +399,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
String increasedValue,
String decreasedValue,
TextDirection textDirection,
int nextNodeId,
int previousNodeId,
Float64List transform,
Int32List children,
@@ -423,6 +424,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
increasedValue,
decreasedValue,
textDirection != null ? textDirection.index + 1 : 0,
nextNodeId ?? -1,
previousNodeId ?? -1,
transform,
children,);
@@ -446,6 +448,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
String increasedValue,
String decreasedValue,
int textDirection,
int nextNodeId,
int previousNodeId,
Float64List transform,
Int32List children,

View File

@@ -76,6 +76,7 @@ struct SemanticsNode {
std::string increasedValue;
std::string decreasedValue;
int32_t textDirection = 0; // 0=unknown, 1=rtl, 2=ltr
int32_t nextNodeId = -1;
int32_t previousNodeId = -1;
SkRect rect = SkRect::MakeEmpty();

View File

@@ -52,6 +52,7 @@ void SemanticsUpdateBuilder::updateNode(int id,
std::string increasedValue,
std::string decreasedValue,
int textDirection,
int nextNodeId,
int previousNodeId,
const tonic::Float64List& transform,
const tonic::Int32List& children) {
@@ -71,6 +72,7 @@ void SemanticsUpdateBuilder::updateNode(int id,
node.increasedValue = increasedValue;
node.decreasedValue = decreasedValue;
node.textDirection = textDirection;
node.nextNodeId = nextNodeId;
node.previousNodeId = previousNodeId;
node.transform.setColMajord(transform.data());
node.children = std::vector<int32_t>(

View File

@@ -43,6 +43,7 @@ class SemanticsUpdateBuilder
std::string increasedValue,
std::string decreasedValue,
int textDirection,
int nextNodeId,
int previousNodeId,
const tonic::Float64List& transform,
const tonic::Int32List& children);